Create a gist now

Instantly share code, notes, and snippets.

@thedod /README.md forked from anonymous/README.md
Last active Aug 29, 2015

Cron kludge for #xbmc #fourtwenty ticker

This tweak lets you see a ticker based on the https://zzzen.com/420's feed, but with shorter phrasing (to minimize the damage of XBMC's merciless title truncation).

  • Run these cron lines on a machine that serves static pages at /PATH/TO/STATIC/WEB/FOLDER/ (you can even do this on the xbmc machine itself).
  • add the url of 420.rss as an RSS source. Update every minute (it's a cheap operation).

Enjoy

screenshot

Wallpaper credit: Ann Nocenti and Sean Phillips (Kid Eternity, issue #6, 1993).

5 * * * * curl https://www.zzzen.com/420/420.rss | sed -e 's/Get ready for #fourtwenty/Prepare for 16:20/' -e 's/and other fine places/etc/' > /PATH/TO/STATIC/WEB/FOLDER/420.rss
21 * * * * cd /PATH/TO/STATIC/WEB/FOLDER; mv 420.rss was-420.rss; sed "s/Prepare for/Just had/" < was-420.rss > 420.rss
42 * * * * cd /PATH/TO/STATIC/WEB/FOLDER; mv 420.rss was-420.rss; sed "s/Just had/Way past/" < was-420.rss > 420.rss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment