Go to file
Tim Van Baak e801f15066 tmp 2022-08-21 08:15:17 -07:00
providers tmp 2022-08-21 08:15:17 -07:00
server tmp 2022-08-21 08:15:17 -07:00
.envrc Move dotfiles to the right place 2022-08-17 00:38:40 -07:00
.gitignore Move dotfiles to the right place 2022-08-17 00:38:40 -07:00
README.md tmp 2022-08-21 08:15:17 -07:00
default.nix Move nix files to the top level 2022-08-13 00:33:27 +00:00
flake.lock Move nix files to the top level 2022-08-13 00:33:27 +00:00
flake.nix Move nix files to the top level 2022-08-13 00:33:27 +00:00
shell.nix Move nix files to the top level 2022-08-13 00:33:27 +00:00

README.md

Providers are modules that export: CONFIG = { "config key": "optional | required", ... }

update(config, state) -> list[items]

And optionally: action_NAME(config, state, item) -> None

on_create(config, state, item) -> None

on_delete(config, state, item) -> None

Sources are folders in the data directory with: config: user-modified configuration values, drawn from the provider state: provider-modified data *.item: feed items

config reserved keys: "provider": the provider the source uses "name": given to sources by default, individuates sources from same provider

GET /config Edit subfeed configs

GET /config/[feedname] Edit config values for feedname

GET /feed/[feedname] Feed view for feedname

CLI: intake create [provider] [--config KEY VALUE] [-c KEY VALUE] ... load the provider verify that the provider's config is satisfied create the source and set the config values

intake update [source] [--reset]
    load the source's config and state
    use config.provider to load the provider
    verify the source config against the provider config
    call provider.update(config, state) to get current items
    merge new items into current items
        if --reset, new items overwrite everything, including active

intake deactivate [source] [--tag TAG] [--title TITLE]
    load each item in the source and deactivate it

intake add [--id ID] [--title TITLE] [--link LINK] [--time TIME] [--author AUTHOR] [--body BODY] [--tags TAGS] [--ttl TTL] [--ttd TTD] [--tts TTS]
    create the item and add it to the default source

intake feed [--json]
    Dump active item feed to stdout

intake action [source] [item] [action]
    load config, state, item
    verify item supports this action
    load config.provider
    verify config
    verify provider supports this action
    action_[action](config, state, item)