Skip to content

Instantly share code, notes, and snippets.

@ceafin
ceafin / newComicBG.sh
Created January 13, 2016 21:05
I wanted to pull down the Spanish and English daily comic of Calvin and Hobbes from GoComics.com. This tiny script will pull down the GIF images, use ImageMagick to stack them, and then set the new graphic as the background wallpaper. I use gsettings for the Cinnamon DE for setting the background.
#!/bin/bash
# Script to pull comic and set as background each morning/login.
GRABES=`curl -s http://www.gocomics.com/espanol/calvinandhobbesespanol | grep -oP "http://assets\.amuniversal[^\"]*\" width=\"600\"" | awk -F\" '{print $1}'`
GRABEN=`curl -s http://www.gocomics.com/calvinandhobbes | grep -oP "http://assets\.amuniversal[^\"]*\" width=\"600\"" | awk -F\" '{print $1}'`
wget -O /home/<USER>/Pictures/newComicBGes.gif $GRABES
wget -O /home/<USER>/Pictures/newComicBGen.gif $GRABEN
convert /home/<USER>/Pictures/newComicBGes.gif /home/<USER>/Pictures/newComicBGen.gif -append /home/<USER>/Pictures/newComicBG.gif

Keybase proof

I hereby claim:

  • I am ceafin on github.
  • I am ceafin (https://keybase.io/ceafin) on keybase.
  • I have a public key whose fingerprint is F1E6 5C4F 66D6 9250 42BC 0239 B91A 4816 FE5F 429F

To claim this, I am signing this object: