-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.config.yml
101 lines (79 loc) · 3.21 KB
/
example.config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# This is an example of configuration file for avtdl.
# Lines starting with # are comments and ignored by the application.
# Consult documentation at https://github.com/15532th/avtdl#avtdl
# for detailed description of configuration file format.
# Additional examples can be found at
# https://github.com/15532th/avtdl/blob/master/EXAMPLES.md
# Mandatory top-level "actors" section groups units of work, "entities",
# of specific plugins. Parameters available for configuration of each plugin
# are described in https://github.com/15532th/avtdl/blob/master/PLUGINS.md
actors:
# Monitors, retaining new data from data sources:
rss: # plugin for monitoring Youtube channel RSS feed
entities:
- name: "ChannelName"
url: "https://www.youtube.com/feeds/videos.xml?channel_id=UCK0V3b23uJyU4N8eR_BR0QA"
- name: "AnotherChannelName"
url: "https://www.youtube.com/feeds/videos.xml?channel_id=UC3In1x9H3jC4JzsIaocebWg"
channel: # plugin for monitoring Youtube channel by parsing web page
entities:
- name: "subscriptions"
url: "https://www.youtube.com/feed/subscriptions"
cookies_file: "cookies.txt"
update_interval: 900
community: # plugin for monitoring Youtube community posts
entities:
- name: "ChannelName"
url: "https://www.youtube.com/@ChannelName/community"
cookies_file: "cookies.txt"
# Filters, filter or transform data
filter.channel: # check that Youtube url has specific properties (such as being live or member-only)
entities:
- name: "subs live"
live: true
- name: "subs scheduled"
upcoming: true
# Actions, do something with incoming data
execute: # run predefined command template filled with received data
entities:
- name: "archive"
command: "ytarchive --threads 3 --wait {url} best"
working_dir: "archive/livestreams/{author}/"
to_file: # write data to text file
entities:
- name: "ChannelName"
path: "archive/community/ChannelName/"
filename: "{post_id}.txt"
discord.hook: # send notification to Discord channel
entities:
- name: "my-server#announcements"
url: "https://discord.com/api/webhooks/1176072251045217473/N-tDdv_iIZnUl6I67GcWqmO0GlNDgCBRYTYf2Z-lfUsLk0HcvvK-i0thuPXiigXcB6h6"
# Mandatory top-level "chains" section declares sequences
# [monitors] -> [filters] -> [action] defining combinations
# of input and output plugins achieving desired workflows.
chains:
# Each chain must have arbitrary but unique name.
# It lists sequence of plugins, referencing names
# of its entities, as defined in "actors" section.
# from subscription feed pick ongoing and future livestreams and send to Discord
"subscribtions":
- channel:
- "subscriptions"
- filter.channel:
- "subs live"
- "subs scheduled"
- discord.hook:
- "my-server#announcements"
# store new community posts on Youtube channel to text file
"community posts":
- community:
- "ChannelName"
- to_file:
- "ChannelName"
# run "ytarchive ..." with url of every new upload of Youtube channel
"archive":
- rss:
- "ChannelName"
- "AnotherChannelName"
- execute:
- "archive"