Cartoons


Cartoons is a standalone Java application that makes it easy to download your favorite comic strips to your computer. It currently supports 232 comic strips. The application will save each comic as a graphic file (locally) and then build an index.html file with a link to each graphic. Finally, the application will display that index.html file in an HTML window.

I wrote this program because visiting the web site for each comic strip was too time-consuming, and this program reduces it to a single command to download the images and view them locally. To run the program, Java 5 is required. Use this command to execute the application:

  java -jar cartoons.jar
The program has the following command-line options:
  • -comic=<comic name>: The name of the comic strip (or group of strips) to download. If specified, this option will override the "download" property in the INI file (see below).
  • -listall: List the long and short name of all comics found in the INI file and exit
  • -ini=<INI file name>: The path and name of the INI file. This defaults to ./cartoons.ini, and is usually sufficient.
  • -d=[<MMDDYYYY>|yesterday]: The date to download comic strips for. The default is today. To retrieve yesterday's strips, use -d=yesterday. To retrieve for, say, June 10th, 2006, use -d=06102006. Note: Most strips have restrictions on downloading older comics (30 days is common).
  • -v: Verbose mode; gives details on the current action
  • -?, --help: Print out usage information and exit

The INI file makes available the following options:

  • output-dir: The main output directory; the directory that the strips will be placed in is this directory, followed by a slash and the date the strips were downloaded for. So, if comic strips for June 10th, 2006 were downloaded, the output directory would be <output-dir>\06102006\.
  • template: The template file. This is the template for the index.html file that is generated and contains links to the local copy of the strips. The usual value for this is ./template.htm. The distribution includes this file, and can be edited if you wish.
  • open-index-file: This will have a value of 0 (zero) or 1 (one). If it's 1, then after processing is complete, the program will open the generated index.html file and display it in a web browser window. A Java class that supports displaying HTML is used, so it should work on any windowing platform. If you do not want the window to appear, set this option to 0.
  • download: This is the list (space-delimited) of strips to download. The items in the list are the abbreviated name for each strip (see below). To download, say, Dilbert and Gil Thorp, use this value: "download=dilbert gilthorp". The software also supports strip groups, explained in more detail below.

If you want to specify many strips to download, then a good way to specify them all is to use a strip group. To do this, create a new section in the INI file; the section name will be the strip group name and can be anything you'd like, other than the name of a strip. Add the property "type=group" to the section, and specify the strips to include in the group in the "include" property, and you're done. The value for the "include" property can be either a space-delimited list of groups (using their abbreviated names), or references to other lists, preceded by a '%'. Then, the value for the download property will be the name of your strip group. For example, here is one way to specify five different strips:

  [Application]
download=favorites

[favorites]
type=group
include = adamhome candorville dilbert doonesbury foxtrot
For the sake of brevity, I'm excluding the other options in the "Application" section that were described above. Here, the "download" property has a value of "favorites", so there's a group named "favorites". Its type is group, and the "include" property has the list of strips to download. If there are many strips to download, then you can use the %-reference method:
  [Application]
download=favorites

[favorites]
type=group
include = %group1 %group2 %group3
group1 = adamhome candorville dilbert doonesbury forbetterorforworse foxtrot
group2 = frazz getfuzzy outofthegenepool herman mrboffo mutts nonsequitur
group3 = overthehedge theothercoast overboard pearlsbeforeswine
It's not as complicated as the above description may make it seem, so read the INI file and send me an e-mail if you have any questions.

When getting started with the program, all you typically need to do is open the cartoons.ini file and edit the values for the "output-dir" and "download" properties in the "Application" section. The comic strip web sites will sometimes change their web protocol, but as of July, 2006, all of the strips listed below can be downloaded successfully.

