forked from eggtcl/rss-synd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
167 lines (128 loc) · 6.76 KB
/
README
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
################################################################################
README
################################################################################
================================================================================
INSTALL
================================================================================
1. Copy rss-synd.tcl and rss-synd-settings.tcl to your scripts directory.
2. Add "source scripts/rss-synd.tcl" to your eggdrop.conf file.
Dependencies (for additional features)
This script will run perfectly fine without any of these dependencies, but
if you want any of these features you'll need to download and install the
respective package(s).
* HTTP Authorisation
** Requires: base64 package from tcllib to be installed.
** URL: http://tcllib.sourceforge.net/
** FreeBSD: cd /usr/ports/devel/tcllib/ && make install clean
** RedHat: yum install tcllib
* HTTPS
** Requires: TLS package to be installed.
** URL: http://www.sensus.org/tcl/
** FreeBSD: cd /usr/ports/devel/tcltls/ && make install clean
* Gzip Decompression:
** Requires: Trf package to be installed.
** URL: http://tcltrf.sourceforge.net/
** FreeBSD: cd /usr/ports/devel/tcl-trf/ && make install clean
** RedHat: yum install tcl-trf
================================================================================
SETTINGS
================================================================================
Follow the details below. It is possible to define values in either the
default variable or within the individual rss feed variables. You can define
values in both places, but each feeds individual settings will overwrite the
default ones.
Required values:
url The URL of the RSS/ATOM feed.
Example: http://www.example.tld/feed.xml
https://www.example.tld/feed.xml
http://username:[email protected]/feed.xml
channels List of channels the feed (and trigger) are to be active in.
(Use space to separate multiple channels)
database Full (or relative from your eggdrops path) path to where you
want to store the database file.
Example: ./scripts/feedname.db
output The format you would like the RSS to be outputted to you
channel in.
max-depth Maximum amount of times the script should follow Location:
headers. Keep this relatively low.
Default: 5
timeout Timeout of connections (in milliseconds).
Default: 60000
user-agent User agent to send in the http request.
announce-type How you want the announce updates to be sent to your
channels.
Options:
0 = Message Channel
1 = Notice Channel
Default: 0
announce-output Maximum articles to output to channel on announce. Setting this
to 0 will silence the automatic output.
Default: 3
trigger-type How you want the trigger replies to be sent when triggered
both in channel and via private message.
The format is: <channel>:<privmsg>
Options:
0 = Message Channel
1 = Notice Channel
2 = Message User
3 = Notice User
Default: 0:2
trigger-output Maximum articles to output when triggered. Setting this to 0 will
silence the trigger output.
Default: 3
update-interval How often (in minutes) you want the feed to be checked. Try
and keep this number sensible, something above 15 minutes.
Some websites will ban you for hammering their feeds.
Default: 30
Optional values:
trigger Public trigger to list feeds. (if you only want to define it
once in default use @@feedid@@, this will be replaced by
each individual feeds id)
evaluate-tcl Evaluate the output before sending it to channel.
Default: 0 (Off)
enable-gzip Enable gzip decompression for this feed.
Default: 0 (Off)
remove-empty Remove empty cookies from the output.
Default: 1 (On)
output-order The order you want the articles to be announced in channel.
Options:
0 = Ascending (Oldest -> Newest)
1 = Descending (Newest -> Oldest)
charset This is the charset you want the feed to be outputted using.
The default charset is what your local system charset is set
to use. In most cases, if you're having problems with output
just use utf-8.
Example: utf-8
cp1251
iso8859-1
feedencoding This is the charset the feed is in. (look in the sourcecode
it is usualy mentioned in the <?xml> header. Please note that
Tcl uses other encoding names, esp. the Windows-xxx encodings.
In Tcl they are named cpxxx.
Cookies:
Output works on a cookie system, in this case its dynamic so it depends on
what data the feed contains as to what you can output.
As of version 0.3 you are able to reference any tag within each article, or
if you really want the whole feed. The format is @@<tag>!<subtag>!...@@,
@@item@@ and @@entry@@ cookies are 'shortcuts' and will always point to the
current article. If you wish to output an attribute of a tag you can do that
by using the attribute name with an = in front of it
(eg: @@entry!link!=href@@). This would get the 'href' attribute from the
<link> tag. Refer to rss-synd.tcl for more examples.
================================================================================
FAQ
================================================================================
Q: The output to my channel has a lot of random \'s everywhere.
A: set the 'eval-tcl' option to 0 (off).
Q: My feeds announce all the articles in the feed, not just the news ones.
A: You've either used the same database file for two feeds, or there isnt one
set that's working. Make sure the path where your putting your files is
writable!
Q: The output to my channel has the annoying cookies still in it.
A: set the 'remove-cookies' option to 1 (on)
Q: I cant see what cookies are wrong! what can I do?
A: set the 'remove-cookies' option to 0 (off)
Q: The feed wont work properly and I'm not sure why!
A: Make sure the feed is valid check it with http://feedvalidator.org/. If the
feed has errors, it probably wont work.
EOF