mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-27 21:24:16 -04:00
move final legacy config to plugins and fix archivebox config cmd and add search opt
This commit is contained in:
parent
115f89fd8b
commit
b3107ab830
20 changed files with 379 additions and 275 deletions
37
archivebox/plugins_extractor/pocket/__init__.py
Normal file
37
archivebox/plugins_extractor/pocket/__init__.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
__package__ = 'plugins_extractor.pocket'
|
||||
__id__ = 'pocket'
|
||||
__label__ = 'pocket'
|
||||
__version__ = '2024.10.21'
|
||||
__author__ = 'ArchiveBox'
|
||||
__homepage__ = 'https://github.com/ArchiveBox/ArchiveBox/tree/dev/archivebox/plugins_extractor/pocket'
|
||||
__dependencies__ = []
|
||||
|
||||
import abx
|
||||
|
||||
|
||||
@abx.hookimpl
|
||||
def get_PLUGIN():
|
||||
return {
|
||||
__id__: {
|
||||
'id': __id__,
|
||||
'package': __package__,
|
||||
'label': __label__,
|
||||
'version': __version__,
|
||||
'author': __author__,
|
||||
'homepage': __homepage__,
|
||||
'dependencies': __dependencies__,
|
||||
}
|
||||
}
|
||||
|
||||
@abx.hookimpl
|
||||
def get_CONFIG():
|
||||
from .config import POCKET_CONFIG
|
||||
|
||||
return {
|
||||
__id__: POCKET_CONFIG
|
||||
}
|
||||
|
||||
@abx.hookimpl
|
||||
def ready():
|
||||
from .config import POCKET_CONFIG
|
||||
POCKET_CONFIG.validate()
|
15
archivebox/plugins_extractor/pocket/config.py
Normal file
15
archivebox/plugins_extractor/pocket/config.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
__package__ = 'plugins_extractor.pocket'
|
||||
|
||||
from typing import Dict
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from abx.archivebox.base_configset import BaseConfigSet
|
||||
|
||||
|
||||
class PocketConfig(BaseConfigSet):
|
||||
POCKET_CONSUMER_KEY: str | None = Field(default=None)
|
||||
POCKET_ACCESS_TOKENS: Dict[str, str] = Field(default=lambda: {}) # {<username>: <access_token>, ...}
|
||||
|
||||
|
||||
POCKET_CONFIG = PocketConfig()
|
Loading…
Add table
Add a link
Reference in a new issue