Snippet Library

Browse | Submit A New Snippet | Create A Package

daily comic strip

Type:
Full Script
Category:
HTML Manipulation
License:
GNU General Public License
Language:
Unix Shell

Description:
a simple shell script to get the latest comics of you favourite internet comics

Versions Of This Snippet:

Snippet ID Download Version Date Posted Author Delete
231.02009-04-28 18:08Andreas Marschke

Download a raw-text version of this code by clicking on "Download Version"

 


Latest Snippet Version: 1.0

#!/bin/bash day=$(date +%d) month=$(date +%m) year=$(date +%Y) ############################ #The userfriendly.org comic# ############################ ufie_datecode="$year$month$day" cd /tmp/ ufie_base=http://ars.userfriendly.org/cartoons/?id="$ufie_datecode" ufie_img=$(wget $ufie_base -O- 2>/dev/null | grep "http://www.userfriendly.org/cartoons/archives/09apr") ############################ # PHD.com # ############################ phd_base=http://www.phdcomics.com/comics.php phd_img=$(wget $phd_base -O- 2>/dev/null | grep "http://www.phdcomics.com/comics/archive/" | cut -d\" -f4) ############################ # Penny Arcade # ############################ pa_base_url=http://www.penny-arcade.com pa_url=$pa_base_url/comic/$(date +%Y)/$(date +%-m)/$(date +%-d) pa_img=$pa_base_url$(wget $pa_url -O- 2>/dev/null | grep simplebody | cut -d\" -f4) ############################ # XKCD # ############################ xkcd_base_url=http://xkcd.com xkcd_img=$(wget $xkcd_base_url -O- 2>/dev/null | grep "<img src=\"http://imgs.xkcd.com/comics/") ############################ # Cyanide and happiness # ############################ cah_base_url=http://www.explosm.net/comics/ cah_img=$(wget $cah_base_url -O- 2>/dev/null | grep "<img alt=\"Cyanide and Happiness, a daily webcomic\" src=\"http://www.explosm.net/db/files/" | cut -d"<" -f51) ############################ # theWAREHOUSE # ############################ wh_baseurl=http://www.warehousecomic.com/ wh_img=$wh_baseurl$(wget $wh_baseurl -O- 2>/dev/null | grep "<img src=\"comic/theWAREHOUSE_comic_" | cut -d\" -f2) ############################ # chainsawsuit # ############################ chainsaw=http://chainsawsuit.com chainsaw_img=$(wget $chainsaw -O- 2>/dev/null | grep "<img id=\"comic\"" | cut -d\" -f12) ############################ # FULL FRONTAL NERDITY # ############################ ffn=http://nodwick.humor.gamespy.com/ffn/ ffn_img=$(wget $ffn -O- 2>/dev/null | grep "http://nodwick.humor.gamespy.com/ffn/strips/" | cut -d"<" -f4) ############################ # amazing super powers # ############################ asp=http://www.amazingsuperpowers.com/ asp_img=$(wget $asp -O- 2>/dev/null | grep "<img src=\"COMIC" | cut -d\" -f2) echo "<html><body>" $ufie_img "<br>" $phd_img " <br> <img src=\""$pa_img\""><br>"$xkcd_img"<br><"$cah_img "<br> <img src=\""$wh_img"\"><br><img src=\""$chainsaw$chainsaw_img"\"><br><"$ffn_img "<br><img src=\""$asp$asp_img"\"></body></html>" > /tmp/comic.htm ############################ firefox /tmp/comic.htm #rm /tmp/comic.htm

Submit a new version

You can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others..

Powered By FusionForge