-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoots.rb
27 lines (25 loc) · 878 Bytes
/
oots.rb
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
#
# Script to generate an Order of the Stick (http://www.giantitp.com/comics/oots.html) feed.
#
# Author: Dirceu Pereira Tiegs <[email protected]>
#
# You can see the result on http://dirceu.info/oots.xml.
#
require 'rssify'
rssify do
{
:filename => 'oots.xml',
:home => 'http://www.giantitp.com/comics/oots.html',
:title => 'The Order of the Stick',
:description => 'Unofficial OOtS feed by Dirceu Pereira Tiegs - http://dirceu.info',
:templates => {
:title => 'OOtS #{next_item}',
:link => 'http://www.giantitp.com/comics/oots#{next_item}.html',
},
:procs => {
:body => Proc.new {|s| "<p><img src='http://www.giantitp.com/" + s.scan(/(\/comics\/images\/.+.gif)/)[0][0] + "' /></p>" },
:next_item => Proc.new { |next_item| "0#{next_item.to_i}" if next_item.to_i < 1000 },
},
:initial_item => ARGV[0],
}
end