Skip to content

Instantly share code, notes, and snippets.

@thedod
Forked from anonymous/README.md
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedod/ec8e149bdcb4c4d194f3 to your computer and use it in GitHub Desktop.
Save thedod/ec8e149bdcb4c4d194f3 to your computer and use it in GitHub Desktop.
Cron kludge for #xbmc #fourtwenty ticker

This tweak lets you see a ticker based on the [https://zzzen.com/420](global 4:20pm clock)'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