tss/docs/schema.yaml
2022-06-24 13:52:11 -04:00

105 lines
3.8 KiB
YAML

$schema: http://json-schema.org/draft/2020-12/schema
additionalProperties: false
properties:
data_dir:
default: ./
description: Base directory to write feed data and schedule file
type: string
db_dir:
default: <datadir>/feed_data
description: Path to the directory where feed content is saved
type: string
feeds:
description: Feed config
items:
additionalProperties: false
properties:
channel:
description: Telegram channel name in the form "@foobar" or "-1004242442" (private)
type: string
cron:
description: Cron expression, see https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format
type: string
first_time_limit:
default: 0
description: Number of entries to process when the feed is seen for the first time
type: integer
name:
description: Unique identifier for the feed. Used as filename, so keep it simple
type: string
proxy:
default: <global proxy>
description: Proxy for this feed if different from global
type: string
rhash:
default: ""
description: Telegram instant view rhash id, see https://instantview.telegram.org/#publishing-templates
type: string
title:
default: Link
description: Text of the link sent to telegram,
type: string
type:
description: Rss or Atom feed
enum:
- rss
- atom
type: string
url:
description: |-
Feed URL, string or array of strings
If array, all entries are merged, e.g ["https://example.com/blog/tag/foo/feed", "https://example.com/blog/tag/bar/feed" ]
items:
type: string
oneOf:
- type: string
- type: array
required:
- name
- channel
- url
- cron
- type
type: object
type: array
first_time_limit:
default: -1
description: |-
Number of entries to process when the feed is seen for the first time
-1 means no limit
type: integer
last_loaded_path:
default: <datadir>/last_success.yml
description: Path to the file where last success time for each feed is saved
type: string
proxy:
default: ""
description: |-
default proxy url that http.Client can understand
or socks5://unix/path/to/sock for socks proxy over unix socket
empty for no proxy
examples:
- socks5://unix/run/tor/socks
- '*myvpsproxy'
type: string
refs:
description: |-
Placeholder to put any yaml anchors to use elsewhere, E.g.
refs:
myvpsproxy: &myvpsproxy "socks5://vps.example.com:1080"
twiceaday: &twiceaday "00 1,13 * * *"
type: object
telegram_auth_token:
description: Auth token for telegram in the form of 424242424:AB02132skdcjlisjkjflewjlfkjslkfHHXX
type: string
telegram_proxy:
default: <global proxy>
description: |-
proxy for telegram if different from default
NONE to not use global default
type: string
required:
- telegram_auth_token
- feeds
type: object