mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 07:17:52 +10:00
rename vendor dir to pkgs
This commit is contained in:
0
archivebox/pkgs/abx-plugin-readwise/README.md
Normal file
0
archivebox/pkgs/abx-plugin-readwise/README.md
Normal file
35
archivebox/pkgs/abx-plugin-readwise/abx_plugin_readwise.py
Normal file
35
archivebox/pkgs/abx-plugin-readwise/abx_plugin_readwise.py
Normal file
@@ -0,0 +1,35 @@
|
||||
__package__ = 'abx_plugin_readwise_extractor'
|
||||
__id__ = 'abx_plugin_readwise_extractor'
|
||||
__label__ = 'Readwise API'
|
||||
__version__ = '2024.10.27'
|
||||
__author__ = 'ArchiveBox'
|
||||
__homepage__ = 'https://github.com/ArchiveBox/ArchiveBox/tree/dev/archivebox/plugins_extractor/readwise'
|
||||
__dependencies__ = []
|
||||
|
||||
import abx
|
||||
|
||||
from typing import Dict
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from abx_spec_config.base_configset import BaseConfigSet
|
||||
|
||||
SOURCES_DIR = abx.pm.hook.get_CONFIG().SOURCES_DIR
|
||||
|
||||
|
||||
class ReadwiseConfig(BaseConfigSet):
|
||||
READWISE_DB_PATH: Path = Field(default=SOURCES_DIR / "readwise_reader_api.db")
|
||||
READWISE_READER_TOKENS: Dict[str, str] = Field(default=lambda: {}) # {<username>: <access_token>, ...}
|
||||
|
||||
|
||||
@abx.hookimpl
|
||||
def get_CONFIG():
|
||||
return {
|
||||
__id__: ReadwiseConfig()
|
||||
}
|
||||
|
||||
@abx.hookimpl
|
||||
def ready():
|
||||
READWISE_CONFIG = abx.pm.hook.get_CONFIG()[__id__]
|
||||
READWISE_CONFIG.validate()
|
||||
18
archivebox/pkgs/abx-plugin-readwise/pyproject.toml
Normal file
18
archivebox/pkgs/abx-plugin-readwise/pyproject.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[project]
|
||||
name = "abx-plugin-readwise"
|
||||
version = "2024.10.28"
|
||||
description = "Readwise API Extractor"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"abx>=0.1.0",
|
||||
"abx-spec-config>=0.1.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project.entry-points.abx]
|
||||
abx_plugin_readwise = "abx_plugin_readwise"
|
||||
|
||||
Reference in New Issue
Block a user