#!/bin/bash

source /home/gmgall/python_venvs/newslinkrss/bin/activate

newslinkrss -p '.*/~lettuce/.*' -a '([0-9]{4}-[0-9]{2}-[0-9]{2}) - .*' --text-date-fmt '%Y-%m-%d' --follow --require-dates --with-body 'https://ctrl-c.club/~lettuce/' --title '~lettuce posts on ctrl-c.club' --title-regex '/home/lettuce/public_html/(.*)' -o /home/gmgall/public_html/feeds/lettuce.xml

newslinkrss -p '.*/~FikaMedHasse/blogposts/.*' --follow --with-body 'https://ctrl-c.club/~FikaMedHasse/blog.html' --body-remove-csss 'header' --body-remove-csss 'footer' --title '~FikaMedHasse posts on ctrl-c.club' -o /home/gmgall/public_html/feeds/FikaMedHasse.xml

newslinkrss -p '.*/~gome/journal/.*' -i '.*/~gome/journal/rss/.*' -i '.*/~gome/journal/page*' --body-remove-csss '#header' 'https://ctrl-c.club/~gome/journal/' --csss-date-regex '([0-9]{2} [A-z]{3} [0-9]{4}), .*' --date-from-csss 'time' --csss-date-fmt '%d %b %Y' --follow --with-body --title '~gome posts on ctrl-c.club' --encoding 'utf-8' -o /home/gmgall/public_html/feeds/gome.xml

newslinkrss -p '.*/~chiptune/blog/.+' -i '.*/~chiptune/blog/feed.rss' 'https://ctrl-c.club/~chiptune/blog/' --date-from-xpath '//@datetime' --xpath-date-fmt '%Y-%m-%dT00:00:00+00:00' --follow --with-body --title '~chiptune posts on ctrl-c.club' --title-regex '.+ - (.*)' --body-csss 'article' -o /home/gmgall/public_html/feeds/chiptune.xml

newslinkrss -p '.+/~nodisc/[0-9]{4}-[0-9]{2}-[0-9]{2}_.+.html' --follow --date-from-text '([0-9]{4}-[0-9]{2}-[0-9]{2})[_ ].*' --text-date-fmt '%Y-%m-%d' 'https://ctrl-c.club/~nodisc/articulos.html'  --encoding 'utf-8' --with-body --title '"Artículos" section of ~nodisc' -o /home/gmgall/public_html/feeds/nodisc.xml

newslinkrss -p '.*/~chickfilla/p/[0-9]{8}/.*' --date-from-url '.*/p/([0-9]{8})/.*' --url-date-fmt '%Y%m%d' --follow --with-body --title '~chickfilla posts on ctrl-c.club' --title-regex '[0-9]*: (.*)' 'https://ctrl-c.club/~chickfilla/'  -o /home/gmgall/public_html/feeds/chickfilla.xml

newslinkrss -p '.*/post[0-9]+.html' --follow --with-body 'https://ctrl-c.club/~i00nsu/' --encoding 'utf-8' --title '~i00nsu posts on ctrl-c.club' -o /home/gmgall/public_html/feeds/i00nsu.xml

newslinkrss -p '.+.html' -i '.+/index.html' --follow --with-body 'https://ctrl-c.club/~Triz3n/' --title '~Triz3n posts on ctrl-c.club' --body-remove-csss 'nav' -o /home/gmgall/public_html/feeds/Triz3n.xml

newslinkrss -p '.*/postits/.*.html' --follow --with-body 'https://ctrl-c.club/~sicbail/' --title '~sicbail posts on ctrl-c.club' --encoding 'utf-8' -o /home/gmgall/public_html/feeds/sicbail.xml

newslinkrss -p '.*.html' 'https://ctrl-c.club/~captaindrewboy/' --title '~captaindrewboy posts on ctrl-c.club' --date-from-text '.+, (.*)' --text-date-fmt '%dth %B %Y' --follow --with-body -o /home/gmgall/public_html/feeds/captaindrewboy.xml

newslinkrss -p '.+/~timemachine/[0-9]{4}/[0-9]{2}/[0-9]{2}/' 'https://ctrl-c.club/~timemachine/archives/' --date-from-url '.+/~timemachine/([0-9]{4}/[0-9]{2}/[0-9]{2})/.*' --title '~timemachine posts on ctrl-c.club' --follow --with-body --body-csss 'article' -o /home/gmgall/public_html/feeds/timemachine.xml

newslinkrss -p '.+/~beehiveth/entries/.+.html' 'https://ctrl-c.club/~beehiveth/' --follow --with-body --body-csss 'article' --title '~beehiveth posts on ctrl-c.club' --date-from-url '.+/~beehiveth/entries/(.+).html' --url-date-fmt '%d%m%y' --encoding 'utf-8' -o /home/gmgall/public_html/feeds/beehiveth.xml

newslinkrss \
	-p '.+/user/gmgall/checkin/[0-9]+' \
	--follow \
	--date-from-csss '.time' \
	--title-regex 'Guilherme is drinking a (.+) on Untappd' \
	--with-body \
	--body-csss '.checkin-info.pad-it' \
	'https://untappd.com/user/gmgall' \
	-o /home/gmgall/public_html/feeds/gmgall_untappd.xml

newslinkrss \
	-p '.+/noticia/[0-9]{4}/[0-9]{2}/.+html' \
	-i '.+/geral/.+' \
	--with-body \
	--body-csss '.article' \
	--follow \
	'https://gauchazh.clicrbs.com.br/pioneiro/ultimas-noticias/' \
	-o /home/gmgall/public_html/feeds/gauchazh.xml
