Mercurial > hg > egg-tcls
annotate config.feeds.example @ 484:35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
configuration file config.feeds as a callback function, which is
run by fetch_feeds.tcl
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 29 Oct 2019 15:29:15 +0200 |
parents | e5a9aaf250b3 |
children | eb9921ae5c7a |
rev | line source |
---|---|
265
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ########################################################################## |
266 | 2 # |
3 # Feeds script and fetcher script configuration | |
4 # | |
265
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 ########################################################################## |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 # SQLite3 database |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 set feeds_dbfile "/home/niinuska/bot/feeds.sqlite" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 |
484
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
11 # Callback for fetching the feeds data |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
12 proc feeds_fetch { } { |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
13 #fetch_poliisi "http://www.poliisi.fi/oulu/tiedotteet/1/0?all1/0" "Poliisi/Oulu" "http://www.poliisi.fi" |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
14 |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
15 fetch_halla_aho |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
16 |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
17 fetch_adventurers |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
18 |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
19 fetch_oots |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
20 |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
21 add_rss_feed "https://effi.org/feed/" "EFFI" "" |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
22 } |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
23 |
35d7be5db18b
fetch_feeds: Move the actual calling of fetching functions to the
Matti Hamalainen <ccr@tnsp.org>
parents:
362
diff
changeset
|
24 |
265
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 # How often to check for newly added feed items from the database? |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 # (in minutes) This has nothing to do how often the backend script |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 # is run and actually scans / pulls the feeds, that is done in CRON. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 # See get_feeds.tcl for more information. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 set feeds_check_period 5 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 |
351
0f55bbb7fea3
feeds: Improve safety checks and add new configuration setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
266
diff
changeset
|
32 # Limit / number of new feed items allowed to be published |
0f55bbb7fea3
feeds: Improve safety checks and add new configuration setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
266
diff
changeset
|
33 # after which situation is considered unsynchronized / spam and |
0f55bbb7fea3
feeds: Improve safety checks and add new configuration setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
266
diff
changeset
|
34 # none of the new items are published. |
362
e5a9aaf250b3
feeds: Lower the default feeds item limit value in example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents:
351
diff
changeset
|
35 set feeds_sync_limit 10 |
351
0f55bbb7fea3
feeds: Improve safety checks and add new configuration setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
266
diff
changeset
|
36 |
0f55bbb7fea3
feeds: Improve safety checks and add new configuration setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
266
diff
changeset
|
37 |
265
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 # Set channels and feed filters here: |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 # "#channel" "feedname|feedname2" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 # feednames can use matching, e.g. "mtv3*" would match all beginning with "mtv3" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 array set feeds_channels { |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 "#mazmlame" "the adventurers|oots|mestari|blastwave" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 "#fireball" "mestari" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 "#tnsp" "the adventurers|oots|mestari" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 } |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 set feeds_preferredmsg "PRIVMSG" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 ### |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 ### HTTP options |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 ### |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 # Set to 1 if you want to enable use of HTTP proxy. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 # If you do, you MUST set the proxy settings below too. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 set http_use_proxy 0 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 # Proxy host and port number (only used if enabled above) |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 set http_proxy_host "" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 set http_proxy_port 8080 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 # Enable TLS/SSL support. You need to set http_tls_cadir. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 set http_tls_support 1 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 set http_tls_cadir "/usr/share/ca-certificates/mozilla" |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
66 # Set 'user agent' string for HTTP. If empty or not set, default will be used. |
908edc54005a
feeds: Move configuration to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
67 #set http_user_agent "Mozilla" |