Part of the code is copyright 2004 David Flanagan. I use the HttpClient class he wrote for his Java Examples In A Nutshell book (published by O'Reilly).

Here is the list of supported comic strips, with the name of each strip followed (in parentheses) by its abbreviated name:

  (th)ink (think)
9 Chickweed Lane (9chickweedlane)
9 to 5 (9to5)
A Case in Point (acaseinpoint)
Adam@Home (adamhome)
Agnes (agnes)
Alley Oop (alleyoop)
Andy Capp (andycapp)
Animal Crackers (animalcrackers)
Annie (annie)
Arlo and Janis (arloandjanis)
Ask Shagg (askshagg)
B.C. (bc)
Bad Reporter (badreporter)
Baldo (baldo)
Ballard Street (ballardstreet)
Barkeater Lake (barkeaterlake)
Barney Google (barneygoogle)
Beetle Bailey (beetlebailey)
Ben (ben)
Better Half (betterhalf)
Betty (betty)
Big Nate (bignate)
Big Top (bigtop)
Biographic (biographic)
Bizarro (bizarro)
Blondie (blondie)
Bloom County (bloomcounty)
Bo Nanas (bonanas)
Bob the Squirrel (bobthesquirrel)
Bottomliners (bottomliners)
Bound and Gagged (boundandgagged)
Brainwaves (brainwaves)
Brenda Starr (brendastarr)
Brevity (brevity)
Brewster Rockit (brewsterrockit)
Broom Hilda (broomhilda)
Buckles (buckles)
Calvin and Hobbes (calvinandhobbes)
Candorville (candorville)
Captain Murphey (captainmurphey)
Cathy (cathy)
Cats with Hands (catswithhands)
Cest la Vie (cestlavie)
Cheap Thrills (cheapthrills)
Citizen Dog (citizendog)
Clear Blue Water (clearbluewater)
Cleats (cleats)
Close to Home (closetohome)
Committed (committed)
Computoon (computoon)
Cornered (cornered)
Cow and Boy (cowandboy)
Crock (crock)
Curtis (curtis)
Deep Cover (deepcover)
Dennis the Menace (dennisthemenace)
Dick Tracy (dicktracy)
Dilbert (dilbert)
Dog Eat Doug (dogeatdoug)
Domestic Abuse (domesticabuse)
Doodles (doodles)
Doonesbury (doonesbury)
Drabble (drabble)
F Minus (fminus)
Farcus (farcus)
Fat Cats Classics (fatcatsclassics)
Ferd'nand (ferdnand)
Fifth Wave (fifthwave)
Flight Deck (flightdeck)
Flo and Friends (floandfriends)
For Better or For Worse (forbetterorforworse)
For Heaven's Sake (forheavenssake)
FoxTrot (foxtrot)
Frank and Ernest (frankandernest)
Frazz (frazz)
Fred Basset (fredbasset)
Funky Winkerbean (funkywinkerbean)
Garfield (garfield)
Gasoline Alley (gasolinealley)
Geech Classics (geechclassics)
Get Fuzzy (getfuzzy)
Gil Thorp (gilthorp)
Ginger Meggs (gingermeggs)
Girls and Sports (girlsandsports)
Go Fish (gofish)
Graffiti (graffiti)
Grand Avenue (grandavenue)
Grin and Bear It (grinandbearit)
Hagar the Horrible (hagarthehorrible)
Heart of the City (heartofthecity)
Heathcliff (heathcliff)
Herb and Jamaal (herbandjamaal)
Herman (herman)
Hi and Lois (hiandlois)
Housebroken (housebroken)
Hubert and Abby (hubertandabby)
Idiot Box (idiotbox)
In the Bleachers (inthebleachers)
Ink Pen (inkpen)
James Bond (jamesbond)
Jane's World Classics (janesworldclassics)
Judge Parker (judgeparker)
Jump Start (jumpstart)
Kit 'N' Carlyle (kitncarlyle)
Kudzu (kudzu)
La Cucaracha (lacucaracha)
Li'l Abner Classics (lilabnerclassics)
Liberty Meadows (libertymeadows)
Lio (lio)
Little Dee (littledee)
Lockhorns (lockhorns)
Lola (lola)
Loose Parts (looseparts)
Lost Sheep (lostsheep)
Luann (luann)
Lucky Cow (luckycow)
Mallard Fillmore (mallardfillmore)
Mark Trail (marktrail)
Marmaduke (marmaduke)
Marvin (marvin)
Mary Worth (maryworth)
Minimum Security (minimumsecurity)
Moderately Confused (moderatelyconfused)
Momma (momma)
Monty (monty)
Mother Goose and Grimm (mothergooseandgrimm)
Motley Classics (motleyclassics)
Mutt and Jeff (muttandjeff)
Mutts (mutts)
Nancy (nancy)
Natural Selection (naturalselection)
Nest Heads (nestheads)
NEUROTICA (neurotica)
Non Sequitur (nonsequitur)
Off The Mark (offthemark)
On a Claire Day (onaclaireday)
On the FastTrack (onthefasttrack)
One Big Happy (onebighappy)
One Big Happy Classics (onebighappyclassics)
Opus (opus)
Out of the Gene Pool (outofthegenepool)
Over the Hedge (overthehedge)
Overboard (overboard)
Pardon My Planet (pardonmyplanet)
PC and Pixel (pcandpixel)
Peanuts (peanuts)
Pearls Before Swine (pearlsbeforeswine)
Phantom (phantom)
Pibgorn (pibgorn)
Pickles (pickles)
Piranha (piranha)
Pluggers (pluggers)
Pooch Cafe (poochcafe)
Pop Culture (popculture)
Popeye (popeye)
PreTeena (preteena)
Prickly City (pricklycity)
Raising Duncan (raisingduncan)
Real Life Adventures (reallifeadventures)
Reality Check (realitycheck)
Red and Rover (redandrover)
Red Meat (redmeat)
Retail (retail)
Rex Morgan (rexmorgan)
Reynolds Unwrapped (reynoldsunwrapped)
Rhymes with Orange (rhymeswithorange)
Ronaldinho Gaucho (ronaldinhogaucho)
Rose Is Rose (roseisrose)
Rubes (rubes)
Rudy Park (rudypark)
Safe Havens (safehavens)
Sheldon (sheldon)
Shermans Lagoon (shermanslagoon)
Shirley And Son Classics (shirleyandsonclassics)
Shoe (shoe)
Shoecabbage (shoecabbage)
Silo Roberts (siloroberts)
Six Chix (sixchix)
Slowpoke (slowpoke)
Small World (smallworld)
Soup To Nutz (souptonutz)
Speed Bump (speedbump)
Spot The Frog (spotthefrog)
State of the Union (stateoftheunion)
Stone Soup (stonesoup)
Strange Brew (strangebrew)
Sutton Impact (suttonimpact)
Sylvia (sylvia)
Tank McNamara (tankmcnamara)
Tarzan Classics (tarzanclassics)
Teenage Mutant Ninja Turtles (teenagemutantninjaturtles)
That's Life (thatslife)
The Boondocks (theboondocks)
The Born Loser (thebornloser)
The Buckets (thebuckets)
The City (thecity)
The Dinette Set (thedinetteset)
The Duplex (theduplex)
The Elderberries (theelderberries)
The Flying McCoys (theflyingmccoys)
The Fusco Brothers (thefuscobrothers)
The Grizzwells (thegrizzwells)
The Humble Stumble (thehumblestumble)
The K Chronicles (thekchronicles)
The Meaning of Lila (themeaningoflila)
The Middletons (themiddletons)
The Other Coast (theothercoast)
The Pink Panther (thepinkpanther)
The Quigmans (thequigmans)
The Sunshine Club (thesunshineclub)
They'll Do It Every Time (theylldoiteverytime)
Through Thick and Thin (throughthickandthin)
Tiger (tiger)
Tina's Groove (tinasgroove)
Tiny Sepuku (tinysepuku)
Tom the Dancing Bug (tomthedancingbug)
Too Much Coffee Man (toomuchcoffeeman)
Trevor (trevor)
Triple Take (tripletake)
Tumbleweeds (tumbleweeds)
Watch Your Head (watchyourhead)
Waylay (waylay)
Wee Pals (weepals)
Wizard of Id (wizardofid)
Working Daze (workingdaze)
Working It Out (workingitout)
Yenny (yenny)
Zack Hill (zackhill)
Ziggy (ziggy)
Zippy the Pinhead (zippythepinhead)
Zits (zits)

The application can be downloaded here.

The source code and build script can be downloaded here. It is released under the MIT license.

ċ
cartoons-src.zip
(46k)
Michael Wallace,
Jul 4, 2009, 12:27 PM
ċ
cartoons.zip
(27k)
Michael Wallace,
Jul 4, 2009, 12:26 PM
Comments