Skip to content

Instantly share code, notes, and snippets.

@dirceu
Created October 17, 2008 00:08
Show Gist options
  • Save dirceu/17310 to your computer and use it in GitHub Desktop.
Save dirceu/17310 to your computer and use it in GitHub Desktop.
#
# Script to generate a Malvados (http://www.malvados.com.br) feed.
#
# Author: Dirceu Pereira Tiegs <[email protected]>
#
# You can see the result on http://dirceu.info/malvados.xml.
#
require 'rssify'
rssify do
{
:filename => 'malvados.xml',
:home => 'http://www.malvados.com.br/',
:title => 'Malvados - Quadrinhos de Humor',
:description => 'Unofficial Malvados feed by Dirceu Pereira Tiegs - http://dirceu.info',
:templates => {
:title => 'Malvados #{next_item}',
:link => 'http://www.malvados.com.br/index#{next_item}.html',
},
:procs => {
:body => Proc.new {|s| "<p><img src='http://www.malvados.com.br/" + s.scan(/(tirinha\d+.gif)/)[0][0] + "' /></p>" },
:next_item => Proc.new { |next_item| next_item },
},
:initial_item => ARGV[0],
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment