tss/docs/schema.yaml

97 lines
2.9 KiB
YAML
Raw Normal View History

2022-06-20 19:31:28 -04:00
$schema: http://json-schema.org/draft/2020-12/schema
properties:
proxy:
type: string
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
default: ""
telegram_proxy:
type: string
description: |-
proxy for telegram if different from default
NONE to not use global default
default: <global proxy>
telegram_auth_token:
type: string
description: Auth token for telegram in the form of 424242424:AB02132skdcjlisjkjflewjlfkjslkfHHXX
data_dir:
type: string
description: Base directory to write feed data and schedule file
default: ./
last_loaded_path:
type: string
description: Path to the file where last success time for each feed is saved
default: <datadir>/last_success.yml
db_dir:
type: string
description: Path to the directory where feed content is saved
default: <datadir>/feed_data
first_time_limit:
type: integer
description: |-
Number of entries to process when the feed is seen for the first time
-1 means no limit
default: -1
feeds:
items:
properties:
name:
type: string
description: Unique identifier for the feed. Used as filename, so keep it simple
channel:
type: string
description: Telegram channel name in the form "@foobar" or "-1004242442" (private)
rhash:
type: string
description: Telegram instant view rhash id, see https://instantview.telegram.org/#publishing-templates
default: ""
url:
oneOf:
- type: string
- type: array
items:
type: string
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" ]
cron:
type: string
description: "Cron expression, see https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format"
proxy:
type: string
description: Proxy for this feed if different from global
default: <global proxy>
type:
type: string
enum:
- rss
- atom
description: Rss or Atom feed
title:
type: string
description: Text of the link sent to telegram,
default: Link
first_time_limit:
type: integer
description: Number of entries to process when the feed is seen for the first time
default: 0
additionalProperties: false
type: object
required:
- name
- channel
- url
- cron
- type
type: array
description: Feed config
refs:
type: object
additionalProperties: false
type: object
required:
- telegram_auth_token
- feeds