Garfield comic strip downloader
This is a shell script that allows you to download Garfield comic strips from the official site.
Requirements
- php5-cli
- wget
Tested on Linux, probably will work on other platforms supported by php-cli and wget as well. Your shell should support UTF-8 for this script to work flawlessly.
The script (version 1.0.2)
ckgarfdl.php (line 1)
- #!/usr/bin/php -q
- <?php
- $VeryFirstDay="19780619"; //the date of the first Garfield comic strip
- $PrintErrorMsg=False;
- if(($_SERVER["argc"] <= 1) || (($_SERVER["argc"] == 2) && ($_SERVER["argv"][1] == "help")))
- {
- $IsOkayToDownload=False;
- }
- elseif($_SERVER["argc"] == 2)
- {
- if($_SERVER["argv"][1] == "all")
- {
- $StartDay=$VeryFirstDay;
- $EndDay=$CurrentDay;
- $IsOkayToDownload=True;
- }
- else
- {
- $PrintErrorMsg=True;
- $IsOkayToDownload=False;
- }
- }
- elseif($_SERVER["argc"] == 3)
- {
- {
- $IsOkayToDownload=True;
- }
- else
- {
- $PrintErrorMsg=True;
- $IsOkayToDownload=False;
- }
- }
- elseif($_SERVER["argc"] > 3)
- {
- $PrintErrorMsg=True;
- $IsOkayToDownload=False;
- }
- if($PrintErrorMsg==True)
- {
- }
- if($IsOkayToDownload==True)
- {
- $PlusDays = 0;
- {
- $PlusDays++;
- }
- }
- ?>
Just click grab to save the file, or copy&paste it yourself to your favorite editor. Remember to add executable permissions.
License

This program is under the CC-GNU GPL, version 2.0 or later.
Garfield © 2007 Paws
There are no comments on this page. [Add comment]