dailystrips-1.0.28/BUGS0100664000076500007650000000547107420121732014442 0ustar amedicoamedico1.0.21 12 Jan 2002 Script does not seem to work on Perl 5.0 due to parser 1.0.13 04 June 2001 The new feature seems to be ok. The only issue may be the escaping of > symbols in the code. I think I've handled it properly - let me know if there are any problems or if there's a better way. 15 May 2001 sfgate still isn't working right. They seem to have devised some way of only allowing strip images to be downloaded when you're actually looking at the webpage. It's more sophisticated that just checking the referer (which is already handled) - but I'm sure it will be figured out soon enough. 1.0.12 11 Mar 2001 Since the program does not keep track of which options you use when running in local mode, changing options from one day to the next (such as using --dailydir one day and --stripdir the next) will prevent it from being able to check for duplicates that time. Unless you switch options every day, though, this shouldn't really be a problem. When using the --date option, the program downloads strips that may not be for the correct day anyway (such as searching an index.html page, as opposed to a %Y%m%d.html page). The definitions should declare whether or not they can find a strip for a specific day, or just the latest one. - FIXED in 1.0.16 1.0.8 20 Feb 2001 Need better error handling with the LWP::UserAgent module (if there's a problem, report exactly *what* went wrong - proxy, etc..) The definition file parsing code needs to be re-thought and re-done. It works, but gets weird in places and is generally hard to maintain. One thing I should have mentioned for 1.0.4 is that the defs file parsing code gives completely erroneous line numbers (they represent the lines of the file after removing blank line and comment lines) and should be dealt with. - FIXED in 1.0.16 1.0.6 02 Feb 2001 It's not actually a bug in the program, but I'd like to advise users anyway that something is wrong at sfgate.com, so none of the strips from that site are available. (19 Feb 2001 - not surprisingly, all is well now) 1.0.4 26 Jan 2001: The definition file-parsing code, while it works fine on correctly formatted files, weird things may happen with improperly formatted files (most obvious problems are checked for, but not all may be caught). 1.0.0: 20 Jan 2001: The command-line option parsing stuff works for me, but it really isn't "right". For example, it's impossible to use --output with --local. Also, "--quiet" won't work completely if specified last. This section needs a complete rethink to operate optimally. - FIXED in 1.0.2 If an image doesn't download (404 error), but the remote webserver returns a custom 404 page, this 404 page gets saved as the image, causing a "broken" image. This should be detected. - FIXED in 1.0.1dailystrips-1.0.28/CHANGELOG0100644000076500007650000004563307722330217015200 0ustar amedicoamedico1.0.28 23 Mar 2003 Removed redundant def for "Funny Farm" Removed redundant defs for several strips. Fixed "Mister Boffo", added "P. S. Mueller" (Gene Spafford) Added "Dragon Tails" (Greg Hackmann) Fixed "PC and Pixel" (Jeff Brown) Fixed "Weyershausenwelt", "Quirit", "Perscheid", and "Harmbengen" (Soeren Gerlach) 28 May 2003 Fixed B-Bit Theater 29 May 2003 Added 'dailystrips-update' script to do automatic defs updates Personal definitions should now work on Windows 25 Jun 2003 Fixed "Queen of Wands" homepage King Features/SF Gate strips should be working now (fixed by using URL as Referer value if no Referer is provided) Added "pvpcurrent" and "brunothebanditcurrent", which stay in sync with their websites (The Doctor What) Fixed "8-Bit Theater" Fixed "Sherman's Lagoon" and "Dork Tower" (Eduardo Alvarez) Fixed "Zippy the Pinhead" (Uri Guttman) Added "Dicebox" (CJ Kucera) Added "Nothing Nice to Say" (Mike Schwartz) Fixed some typos in dailystrips-clean 17 Jul 2003 Fixed another referrer issue Fixed Zippy color definition 1 Aug 2003 Fixed the elusive "RedHat image corruption problem" (Jarrod Johnson) 8 Aug 2003 Added README.dailystrips-update file 23 Aug 2003 Fixed "As If" 24 Aug 2003 Fixed "John Cole", "Farley", "GPF", "Bob Lang", "Lowest Common Denominator", "Under the Lemon Tree", "Megatokyo", "Nip and Tuck", "Paul Nowak", "Pathetic Geek Stories", "Sexy Losers", "Kevin Tuma" Added support for multiple match parts in defs Removed "Unicorn Jelly", "US of Play", "Warped" 25 Aug 2030 Added "Ctrl+Alt+Del", "Tastes Live Gravel", "Instant Classic", "Geek Salad", "Comet 7", "Movie Punks", "Building 12", "Sarah and David" (Thomas Ritter) Fixed "Real Life" (Thomas Ritter) Added "Haiopeis" (Manuel Streuhofer) Fixed "Dr. Fun" (Joe Drew) Fixed "Mother Goose and Grimm" (Taylor Jacob) Added "Tira ecol de Bilo y Nano", "Tira ecol de Bilo y Nano (english)", "Gallego Y Rey", "Ricardo (El Mundo)", "Idigoras", "Zulet", "Elgar", "Pachi", "Amor es..." (Antonio Larrosa Jiménez) Removed redundant "Dwane Powell" def 1.0.27 24 Feb 2003 Added 180 new strips (Kim Scarborough) Fixed "Clan of the Cats", "Little Gamers" Added "Fleem", "Queen of Wands", "WIGU" (Kevin Fenzi) Added "Overdue" (Daniel Chudnov) 15 Mar 2003 Added "Ben Sargent", "Pat Oliphant" (J. Traub) Fixed "I Need Help" (J. Traub) Added 20 Assorted strips (J. Traub) Fixed "Bruno the Bandit" (Christian Rubbert) Added "Nicht Lustig" (Christian Rubbert) Added "Aford Turtle" and "Hackles" (Jesper Lindh) 16 Mar 2003 Fixed "Scary Go Round" 1.0.26 02 Jul 2002 Added "Achewood" 27 Aug 2002 Added strips "Death to the Extremist" (CJ Kucera), "Jack" (Anders Bruun Olsen) 29 Nov 2002 Fixed "As If!" 28 Dec 2002 Updated comicspage.com and creators.com strips and cleaned up misc. other strips 23 Feb 2003 Fixed "The Devil's Panties", "The Class Menagerie", "Diesel Sweeties", "Fans" 1.0.25 26 May 2002 Fixed sfgate strips 18 Jun 2002 Fixed Penny Arcade 21 Jun 2002 Fixed "Spooner" (Chris Hoover) Added "Underpower" and "Nekobox" (Josh Brand) Added "Perscheids Abgruende", "Harm Bengen's Alltagsskizzen", "Weyershausen", "Touche" (Soeren Gerlach) Added "Drawing a Crowd", "I Need Help", "On the Fast Track", "Pibgorn", "Safe Havens", and "Working Daze" (Ted Richards) dailystrips-clean can now remove obsolete entries from the archive.html file 27 Jun 2002 Fixed "Dorktower", "Penny Arcade", "Sexy Losers" 30 Jun 2002 Added "Marvin", Moved "Andy Capp", "BC", "Wizard of ID" to Washington Post (Kenneth Ballard) 1.0.24 24 Apr 2002 Moved definitions for strips that are no longer updated but which can still be downloaded for previous days to 'archive.def' (Badtech, Citizen Dog) 07 May 2002 Fixed a bug in the call to the dailystrips-clean script (Rene Weber) Added "Real Life", "Sheldon", "Weak-end Warriors" (Mike Schwartz) Fixed comicspage.com strips (Aaron D. Marasco) Removed "Professor Doodles" Fixed another file extension detection bug (Pat Lashley) 24 May 2002 Removed "Lupo Alberto", "Off Sides", "Rug Rats", "Basement Studio", "Crabby Road", "Not Quite Right", "Real Life", "Wandering Ones", "When I Grow Up", "That's Jake" Fixed "Pathetic Geek Stories", "Cute Wendy", "Mr. Chuck Show", "Zapiro", "Bobbins" Fixed comicspage.com strips to work on Sundays. Added several new strips (Marcie Alana Lovell) 1.0.23 02 Apr 2002 "Diesel Sweeties" fixed Disabled Liberty Meadows again "PC and Pixel" fixed (Jeff Brown) "Bottom Liners" restored "Brainbuzz" and "The Duplex" added (Robert Fleming) Typo in help fixed (Rene Weber) "Sexy Losers" fixed (Matt Hucke) "Swamp" added (David Findlay) install.pl updated to be more configurable Fixed bug with --stripnav option Removed "Wee Pals", "Dear Dudley", "Punc and Mark", "Spooner", "Jack Ohman" Fixed "Dork Tower", "Under the Lemon Tree" 04 Apr 2002 Fixed "The Norm" (Ryan T. Dean) 06 Apr 2002 Added "Something Positive" Added Melonpool (Ryan T. Dean) Fixed "8-Bit Theater" Cleaned some old junk out of the definitions file 16 Apr 2002 Fixed "Dork Tower", "Pathetic Geek Stories", "Zapiro", "Mac Hall" Fixed file-extension detection 18 Apr 2002 Added "Flem" (David S. Geirsson) 20 Apr 2002 Fixed "As If" 1.0.22 12 Jan 2002 Added 'Off the Mark' 13 Jan 2002 Typo in script fixed. Previously, if the script was run more than once in a day and downloading of a strip succeeded during one run but failed in the next, an error would be reported and the existence of a local strip file for the day was not considered. Now, for generate-type strips, the local file will be re-used if downloading fails at a later time. 14 Jan 2002 install.pl will now refuse to run on Win32 18 Jan 2002 Added strips "As If", "Nip 'N Tuck", "Under the Lemon Tree", and "Winter" (Elf M. Sternberg) 25 Jan 2002 On Win32, a copy of the output page (local mode) is now created as index.html 03 Feb 2002 Fixed Penny Arcade (Daniel M. Drucker) Added 'dailystrips-clean' script that will delete any files older than a specified number of days Fixed "The Class Menagerie" 10 Feb 2002 Removed 'Sexy Losers' 12 Feb 2002 Made number of retries configurable Fixed a few broken strips (Dorktower, Life So Rad, Winter) 16 Feb 2002 Fixed PC and Pixel, Liberty Meadows (Jeff Brown) Added "Bobbins" (Robert Jagger) 1.0.21 28 Oct 2001 Fixed --nostale option - code was there, but attempting to use it would result in a 'no such option' error. 11 Nov 2001 Fixed strips '8bit Theater' and 'Adventurers' (Martin Feeney) Fixed strip 'Diesel Sweeties' Fixed a bug in defs parsing where a lack of parentheses in searchpattern lines was not reported. Added strip 'Mr. Potato Head' (Tucker McLean) Fixed a problem with using both --nospaces and --stripdir Added strips 'Walky', 'Jackie's Fridge', 'Schlock Mercenary', and 'Unicorn Jelly' (Ted Berg) 12 Nov 2001 Fixed strip 'Avalon High' Now completely up to date with unitedmedia.com strips Fixed a bug in defs parsing where referencing of non-existant classes was not reported Now completely up to date with comicspage.com strips 02 Jan 2002 Fixed RPG World def Added strips greytown, slowwave, sexylosers, youdamnkid, houndshome, cutewendy, lifesorad, bigones (Rich Lafferty) Added 'artist' keyword to defs file Fixed freefalf def to work on Win32 12 Jan 2002 Fixed 'Avalon High' (again), 'Sexy Losers', 'Zippy the Pinhead', 'Adventurers', 'Freckles', 'Lil Abner', 'Kevin Tuma' Removed 'In2It Online' When running under --dailydir, no longer puts the HTML output in the dailydir directory since the IMG tags would be wrong from there anyway. 1.0.20 08 Oct 2001 Added spiderman, tuma, nowak, asay, lang, shelton (Jeff Brown) 14 Oct 2001 Made "matchpart 1" lines unnecessary Added elflife, elflifeadult, funnyfarm, ozyandmillie, suburbanjungle, acidreflux, whenigrowup (Jarrod Benjami Johnson) 16 Oct 2001 Added mechanism to automatically retry downloading bad links. Some webservers seem to be randomly returning bogus 404s on strip images, possibly with the intent of tripping up programs such as this. 26 Oct 2001 Fixed 8bit Theater, Diesel Sweeties Removed Adventurers, hotzp/Bad Boys of Computer Science (both gone) Added system-wide definitions (Rene Weber) Added --stripnav option to insert links for jumping to specific strips on a large page of comics (Joseph Blough) 27 Oct 2001 Added --nosymlinks, --titles options and links to archive on strip pages Added sevtrek, fotr, sevgate, bluffy, sevfiles, sevwars, sevylon5, sevscifi (Douglas Riga) 1.0.19 07 Sep 2001 Removed some Win32 code that no longer applied to anything 13 Sep 2001 Fixed Zapiro 21 Sep 2001 Added 16 new strips (Martin Feeney) 24 Sep 2001 Fixed Megatokyo Added Spaz Labs (JR Boyens) 26 Sep 2001 Added strip glasbergen 08 Oct 2001 Fixed sluggy to cover more days, still doesn't handle multi-image strips Added frazz, janesworld, bfriends; revised spooner, pcnpixel, thenorm (Chris Hoover) Fixed boasas, glasbergen, striptease 1.0.18 18 Aug 2001 Changed the behavior of the program to handle strips that don't get updated daily in a more intelligent manner. Now the most current strip possible is saved. By default, a strip that is the same as the previous day's is still displayed but the new '--nostale' option can be used to display an message in the HTML output instead when an updated strip is not available. Also, the --new option has been removed. 20 Aug 2001 Added a --lite option for outputting reduced HTML Added --random to select a random strip to get Fixed 8-Bit Theater 28 Aug 2001 Added strip pgs Changed method of operation for search mode to be more flexible Fixed a bug in groups support (Pat Lashley) 03 Sep 2001 Renamed the script to just 'dailystrips', not 'dailystrips.pl' RPMs now available 04 Sep 2001 Fixed DorkTower (proabaly only temporarily), jokesonyou, and striptease scragends seems to be gone - removed 1.0.17 01 Aug 2001 Small fix to Avantgo table generation 08 Aug 2001 Added Astronomy Picture of the Day (Chip Marshall) Win32 fixes 09 Aug 2001 Additional Win32 fix 10 Aug 2001 Small (but important) fixes Fixed Exploitation Now, small optimizations to other regexps Fixed display of date in output on certain platforms (FreeBSD, Win32 known) Even more fixes to --date. It should work now. Really. 14 Aug 2001 Typo fixes Fixed several broken strips 16 Aug 2001 Fixed more broken strips 17 Aug 2001 Continued cleaning up definitions. New total of working strips: 220 1.0.16 23 Jul 2001 Fixed reporting of line numbers for errors encountered while parsing definitions. Strip definitions now specify what they can provide (latest image only or the correct strip for any date) so that only strips that can actually provide the strip for the requested date are downloaded when using the --date option. Fixed the --date option yet again. (Peter De Wachter) Misc code cleanups Better error reporting in the definition parser Misc bug fixes 24 Jul 2001 Cleaned up some regexps in option parsing code Fixed syntax checking and error reporting in option parsing code 26 Jul 2001 strips.def: Added 8-Bit Theater Removed flem, madameve, katies, mrlowe, ribman Fixed dorktower Cleaned up some regexps Fixed proxy server detection Implemented urlsuffix in defs file 27 Jul 2001 Implemented Getopt::Long for command line argument processing (Tom Klinger) Implemented necessary changes for Win32 (Tom Klinger) Implemented preliminary Avantgo support Misc code tweaks 31 Jul 2001 Updated several unitedmedia.com strips to use the class again 1.0.15 13 Jul 2001 Major change: now installs to system directories instead of one dir. This involves: -installer script install.pl -strips.def goes in /usr/share/dailystrips -docs go in /usr/share/doc/dailystrips-VERSION -script goes in /usr/bin Personal installations are described in the INSTALL file. A --useragent option has been added to specify the User-Agent: header. Added new strip: jerkcity Other small code fixes 15 Jul 2001 Proxy authentication changed. Please notify if any problems arise. Added 'prefetch' keyword to definition file (see README.DEFS for more) SF Gate strips seem to be working again Other small code fixes 19 Jul 2001 Fixed usage of Date::Parse yet again No longer creates index.html when an alternate date is specified (so that it will not overwrite the latest symlink if running for an earlier day) Fixed syntax checking of http_proxy environment variable 23 Jul 2001 Better errors for mis-specified proxy servers Misc changes 1.0.14 12 Jul 2001 Now uses the strips.def file located in the same directory as the script, instead of checking the current directory (Francesco Chemolli) Added 'exclude' keyword for defs file (Francesco Chemolli) Personal definition files are now supported (~/.dailystrips.defs) 1.0.13 04 June 2001 Enchanced the strip definition file a bit (see README.DEFS for more) Added The Norm definition 14 May 2001 Fixed User Friendly definition Fixed routine that checks for presence of Date::Parse module Added Dork Tower definition (Mark Larimer) 1.0.12 11 Mar 2001 Added --stripdir option to put the files for each strip in a separate directory (Daniel Skarda) Added --date to specify the date to work with, instead of the current date. This works with many strips, but some sites do not provide an HTML page for each day (in the case of URLs that must be searched for) or an image for each day (in the case of URLs that are generated). Check the definition file before using this option, or you may end up downloading current strips in addition to strips for the specified date (this requires the Date::Parse module from CPAN) (Daniel Skarda) Added --verbose option to give extra status information. This is helpful if you're trying to figure out what's wrong when a strip won't download. Fixed the Dr. Fun definition - the strip is not updated daily 1.0.11 07 Mar 2001 Output no longer contains my name and email, so as not to confuse the lawyers. 1.0.10 27 Feb 2001 Documentation now better explains usage of groups Non-date variables now use '$' instead of '%'. Before, when both used '%' it was impossible for the script to distinguish between a date variable follwed by unrelated text and any other sort of named variable (most importantly, this was breaking Sluggy Freelance) Added several new strips Fixed several strips Added --nospaces option (Michael Lewis) Added proxy authentication support 1.0.9 24 Feb 2001 Added groups support - define multiple strips as one keyword Minor code enhancements Fixed jokesonyou definition 21 Feb 2001 Added Peanuts and everything except Yak's Corner from comicspage.com (strip count is now 206) Cleaned out a bunch of old code from the script Made searchpage the default referer (if different than homepage) Added documentation for the strip definition file 1.0.8 20 Feb 2001 Added HTTP proxy server support Added 'referer' value to definition file - this can be used if a web server refuses to return the image without a referer set. Actually, the program uses 'homepage' as a default referer - you only need to specify 'referer' if the homepage value doesn't work. Fixed a bug that was causing problems with image files that have no extension With the completion of the above two items, SFGate strips should now work properly. Fixed the Avalon High definition Cleaned up the definition file parsing code somewhat 1.0.7 19 Feb 2001 Added several new strips (total is now 148) 18 Feb 2001 Fixed a bug when using the --dailydir option that would make incorrect symlinks for duplicate files Fixed the sample code in README.LOCAL 1.0.6 02 Feb 2001 Added --basedir option. dailystrips will change to the specified directory to look for information files and save new files there. This makes possible the elimination of lines in cron scripts to manually change to a directory for operation. 31 Jan 2001 The strips definition file now specifies the frequency that each strip is expected to be updated at (just daily/semidaily for now). Now, dailystrips will not download the same image two days in a row for a daily strip (which previously would happen if it was being run before a strip's website was updated with the day's new strip). If you wish to add to the definitions file, note that "updated daily" is assumed (being the most common) if no "updated" line is present - only "updated semidaily" needs to be specified. 29 Jan 2001 Fixed a bug with the new mode of sylinking to previous images (previously, if today's image wass a symlink and the program was being run for the second time that day,the old file would get overwritten - this has been fixed by deleting the symlink before downloading a new strip and doing the comparison. 1.0.5 29 Jan 2001 Added sfgate strips & misc others (Dave Tweed) 28 Jan 2001 Implemented detection and symlinking for duplicate strip files (Scott Carlson) 1.0.4 26 Jan 2001 Added all strips from unitedmedia.com (Joaquín Perez again). Implemented strip definitions file to describe strips (instead of having a separate subroutine for each strip in the program). See strips.def to see how this works 1.0.3 24 Jan 2001 Added --dailydir option (Marc Doumayrou) Also added links to previous day's page (Marc again), and a link in the previous day's page to today's page. Added warning/error messages if various operations fail that the user should know about 1.0.2 24 Jan 2001 Added the rest of the strips at ucomics.com (Joaquín Perez). dailystrips now has a total of 38 strips available. 23 Jan 2001 Re-did command line options parsing code so that order of commands no longer matters Added --archive option. This adds a link to the current day's page to the file archive.html Added --noindex option. This disables symlinking the latest page to 'index.html' Various other cleanups 1.0.1 22 Jan 2001 No longer uses the external 'date' command. Now, dailystrips should run on any platworm where the modules HTTP::Request, LWP::UserAgent, and POSIX are available Added --save option. This recognizes if a strip has already been downloaded for the currect day and saves time/bandwidth by not re-downloading Added 2 new strips - Garfield & Adam@home Various other code cleanups/optimizations 21 Jan 2001 No longer uses wget - replaced with LWP This enhances portability and also allows for better error handling of failed downloads 1.0.0: 20 Jan 2001 First public release dailystrips-1.0.28/CONTRIBUTORS0100644000076500007650000001645307722326517015654 0ustar amedicoamedicoJoaquín Perez Finished implementing every strip at ucomics.com & unitedmedia.com Marc Doumayrou Implemented --dailydir option and link to previous day's strip Scott Carlson Implemented detection and symlinking for duplicate strip files Dave Tweed Added sfgate strips & others Itai Zukerman Added Avalon High Russell Keppner Added Sluggy Freelance Peter Added strips: exploitnow coolcat classm bruno thinhline nukees joeaverage hotzp flem gpf in2it crfh striptease Robert Jagger Added strips: angst, bobbins Robert Sandilands Added strips: goats plif Michael Lewis --nospaces option, zippythecolorpinhead Mark Wallace Added --stripdir and --date options Mark Larimer Patch to automatically use the definition file located in the same directory as the script instead of the current directory Rene Weber --useragent option, Debian packaging, system-wide definitions, numerous fixes Peter De Wachter Addeed Kevin and Kell, Freefall Fixed --date option Tom Klinger Win32 porting Getops Fixes to strips.def Chip Marshall Added Astronomy Picture of the Day Pat Lashley Fixed group support Martin Feeney Added numerous strips, strip fixes JR Boyens Added Spaz Labs Chris Hoover Added frazz, janesworld, bfriends; revised spooner, pcnpixel, thenorm Fixed "Spooner" Jeff Brown Added spiderman, tuma, nowak, asay, lang, shelton Fixed "PC and Pixel", "Liberty Meadows", "Diesel Sweeties" Fixed "PC and Pixel" again Jarrod Benjami Johnson Added elflife, elflifeadult, funnyfarm, ozyandmillie, suburbanjungle, acidreflux, whenigrowup Fixed the RedHat image corruption problem Joseph Blough Added links for navigating between strips Douglas Riga Added --nosymlinks and --notitles options Added sevtrek, fotr, sevgate, bluffy, sevfiles, sevwars, sevylon5, sevscifi Tucker McLean Added strip 'Mr. Potato Head' Ted Berg Added strips 'Walky', 'Jackie's Fridge', 'Schlock Mercenary', and 'Unicorn Jelly' Rich Lafferty Added strips greytown, slowwave, sexylosers, youdamnkid, houndshome, cutewendy, lifesorad, bigones Elf M. Sternberg Added strips "As If", "Nip 'N Tuck", "Under the Lemon Tree", and "Winter" Daniel M. Drucker Fixed "Penny Arcade" Robert Fleming Added "Brainbuzz", "The Duplex" Matt Hucke Fixed "Sexy Losers" David Findlay Added "Swamp" Ryan T. Dean Fixed "The Norm" Added "Melonpool" David S. Geirsson Added "Flem" Mike Schwartz Added "Real Life", "Sheldon", "Weak-end Warriors" Aaron D. Marasco Fixed comicspage.com strips Pat Lashley Fixed a file-extension detection bug Marcie Alana Lovell Added strips "Alice!", "The Shadows", "Lowest Common Denominator", "The Devil's Panties", "Fat Jesus", "Funny Farm", "Sex and Violence", "Fans!" Josh Brand Added "Underpower" and "Nekobox" Soeren Gerlach Added "Perscheids Abgruende", "Harm Bengen's Alltagsskizzen", "Weyershausen", "Touche" Fixed "Perscheids Abgruende", "Harm Bengen's Alltagsskizzen", "Weyershausen", "Quirit" Ted Richards Added "Drawing a Crowd", "I Need Help", "On the Fast Track", "Pibgorn", "Safe Havens", and "Working Daze" Kenneth Ballard Added "Marvin" Moved "Andy Capp", "BC", "Wizard of ID" to Washington Post CJ Kucera Added "Death to the Extremist", "Dicebox" Anders Bruun Olsen Added "Jack" Kim Scarborough Added 180(!) new strips: aislin alcarez alimov ammer andersonk andersonn anjornooz ares ariail asay auth babin bado bateman beattie behrendt bertrams bish bizwit bok boligan boyle breen britt brookins brown cagle cajas cardow carlson carlucho cartoonfix casciari catalino catrow chappatte cherepanov christo clement coco cole corax corrigan cranandlerma crowe cummings curiousmoments curry day deadder deangelis deering deore dolighan doloricon donato drybones duffy emmerson englehart erniepook erniepookbig esquivel evans gable gado garrincha gomaa gorrell graff graston greenberg grondahl hachfeld hajjaj hansson harville heller heng hervi huffaker incontempt jacobson jonesc kallaugher kazanevsky keefe keshav kim koterba kowsar lane langer leahy linttrap macgregor mackay mackinnon markstein matson mccloskey mckee medi menees miel mitropoulos moir molina morin moudakis nicholson noexit obi ofarrell ohman oliphant olle palomo pancho paresh parker peel persitoons peterson pismestrovic plante plantu powell priggee raeside rall ramirez ramsey randompropaganda reddick ricardo ritter rodewalt ronnen rowe sakurai sargent scarygoround schopf schot serguei sherffius siers slane slowpoke snibbe spencer stantis stavro streeter summers swill tayo thompson toles tom toomuchcoffeeman topsyturvey touka trever trinidad troubletown turner varvel wallace walters wilkinson wolvertoon wonsoo wrightl zapiro zeev zetterling zudin Kevin Fenzi Added "Fleem", "Queen of Wands", "WIGU" Daniel Chudnov Added "Overdue" J. Traub Added "Ben Sargent", "Pat Oliphant" Added pt3g, barneygoogle, betterhalf, buckles, dinetteset, grinandbearit, hiandlois, judgeparker, lockhorns, marktrail, maryworth, pardonmyplanet, redeye, rexmorgan, steveroper, theylldoiteverytime, tiger, tinasgroove, tumbleweeds, edgecity Christian Rubbert Added "Hackles" and "Aford Turtle" Gene Spafford Fixed "Mister Boffo", added "P. S. Mueller" Greg Hackmann Added "Dragon Tails" The Doctor What Added pvpcurrent, brunothebanditcurrent Eduardo Alvarez Fixed "Dork Tower", "Sherman's Lagoon" Uri Guttman Fixed "Zippy the Pinhead" Mike Scwartz Added "Nothing Nice to Say" Thomas Ritter Added "Ctrl+Alt+Del", "Tastes Live Gravel", "Instant Classic", "Geek Salad", "Comet 7", "Movie Punks", "Building 12", "Sarah and David" Fixed "Real Life" Manuel Streuhofer Added "Haiopeis" Joe Drew Fixed "Dr. Fun" Taylor Jacob Fixed "Mother Goose and Grimm" Antonio Larrosa Jiménez Added "Tira ecol de Bilo y Nano", "Tira ecol de Bilo y Nano (english)", "Gallego Y Rey", "Ricardo (El Mundo)", "Idigoras", "Zulet", "Elgar", "Pachi", "Amor es..." dailystrips-1.0.28/COPYING0100664000076500007650000004307707244002462015020 0ustar amedicoamedico GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. dailystrips-1.0.28/INSTALL0100664000076500007650000000211707452453405015014 0ustar amedicoamedicodailystrips Installation Instructions: *NIX: If you downloaded the RPM, simply run the following as root: rpm -Uvh dailystrips-VERSION.noarch.rpm If you downloaded anything else (.tar.bz/.tar.gz2/.zip), run the following as root: perl install.pl This will install the definitions file to /usr/share/dailystrips/, the documentation to /usr/share/doc/dailystrips-VERSION, and the scripts to /usr/bin/. Use "perl install.pl --help" for more info. Once dailystrips is installed, you may run the program by typing: dailystrips For personal installations (no root access), copy dailystrips, dailystrips-clean and strips.def to the directory of your choice. Since dailystrips uses /usr/share/dailystrips/strips.def by default, you will need to specify the definition file with the "--defs FILE" option. Win32: Copy the scripts and strips.def to the directory of your choice. When run, the script will check the current directory for strips.def, so always 'cd' the appropriate location or use the --defs option. If you have any questions, please contact me. Andrew Medico dailystrips-1.0.28/README0100664000076500007650000001056007414534605014644 0ustar amedicoamedicoDescription: This Perl script downloads the URL for the current comic of various strips that are available online, and outputs these URLs to an HTML file. This enables you to view all of your favorite strips at once, instead of visiting several different websites. One feature that sets this program apart from the rest is the ability to operate in 'local' mode. This mode, instead of writing the addresses to images in the HTML file, actually downloads the image and saves it locally. This way, you do not have to wait for each image to download - it's already on your hard drive. This is most useful when dailystrips is run from a cron script. (See file README.LOCAL for more information and examples) Requirements: dailystrips requires a reasonably current version of Perl - it was developed with 5.6.0. The HTTP::Request, LWP::UserAgent, and POSIX modules are needed. If you want to use --date, you will need Date::Time from the TimeDate package. See www.cpan.org if you don't have them installed already. dailystrips was developed on Linux but should be able to run on any *nix with that has the necessary Perl modules installed. Running on Win32 is also possible. For the AvantGo mode, ImageMagick is required. Installation: See the INSTALL file. Usage: 'dailystrips [stripname(s)]' will print to STDOUT an HTML page with image links to the latest strip. These links are to the strip's webserver. 'dailystrips --help' lists all available options. --list shows the available strips and groups. Strip names can specified as listed. Groups must be preceeded with an '@' symbol. Adding new strips: The strips.def file should be relatively self-explanatory. (see README.DEFS for detailed information). If you are adding several strips from the same site that share a common format, please create a class for that site. In addition, please try to pick a method of determining the most current URL possible (i.e. don't search if it's possible to predict - we don't want to get old strips if running early in the morning and a site hasn't updated the static page yet) Also, when you add a new strip, I'd appreciate it if you could email the defintion to me at amedico@amedico.dhs.org so I can add it to the distribution. Personal definition file: Users may create a file called ".dailystrips.defs" in their home directory. Syntax is exactly the same as the main strips.def file. Personal files will be processed after the main file. This means that classes set in the main file are available for use in users' files. Also note that any entries (classes, strips, and groups) in users' files with the same name as entries in the main will take precedence. Personal definition files can be ignored with the '--nopersonal' option. System-wide definitions file: Administrators may wish to create definitions, classes, or groups available to all users on a system. This may be done by creating a file /etc/dailystrips.defs and placing the definitions there. This file is loaded after the default definition file and so may be use to override provided definitions, if desired. The system-wide definitions file can be ignored with the --nosystem option. Definition upgrades: Since full releases are not made available every time the definitions file changes, the current CVS copy of the definitions file is available through a link at http://dailystrips.sourceforge.net/download.html. Users may either replace /usr/share/dailystrips/strips.def with this updated copy, or if a package management system is used (Debian dpkg, RPM, etc.) placing the updated definitions in /etc/dailystrips.defs is recommended. *Notice*: Keep in mind that this program is for personal use only, as making the output publicly available on the internet constitutes copyright infringement without permission from the strips' authors. If you're running it on a personal webserver that can be accessed fron the internet (even if it's not specifically public), make sure you set up restrictions so that only you have access to it - some publishers (Keenspot, Exclusive Content) seem to be checking their webserver logs for dailystrips users and will come after you in a rather nasty fashion if it even looks like you're using dailystrips to make a public website. Copyright info: This program Copyright (C) 2001 Andrew Medico . All rights reserved. This program is free software; you may redistribute it and/or modify it under the terms of the GNU GPL, Version 2.dailystrips-1.0.28/README.DEFS0100644000076500007650000002106607722224011015352 0ustar amedicoamedicoThis file describes in further detail how the strips.def file is contsructed. Strips can be defined in one of two ways. The first is standalone. Also, strips can be provide the image URL by generating it (as from the current date) or by searching a web page for a URL. Let's look at an example of generating first: strip badtech name Badtech artist James Sharman homepage http://www.badtech.com/ type generate imageurl http://www.badtech.com/a/%-y/%-m/%-d.jpg provides any end In the first line, we specify the short name of the strip that will be used to refer to it on the command line. This must be unique. Next, "name" specifies the name of the strip to display in the HTML output. "artist" specifies the strip artist's name, which will be displayed on the same line as the name of the strip. "homepage" is the address of the strip's homepage, use for the link in the output. "type" can be either "generate" or "search". Here we are using "generate" to generate a URL. "imageurl" is the address of the image. You are allowed to use a number of special variables. Single letters preceeded by the "%" symbol, such as "%Y", "%d", "%m", etc. are interpreted as date variables and passed to the strftime function for conversion. Date variables may be used in: homepage, searchpage, searchpattern, imageurl, baseurl, and referer. "date --help" provides a reference that is compatible. You can also use a "$" followed by the name of the above variables, such as "$homepage". This will simply subsititute "http://www.badtech.com" in place of "$homepage". You can use named variables for name, homepage, searchpage, searchpattern, imageurl, baseurl, referer variables on homepage, searchpage, searchpattern, imageurl, baseurl, and referer lines. The other type of URL generation, searching, is as follows: strip joyoftech name The Joy of Tech homepage http://www.joyoftech.com/joyoftech/ type search searchpattern . No need to quote the code, just put it where "Perl code" is. Don't forget to escape any > that may happen to be in your code. The other method of specifying strips is to use classes. This method is used when there are serveral strips provided by the same webserver that all have an identical definition, except for some strip-specific elements. Classes work as follows: First, the class is declared: class ucomics-srch homepage http://www.ucomics.com/$strip/view$1.htm type search searchpattern (/$1/(\d+)/$1(\d+)\.(gif|jpg)) matchpart 1 baseurl http://images.ucomics.com/comics provides latest end This is just like a strip definition, except "class" is the first line. The value for "class" must be unique among other classes but will not conflict with the names of strips. Strip-specific elements are specified using special variables "$x", where "x" is a number from 0 to 9. When the definition file is parsed, these variables are retrieved from the strip definition, shown below. strip calvinandhobbes name Calvin and Hobbes useclass ucomics-srch $1 ch end This definition is like a normal definition except the second line is "useclass" followed by the name of the class to use. Below that, the strip-specific "$x" variables must be specified. Values already declared in the class can be overridden (if necessary) by simply specifying them in the strip definition. For your convenience, "groups" of strips may also be defined. These allow you to use a single keyword on the command line to refer to a whole set of strips. The construct is as follows: >group favorites > desc My Favorite Comics > include peanuts > include foxtrot, userfriendly >end The group name must be unique among all groups, but will not conflict with strips or classes (in fact it might be useful to have a group for each class - I might even make that automatic). "desc" is a description of the group that will be shown by --list. Everything after an "include" is added to the list of strips. You may specify one or more strips per "include" line, whatever you prefer. Groups are referenced on the command line by an "@" symbol followed by the name (bare words not preceeded by an "@" symbol will be considered strips). Finally, you may use "exclude [strips]" lines instead of "include" lines to make the group contain everystrip except those specified. Notes: * As of 1.0.10, only date variables use the "%" symbol - everything else now uses "$" * For classes, variables declared in the strip definition take precedence over those specified in the class, if there is any conflict * You cannot use "$variablename" to refer to a variable below the current line (assuming that you use the standard order) if the referenced variable is a reference itself - the script only parses "$variablename" references once. This is a bug and is scheduled to be fixed. * If no "searchpage" is specified for definitions of type "search", the value of "homepage" is used. * If no "referer" is specified, the value of "searchpage" is used. If this has not been set (in the case of definitions that generate the URL or search definitions that use the homepage as the searchpage), the value of "homepage" is used. * There may be additional problems lurking in the defintion file-parsing code. It currently works fairly well, but needs to be re-written properly. * Group, strip, and class names can contain pretty much any character except semicolon, space, and pipe.dailystrips-1.0.28/README.LOCAL0100664000076500007650000000532707345236222015477 0ustar amedicoamedicoThis file describes in further detail dailystrips' 'local' mode of operation. Normally, dailystrips generates the URLs to the selected strips and displays them on STDOUT for redirection into a file (--output lets you specify a file to save the HTML into automatically). However, this is usually inconvenient as you must first run the program manually, and then wait for your browser to download the images. Local mode, instead of putting the address of each image in the generated page, downloads the image and save a copy of it locally. The address in the generated page then refers to that downloaded image. With this, you do not have to wait for your browser to download the images from the 'net - they are already on your hard drive (or your own webserver - another way to set it up). The time savings really add up when you want to view the page more than once. Method 1: (one system) Create a directory (such as /home/user/dailystrips/) in which to store the downloaded images and output files. Create a cron script like the following and put it in /etc/cron.daily (call it dailystrips.sh, etc) #!/bin/sh echo "dailystrips running:" su user -c "dailystrips --basedir /home/user/dailystrips --local all" Of course, change /home/user/dailystrips to the exact directory that you created. Also, change "su user.." to reflect an appropriate login (your own is best if you created a directory in your home directory) You should also change the "all" to reflect just the strips you want to see - the over 200 strips would take a rather long time to download even with a fast connection. By default, the program calls the output file 'dailystrips-YYYY.MM.DD' and creates 'index.html' as a symlink to this, so that you can make a bookmark to index.html in your web browser that will always take you to the latest page. If you need to change this, you'll have to edit the script. For scheduling the time that dailystrips runs, you'll have to consider your time zone. I have found that running at 0600 EST (-0500) works well for my strips (see the contents of group 'andrew'). You may have to experiment a little to find the best time for the specific strips you download. One idea is to create a crontab entry to run dailystrips early in the morning and then a few hours later if the strips aren't all available at one time. Method 2: (webserver/intranet) This is the same as above - just locate the directory somewhere in your webserver's document root. Keep in mind that this should be for personal use only, as making the output publicly available on the internet constitutes copyright infringement, without permission from the strips' authors. As far as I know, though, it's within your rights to use this for personal use.dailystrips-1.0.28/README.dailystrips-clean0100664000076500007650000000077407433530465020301 0ustar amedicoamedicoDescription: In order to keep disk usage down, the dailystrips-clean script is provided to automatically delete files that are older than a specified number of days, for example, a week or a month. Usage: Operation is straightforward. In the directory where the downloaded strip and HTML files are located, simply run the command: 'dailystrips-clean DAYS' Where DAYS is the number of days to preserve. There are also a few simple options available that may be viewed by running 'dailystrips-clean --help'.dailystrips-1.0.28/README.dailystrips-update0100664000076500007650000000163407715100377020473 0ustar amedicoamedicoDescription: The dailystrips-update script is provided to automatically retrieve updated strip definitions from a central server, eliminating the need to manually download and install new versions of the entire program. It is recommened that the dailystrips-update script be run before each execution of the main dailystrips program. The dailystrips-update script has provisions to only check for updates if the current file has reached a certain age, which maximizes efficiency and should allow users to run the update script before each execution of dailystrips without overtaxing the update server. Usage: Operation is straightforward. Simply execute dailystrips-update and the updated definitions will be saved to ~/.dailystrips-updates.def, which will automatically be loaded by the main dailystrips program. There are also a few simple options available that may be viewed by running 'dailystrips-update --help'. dailystrips-1.0.28/TODO0100644000076500007650000000667207721765507014473 0ustar amedicoamedicoThis is mostly my rambling, but feel free to implement anything you want to tackle.. 1.0.21 02 Jan 2002 Create some way of automatically downloading the latest defs file 12 Jan 2002 Themable output Time-stamped errors, log errors to a file 1.0.19 13 Sep 2001 Make 'provides' information in definitions more specific than 'every day' or 'some days'. A more useful solution would be to allow the specification of which days of the week strips are provided. 1.0.18 04 Sep 2001 Add a method for handling strips that are made up of more than one image (for example, Avalon High and CRFH). This may get complicated for strips that have one scheme for single images one some days and another for multiple images on other days. Related to this, add a method for trying several different search options - some strips (e.g. dorktower) seem to rotate between a few different ones and it's impractical to keep switching the def in every release. Add a manpage - possibly use Rene Weber's work for Debian as a starting point 1.0.16 27 July 2001 Write a test script to verify that everything works as it should to cut down on releases of code with easily detectable bugs Package as an RPM - DONE in 1.0.18 Fully test Win32 changes Implement symlinking when using avantgo option 1.0.9 24 Feb 2001 Now that a group capability has been added to the definition file, it appears necessary to support some sort of 'local' or personal definition file, in addition to the distributed one. If only a single file was supported, anyone with custom groups would have to copy/paste them from the old file into the new whenever they upgraded the definition file. I'd do this now, but it's 3AM and I need the sleep. - DONE in 1.0.14 1.0.6 02 Feb 2001 Since the program is starting to get rather large and handles so many different options, it looks like it may be a good idea to split it up into several smaller programs programs to each handle a specific task. I'll be starting a developmemt branch shortly to get started on this. 31 Jan 2001 Look into using the Getopt perl module for getting command-line parameters. - DONE in 1.0.16 1.0.4 26 Jan 2001 Revise definitions file parsing code (functional but messy..) Implement an option to remove files older than a set number of days (for example, anything more than a week old). This would conserve disk space when downloading a large number of strips daily. Add a 'group' section to strips.def where you can specify an alias (such as "tech") that would stand for several strips (such as "userfriendly", "joyoftech", and "badtech") - DONE in 1.0.9 1.0.1 22 Jan 2001 Test on Win32 & MacOS 1.0.0: 20 Jan 2001 Need to detect failure to download images (for local mode, to avoid 'broken' images) - DONE in 1.0.1 It would be nice to detect duplicate images when in local mode and just symlink to the previous file (to save disk space). This applies to semi- daily strips only. - DONE in 1.0.5 Idea: expand to modes of operation other than just generating an HTML page, such as emailing the strips (either as attachments (hard) or as an HTML page with links to copies on the server) Another mode: CGI (possible methods: download on demand, once per day; or always re-download on demand (for high-bandwidth users only)) Change wget to use LWP (for portability) - DONE in 1.0.1 Change `date +%..` to use Perl builtin (for portability) - DONE in 1.0.1 dailystrips-1.0.28/dailystrips0100755000076500007650000011044607722312270016255 0ustar amedicoamedico#!/usr/bin/perl # # Program Summary: # # Name: dailystrips # Description: creates an HTML page containing a number of online comics, with an easily exensible framework # Author: Andrew Medico # Created: 23 Nov 2000, 23:33 EST # Last Modified: 24 Aug 2003, 16:55 # Current Revision: 1.0.28 # # Set up use strict; no strict qw(refs); use LWP::UserAgent; use HTTP::Request; use POSIX qw(strftime); use Getopt::Long; use File::Copy; # Variables my (%options, $version, $time_today, @localtime_today, @localtime_yesterday, @localtime_tomorrow, $long_date, $short_date, $short_date_yesterday, $short_date_tomorrow, @get, @strips, %defs, $known_strips, %groups, $known_groups, %classes, $val, $link_tomorrow, $no_dateparse, @base_dirparts); $version = "1.0.28"; $time_today = time; # Get options GetOptions(\%options, 'quiet|q','verbose','output=s','lite','local|l','noindex', 'archive|a','dailydir|d','stripdir','save|s','nostale','date=s', 'new|n','defs=s','nopersonal','basedir=s','list','proxy=s', 'proxyauth=s','noenvproxy','nospaces','useragent=s','version|v','help|h', 'avantgo', 'random','nosystem','stripnav','nosymlinks','titles=s', 'retries=s','clean=s','updates=s','noupdates') or exit 1; # Process options: # Note: Blocks have been ordered so that we only do as much as absolutely # necessary if an error is encountered (i.e. do not load defs if --version # specified) # Help and version override anything else if ($options{'help'}) { print "Usage: $0 [OPTION] STRIPS STRIPS can be a mix of strip names and group names (group names must be preceeded by an '\@' symbol) 'all' may be used to retrieve all known strips, or use option --list to list available strips and groups Options: -q --quiet Turn off progress messages --verbose Turn on extra progress information, overrides -q --list List available strips --random Download a random strip --defs FILE Use alternate strips definition file --nopersonal Ignore ~/.dailystrips.defs --nosystem Ignore system-wide definitions --updates Read updated defs from FILE instead of ~/.dailystrips-updates.def --noupdates Ignore updated defs file --output FILE Output HTML to FILE instead of STDOUT (does not apply to local mode) --lite Output a reduced HTML page --stripnav Add links for navigation within the page --titles STRING Customize HTML output -l --local Output HTML to file and save strips locally --noindex Disable symlinking current page to index.html (local mode only) -a --archive Generate archive.html as a list of all days, (local mode only) -d --dailydir Create a separate directory for each day's images (local mode only) --stripdir Create a separate directory for each strip's images (local mode only) -s --save If it appears that a particular strip has been downloaded, does not attempt to re-download it (local mode only) --nostale If a new strip is not available, displays an error in the HTML output instead of showing the old image --nosymlinks Do not use symlinks for day-to-day duplicates --date DATE Use value DATE instead of local time (DATE is parsed by Date::Parse function) --avantgo Format images for viewing with Avantgo on PDAs (local mode only) --basedir DIR Work in specified directory instead of current directory (program will look here for previous HTML file and save new files here, etc.) --proxy host:port Use specified HTTP proxy server (overrides environment proxy, if set) --proxyauth user:pass Set username and password for proxy server --noenvproxy Ignore the http_proxy environment variable, if set --nospaces Remove spaces from image filenames (local mode only) --useragent STRING Set User-Agent: header to STRING (default is none) --retries NUM When downloading items, retry NUM times instead of default 3 times --clean NUM Keep only the latest NUM days of files; remove all older files -v --version Print version number "; if ($^O =~ /Win32/ ) { print "Additional Win32 Notes: Windows lacks a number of features and programs found on *NIX, so a number of changes must be made to the program's operation: 1. --date and --avantgo are not available 2. Personal and update definition files may or may not work 3. System-wide definition files are not supported "; } # ' please emacs perlmode print "\nBugs and comments to dailystrips\@amedico.dhs.org\n"; exit; } if ($options{'version'}) { print "dailystrips version $version\n"; exit; } if ($options{'date'}) { eval "require Date::Parse"; if ($@ ne "") { die "Error: cannot use --date - Date::Parse not installed\n"; } else { import Date::Parse; } unless ($time_today = str2time($options{'date'})) { die "Error: invalid date specified\n"; } } # setup time variables (needed during defs parsing) @localtime_today = localtime $time_today; $long_date = strftime("\%A, \%B \%e, \%Y", @localtime_today); $short_date = strftime("\%Y.\%m.\%d", @localtime_today); @localtime_yesterday = localtime($time_today - ( 24 * 60 * 60 )); $short_date_yesterday = strftime("\%Y.\%m.\%d", @localtime_yesterday); @localtime_tomorrow = localtime ($time_today + 24 * 60 * 60); $short_date_tomorrow = strftime("\%Y.\%m.\%d", @localtime_tomorrow); # Get strip definitions now - info used below unless ($options{'defs'}) { if ($^O =~ /Win32/ ) { $options{'defs'} = 'strips.def'; } else { $options{'defs'} = '/usr/share/dailystrips/strips.def'; } } &get_defs($options{'defs'}); # Load updated defs file unless (defined $options{'updates'}) { $options{'updates'} = &get_homedir() . "/.dailystrips-updates.def"; } unless($options{'noupdates'}) { if (-r $options{'updates'}) { &get_defs($options{'updates'}); } } # Get system configurable strip definitions now unless ($options{'nosystem'}) { unless (($^O =~ /Win32/) or (! -r '/etc/dailystrips.defs')) { &get_defs('/etc/dailystrips.defs'); } } unless ($options{'nopersonal'}){ my $personal_defs = &get_homedir() . "/.dailystrips.defs"; if (-r $personal_defs) { &get_defs($personal_defs); } } $known_strips = join('|', sort keys %defs); $known_groups = join('|', sort keys %groups); if ($options{'random'}) { my @known_strips_array = keys %defs; push(@get, $known_strips_array[(rand $#known_strips_array)]); undef @known_strips_array; } else { # Only strips/groups to download remain in @ARGV # Unconfigured options were already trapped by Getopts with an 'unknown option' # error for (@ARGV) { if (/^($known_strips|all)$/io) { if ($_ eq "all") { push (@get, split(/\|/, $known_strips)); } else { push(@get, $_); } } elsif (/^@/) { if (/^@($known_groups)$/io) { push(@get, split(/;/, $groups{$1}{'strips'})); } else { die "Error: unknown group: $_\n"; } } else { die "Error: unknown strip: $_\n"; } } } if ($options{'list'}) { format = @<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $_, $val . print "Available strips:\n"; for (split(/\|/, $known_strips)) { $val = $defs{$_}{'name'}; write; } print "\nAvailable groups:\n"; for (split(/\|/, $known_groups)) { $val = $groups{$_}{'desc'}; write; } exit; } if ($options{'dailydir'} and $options{'stripdir'}) { die "Error: --dailydir and --stripdir cannot be used together\n"; } #Set proxy if ($options{'proxy'}) { $options{'proxy'} =~ /^(http:\/\/)?(.*?):(.+?)\/?$/i; unless ($2 and $3) { die "Error: incorrectly formatted proxy server ('http://server:port' expected)\n"; } $options{'proxy'} = "http://$2:$3"; } if (!$options{'noenvproxy'} and !$options{'proxy'} and $ENV{'http_proxy'} ) { $ENV{'http_proxy'} =~ /(http:\/\/)?(.*?):(.+?)\/?$/i; unless ($2 and $3) { die "Error: incorrectly formatted proxy server environment variable\n('http://server:port' expected)\n"; } $options{'proxy'} = "http://$2:$3"; } if ($options{'proxyauth'}) { unless ($options{'proxyauth'} =~ /^.+?:.+?$/) { die "Error: incorrectly formatted proxy credentials ('user:pass' expected)\n"; } } # Handle/validate other options if ($options{'clean'} =~ m/\D/) { die "Error: 'clean' value must be numeric\n"; } if ($options{'retries'} =~ m/\D/) { die "Error: 'retries' value must be numeric\n"; } unless ($options{'retries'}) { $options{'retries'} = 3; } if ($options{'basedir'}) { unless (chdir $options{'basedir'}) { die "Error: could not change directory to $options{'basedir'}\n"; } } if ($options{'titles'}) { $options{'titles'} .= " "; } unless (@get) { die "Error: no strip specified (--list to list available strips)\n"; } # verbose overrides quiet if ($options{'verbose'} and $options{'quiet'}) { undef $options{'quiet'}; } # Un-needed vars undef $known_strips; undef $known_groups; undef $val; # Go unless ($options{'quiet'}) { warn "dailystrips $version starting:\n"; } # Report proxy settings if ($options{'proxy'}) { if ($options{'verbose'}) { warn "Using proxy server $options{'proxy'}\n"; } if ($options{'verbose'} and $options{'proxy_auth'}) { warn "Using proxy server authentication\n"; } } if ($options{'local'}) { unless ($options{'quiet'}) { warn "Operating in local mode\n"; } if ($options{'dailydir'}) { unless ($options{'quiet'}) { warn "Operating in daily directory mode\n"; } unless (-d $short_date) { # any issues with masks and Win32? unless(mkdir ($short_date, 0755)) { die "Error: could not create today's directory ($short_date/)\n"; } } } unless(open(STDOUT, ">dailystrips-$short_date.html")) { die "Error: could not open HTML file (dailystrips-$short_date.html) for writing\n"; } unless ($options{'date'}) { unless ($options{'noindex'}) { unless ($^O =~ /Win32/) { unlink("index.html"); system("ln -s dailystrips-$short_date.html index.html"); } } } if ($options{'archive'}) { unless (-e "archive.html") { # Doesn't exist.. create open(ARCHIVE, ">archive.html") or die "Error: could not create archive.html\n"; print ARCHIVE " $options{'titles'}dailystrips archive

\n $options{'titles'}dailystrips archive

"; close(ARCHIVE); } open(ARCHIVE, "; close(ARCHIVE); unless (grep(//, @archive)) { for (@archive) { if (s/()/$1\n$long_date<\/a>
/) { unless(open(ARCHIVE, ">archive.html")) { die "Error: could not open archive.html for writing\n"; } print ARCHIVE @archive; close(ARCHIVE); last; } } } } # Update previous day's file with a "Next Day" link to today's file if (open(PREVIOUS, "; close(PREVIOUS); # Don't bother if no tag exists in the file (because it has already been updated) if (grep(//, @previous_page)) { my $match_count; for (@previous_page) { if (s// |
Next day<\/a>/) { $match_count++; last if ($match_count == 2); } } if (open(PREVIOUS, ">dailystrips-$short_date_yesterday.html")) { print PREVIOUS @previous_page; close(PREVIOUS); } else { warn "Warning: could not open dailystrips-$short_date_yesterday.html for writing\n"; } } else { warn "Warning: did not find any tag in previous day's file to make today's link\n"; } } else { warn "Warning: could not open dailystrips-$short_date_yesterday.html for reading\n"; } } elsif ($options{'output'}) { unless ($options{'quiet'}) { warn "Writing to file $options{'output'}\n"; } unless (open(STDOUT, ">$options{'output'}")) { die "Error: Could not open output file ($options{'output'}) for writing\n"; } } # Download image URLs unless ($options{'quiet'}) { if ($options{'verbose'}) { warn "\nRetrieving URLS:\n" } else { print STDERR "\nRetrieving URLS..." } } for (@get) { if ($options{'verbose'}) { warn "Retrieving URL for $_\n" } &get_strip($_); } unless ($options{'quiet'}) { if ($options{'verbose'}) { warn "Retrieving URLS: done\n" } else { warn "done\n" } } if (-e "dailystrips-$short_date_tomorrow.html") { $link_tomorrow = " | Next day" } else { $link_tomorrow = "" } # Generate HTML page if ($options{'lite'}) { print "$options{'titles'}dailystrips for $long_date

\n"; } else { my $topanchor; if ($options{'stripnav'}) { $topanchor = "\n\n"; } print " $options{'titles'}dailystrips for $long_date $topanchor
$options{'titles'}dailystrips for $long_date

< Previous day$link_tomorrow"; if ($options{'archive'}) { print " | Archives"; } print " >

"; if ($options{'stripnav'}) { print "Strips:
\n"; for (@strips) { my ($strip, $name) = (split(/;/, $_))[0,1]; print "$name  "; } print "\n

"; } print "\n\n\n"; } if ($options{'local'} and !$options{'quiet'}) { if ($options{'verbose'}) { warn "\nDownloading strip files:\n" } else { print STDERR "Downloading strip files..."; } } for (@strips) { my ($strip, $name, $homepage, $img_addr, $referer, $prefetch, $artist) = split(/;/, $_); my ($img_line, $local_name, $local_name_dir, $local_name_file, $local_name_ext, $image, $ext, $local_name_yesterday, $local_name_yesterday_dir, $local_name_yesterday_file, $local_name_yesterday_ext); if ($options{'verbose'} and $options{'local'}) { warn "Downloading strip file for " . lc((split(/;/, $_))[0]) . "\n"; } if ($img_addr =~ "^unavail") { if ($options{'verbose'}) { warn "Error: $strip: could not retrieve URL\n"; } $img_line = "[Error - unable to retrieve URL]"; } else { if ($options{'local'}) { # local mode - download strips $img_addr =~ /http:\/\/(.*)\/(.*)\.(.*?)([?&].+)?$/; if (defined $3) { $ext = ".$3" } # prepare file names if ($options{'stripdir'}) { $local_name_yesterday = "$name/$short_date_yesterday$ext"; $local_name_yesterday_dir = "$name/"; $local_name_yesterday_file = $short_date_yesterday; $local_name_yesterday_ext = $ext; $local_name = "$name/$short_date$ext"; $local_name_dir = "$name/"; $local_name_file = "$short_date"; $local_name_ext = "$ext"; } elsif ($options{'dailydir'}) { $local_name_yesterday = "$short_date_yesterday/$name-$short_date_yesterday$ext"; $local_name_yesterday_dir = "$short_date_yesterday/"; $local_name_yesterday_file = "$name-$short_date_yesterday"; $local_name_yesterday_ext = "$ext"; $local_name = "$short_date/$name-$short_date$ext"; $local_name_dir = "$short_date/"; $local_name_file = "$name-$short_date"; $local_name_ext = "$ext"; } else { $local_name_yesterday = "$name-$short_date_yesterday$ext"; $local_name_yesterday_dir = "./"; $local_name_yesterday_file = "$name-$short_date_yesterday"; $local_name_yesterday_ext = "$ext"; $local_name = "$name-$short_date$ext"; $local_name_dir = "./"; $local_name_file = "$name-$short_date"; $local_name_ext = "$ext"; } if ($options{'nospaces'}) { # impossible to tell for sure if previous day's file # used --nospaces or not, but this should work more # often $local_name_yesterday =~ s/\s+//g; $local_name_yesterday_dir =~ s/\s+//g; $local_name_yesterday_file =~ s/\s+//g; $local_name =~ s/\s+//g; $local_name_dir =~ s/\s+//g; $local_name_file =~ s/\s+//g; } # do ops that depend on file name if ($options{'stripdir'}) { unless (-d $local_name_dir) { # any issues with masks and Win32? mkdir $local_name_dir, 0755; } } if ($options{'save'} and -e $local_name) { # already have a suitable local file - skip downloading if ($options{'avantgo'}) { $img_line = &make_avantgo_table($local_name, $ext); } else { $img_addr = $local_name; $img_addr =~ s/ /\%20/go; if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } } else { # need to download if ($prefetch) { if (&http_get($prefetch, $referer) =~ m/^ERROR/) { warn "Error: $strip: could not download prefetch URL\n"; $image = "ERROR"; } else { $image = &http_get($img_addr, $referer); } } else { $image = &http_get($img_addr, $referer); #$image = &http_get($img_addr, ""); } if ($image =~ /^ERROR/) { # couldn't get the image # FIXME: what to do if a file for the day has already been # downloaded, but downloading fails when script is run again # that day? maybe reuse existing file instead of throwing # error? if (-e $local_name) { # an image file for today already exists.. jump to outputting code #warn "DEBUG: couldn't download strip, but we already have it\n"; goto HAVE_IMAGE; } else { if ($options{'verbose'}) { warn "Error: $strip: could not download strip\n"; } } $img_line = "[Error - unable to download image]"; } else { HAVE_IMAGE: # got the image if ($^O =~ /Win32/) { # can't do any diff checking on windows (easily, that is - it is doable) open(IMAGE, ">$local_name"); binmode(IMAGE); print IMAGE $image; close(IMAGE); $img_addr = $local_name; $img_addr =~ s/ /\%20/go; if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } else { # FIXME: only download to .tmp if earlier file exists open(IMAGE, ">$local_name.tmp"); binmode(IMAGE); print IMAGE $image; close(IMAGE); if (-e $local_name and system("diff \"$local_name\" \"$local_name.tmp\" >/dev/null 2>&1") == 0) { # already downloaded the same strip earlier today unlink("$local_name.tmp"); if ($options{'avantgo'}) { $img_line = &make_avantgo_table($local_name, $ext); } else { $img_addr = $local_name; $img_addr =~ s/ /\%20/go; if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } } elsif (system("diff \"$local_name_yesterday\" \"$local_name.tmp\" >/dev/null 2>&1") == 0) { # same strip as yesterday if ($options{'nosymlinks'}) { system("mv","$local_name.tmp","$local_name"); } else { unlink("$local_name.tmp"); if ($options{'stripdir'} or $options{'dailydir'}) { system("ln -s \"../$local_name_yesterday\" \"$local_name\" >/dev/null 2>&1"); } else { system("ln -s \"$local_name_yesterday\" \"$local_name\" >/dev/null 2>&1"); } } if ($options{'nostale'}) { $img_line = "[Error - new strip not available]"; } else { $img_addr = $local_name; $img_addr =~ s/ /\%20/go; if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } } else { # completely new strip # possible to get here by: # -downloading a strip for the first time in a day # -downloading an updated strip that replaces an old one downloaded at # an earlier time on the same day system("mv","$local_name.tmp","$local_name"); if ($options{'avantgo'}) { &make_avantgo_files($local_name, $local_name_ext); $img_line = &make_avantgo_table($local_name, $ext); } else { $img_addr = $local_name; $img_addr =~ s/ /\%20/go; if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } } } } } } else { # regular mode - just give addresses to strips on their webserver if ($options{'stripnav'}) { $img_line = "\"$name\"
Return to top"; } else { $img_line = "\"$name\""; } } } if ($artist) { $artist = " by $artist"; } if ($options{'lite'}){ print "$name$artist
$img_line

"; } else { my $stripanchor; if ($options{'stripnav'}) { $stripanchor = ""; } print " "; } } if ($options{'local'} and !$options{'quiet'}) { if ($options{'verbose'}) { warn "Downloading strip files: done\n" } else { warn "done\n" } } unless ($options{'lite'}) { print "
$stripanchor$name$artist
$img_line

 

< Previous day$link_tomorrow"; if ($options{'archive'}) { print " | Archives"; } print " >

Generated by dailystrips $version "; } if (!$options{'date'} and !$options{'noindex'} and $^O =~ /Win32/) { # no symlinks on windows.. just make a copy of the file close(STDOUT); copy("dailystrips-$short_date.html","index.html"); } # Clean out old files, if requested if ($options{'clean'}) { unless ($options{'quiet'}) { print STDERR "Cleaning files older than $options{'clean'} days..."; } unless (system("perl -S dailystrips-clean --quiet $options{'clean'}")) { unless ($options{'quiet'}) { print STDERR "done\n"; } } else { warn "failed\nWarning: could not run dailystrips-clean script\n"; } } sub http_get { my ($url, $referer) = @_; my ($request, $response, $status); # default value #unless ($retries) { # $retries = 3; #} if ($referer eq "") {$referer = $url;} my $headers = new HTTP::Headers; $headers->proxy_authorization_basic(split(/:/, $options{'proxyauth'})); $headers->referer($referer); my $ua = LWP::UserAgent->new; $ua->agent($options{'useragent'}); $ua->proxy('http', $options{'proxy'}); for (1 .. $options{'retries'}) { # main request $request = HTTP::Request->new('GET', $url, $headers); $response = $ua->request($request); ($status = $response->status_line()) =~ s/^(\d+)/$1:/; if ($response->is_error()) { if ($options{'verbose'}) { warn "Warning: could not download $url: $status (attempt $_ of $options{'retries'})\n"; } } else { return $response->content; } } # if we get here, URL retrieval completely failed warn "Warning: failed to download $url\n"; return "ERROR: $status"; } sub get_strip { my ($strip) = @_; my ($page, $addr); if ($options{'date'} and $defs{$strip}{'provides'} eq "latest") { if ($options{'verbose'}) { warn "Warning: strip $strip not compatible with --date, skipping\n"; } next; } if ($defs{$strip}{'type'} eq "search") { $page = &http_get($defs{$strip}{'searchpage'}); if ($page =~ /^ERROR/) { if ($options{'verbose'}) { warn "Error: $strip: could not download searchpage $defs{$strip}{'searchpage'}\n"; } $addr = "unavail-server"; } else { $page =~ /$defs{$strip}{'searchpattern'}/si; my @regexmatch; for (1..9) { $regexmatch[$_] = ${$_}; #warn "regex match #$_: ${$_}\n"; } unless (${$defs{$strip}{'matchpart'}}) { if ($options{'verbose'}) { warn "Error: $strip: searchpattern $defs{$strip}{'searchpattern'} did not match anything in searchpage $defs{$strip}{'searchpage'}\n"; } $addr = "unavail-nomatch"; } else { my $match = ${$defs{$strip}{'matchpart'}}; if ($defs{$strip}{'imageurl'}) { $addr = $defs{$strip}{'imageurl'}; $addr =~ s/\$match_(\d)/$regexmatch[$1]/ge; $addr =~ s/\$match/$match/ge; } else { $addr = $defs{$strip}{'baseurl'} . $match . $defs{$strip}{'urlsuffix'}; } } } } elsif ($defs{$strip}{'type'} eq "generate") { $addr = $defs{$strip}{'baseurl'} . $defs{$strip}{'imageurl'}; } unless ($addr =~ /^(http:\/\/|unavail)/io) { $addr = "http://" . $addr } push(@strips,"$strip;$defs{$strip}{'name'};$defs{$strip}{'homepage'};$addr;$defs{$strip}{'referer'};$defs{$strip}{'prefetch'};$defs{$strip}{'artist'}"); } sub get_defs { my $defs_file = shift; my ($strip, $class, $sectype, $group); my $line; unless(open(DEFS, "<$defs_file")) { die "Error: could not open strip definitions file $defs_file\n"; } my @defs_file = ; close(DEFS); if ($options{'verbose'}) { warn "Loading definitions from file $defs_file\n"; } for (@defs_file) { $line++; chomp; s/#(.*)//; s/^\s*//; s/\s*$//; next if $_ eq ""; if (!$sectype) { if (/^strip\s+(\w+)$/i) { if (defined ($defs{$1})) { undef $defs{$1}; } $strip = $1; $sectype = "strip"; } elsif (/^class\s+(.*)$/i) { if (defined ($classes{$1})) { undef $classes{$1}; } $class = $1; $sectype = "class"; } elsif (/^group\s+(.*)$/i) { if (defined ($groups{$1})) { undef $groups{$1}; } $group = $1; $sectype = "group"; } elsif (/^(.*)/) { die "Error: Unknown keyword '$1' at $defs_file line $line\n"; } } elsif (/^end$/i) { if ($sectype eq "class") { undef $class } elsif ($sectype eq "strip") { if ($defs{$strip}{'useclass'}) { my $using_class = $defs{$strip}{'useclass'}; # import vars from class for (qw(homepage searchpage searchpattern baseurl imageurl urlsuffix referer prefetch artist)) { if ($classes{$using_class}{$_} and !$defs{$strip}{$_}) { my $classvar = $classes{$using_class}{$_}; $classvar =~ s/(\$[0-9])/$defs{$strip}{$1}/g; $classvar =~ s/\$strip/$strip/g; $defs{$strip}{$_} = $classvar; } } for (qw(type matchpart provides)) { if ($classes{$using_class}{$_} and !$defs{$strip}{$_}) { $defs{$strip}{$_} = $classes{$using_class}{$_}; } } } #substitute auto vars for real vals here/set defaults unless ($defs{$strip}{'searchpage'}) {$defs{$strip}{'searchpage'} = $defs{$strip}{'homepage'}} unless ($defs{$strip}{'referer'}) { if ($defs{$strip}{'searchpage'}) { $defs{$strip}{'referer'} = $defs{$strip}{'searchpage'} } else { $defs{$strip}{'referer'} = $defs{$strip}{'homepage'} } } #other vars in definition for (qw(homepage searchpage searchpattern imageurl baseurl urlsuffix referer prefetch)) { if ($defs{$strip}{$_}) { $defs{$strip}{$_} =~ s/\$(name|homepage|searchpage|searchpattern|imageurl|baseurl|referer|prefetch)/$defs{$strip}{$1}/g; } } #dates for (qw(homepage searchpage searchpattern imageurl baseurl urlsuffix referer prefetch)) { if ($defs{$strip}{$_}) { $defs{$strip}{$_} =~ s/(\%(-?)[a-zA-Z])/strftime("$1", @localtime_today)/ge; } } # stuff for (qw(homepage searchpage searchpattern imageurl baseurl urlsuffix referer)) { if ($defs{$strip}{$_}) { $defs{$strip}{$_} =~ s//&my_eval($1)/ge; } } #sanity check vars for (qw(name homepage type)) { unless ($defs{$strip}{$_}) { die "Error: strip $strip has no '$_' value\n"; } } for (qw(homepage searchpage baseurl imageurl)){ if ($defs{$strip}{$_} and $defs{$strip}{$_} !~ /^http:\/\//io) { die "Error: strip $strip has invalid $_\n" } } if ($defs{$strip}{'type'} eq "search") { unless ($defs{$strip}{'searchpattern'}) { die "Error: strip $strip has no 'searchpattern' value in $defs_file\n"; } unless ($defs{$strip}{'searchpattern'} =~ /\(.+\)/) { die "Error: strip $strip has no parentheses in searchpattern\n"; } unless ($defs{$strip}{'matchpart'}) { #die "Error: strip $strip has no 'matchpart' value in $defs_file\n"; $defs{$strip}{'matchpart'} = 1; } if ($defs{$strip}{'imageurl'} and ($defs{$strip}{'baseurl'} or $defs{$strip}{'urlsuffix'})) { die "Error: strip $strip: cannot use both 'imageurl' at the same time as 'baseurl'\nor 'urlsuffix'\n"; } } elsif ($defs{$strip}{'type'} eq "generate") { unless ($defs{$strip}{'imageurl'}) { die "Error: strip $strip has no 'imageurl' value in $defs_file\n"; } } unless ($defs{$strip}{'provides'}) { die "Error: strip $strip has no 'provides' value in $defs_file\n"; } #debugger #foreach my $strip (keys %defs) { # foreach my $key (qw(homepage searchpage searchpattern imageurl baseurl referer prefetch)) { # warn "DEBUG: $strip:$key=$defs{$strip}{$key}\n"; # } # #warn "DEBUG: $strip:name=$defs{$strip}{'name'}\n"; #} undef $strip; } elsif ($sectype eq "group") { chop $groups{$group}{'strips'}; unless ($groups{$group}{'desc'}) { $groups{$group}{'desc'} = "[No description]"; } undef $group; } undef $sectype; } elsif ($sectype eq "class") { if (/^homepage\s+(.+)$/i) { $classes{$class}{'homepage'} = $1; } elsif (/^type\s+(.+)$/i) { unless ($1 =~ /^(search|generate)$/io) { die "Error: invalid type at $defs_file line $line\n"; } $classes{$class}{'type'} = $1; } elsif (/^searchpage\s+(.+)$/i) { $classes{$class}{'searchpage'} = $1; } elsif (/^searchpattern\s+(.+)$/i) { $classes{$class}{'searchpattern'} = $1; } elsif (/^matchpart\s+(.+)$/i) { unless ($1 =~ /^(\d)$/) { die "Error: invalid 'matchpart' at $defs_file line $line\n"; } $classes{$class}{'matchpart'} = $1; } elsif (/^baseurl\s+(.+)$/i) { $classes{$class}{'baseurl'} = $1; } elsif (/^urlsuffix\s+(.+)$/i) { $classes{$class}{'urlsufix'} = $1; } elsif (/^imageurl\s+(.+)$/i) { $classes{$class}{'imageurl'} = $1; } elsif (/^referer\s+(.+)$/i) { $classes{$class}{'referer'} = $1; } elsif (/^prefetch\s+(.+)$/i) { $classes{$class}{'prefetch'} = $1; } elsif (/^provides\s+(.+)$/i) { unless ($1 =~ /^(any|latest)$/i) { die "Error: invalid 'provides' at $defs_file line $line\n"; } $classes{$class}{'provides'} = $1; } elsif (/^artist\s+(.+)$/i) { $classes{$class}{'artist'} = $1; } elsif (/^(.+)\s+?/) { die "Unknown keyword '$1' at $defs_file line $line\n"; } } elsif ($sectype eq "strip") { if (/^name\s+(.+)$/i) { $defs{$strip}{'name'} = $1; } elsif (/^useclass\s+(.+)$/i) { unless (defined $classes{$1}) { die "Error: strip $strip references invalid class $1 at $defs_file line $line\n"; } $defs{$strip}{'useclass'} = $1; } elsif (/^homepage\s+(.+)$/i) { $defs{$strip}{'homepage'} = $1; } elsif (/^type\s+(.+)$/i) { unless ($1 =~ /^(search|generate)$/i) { die "Error: invalid 'type' at $defs_file line $line\n"; } $defs{$strip}{'type'} = $1; } elsif (/^searchpage\s+(.+)$/i) { $defs{$strip}{'searchpage'} = $1; } elsif (/^searchpattern\s+(.+)$/i) { $defs{$strip}{'searchpattern'} = $1; } elsif (/^matchpart\s+(.+)$/i) { unless ($1 =~ /^(\d+)$/) { die "Error: invalid 'matchpart' at $defs_file line $line\n"; } $defs{$strip}{'matchpart'} = $1; } elsif (/^baseurl\s+(.+)$/i) { $defs{$strip}{'baseurl'} = $1; } elsif (/^urlsuffix\s+(.+)$/i) { $defs{$strip}{'urlsuffix'} = $1; } elsif (/^imageurl\s+(.+)$/i) { $defs{$strip}{'imageurl'} = $1; } elsif (/^referer\s+(.+)$/i) { $defs{$strip}{'referer'} = $1; } elsif (/^prefetch\s+(.+)$/i) { $defs{$strip}{'prefetch'} = $1; } elsif (/^(\$\d)\s+(.+)$/) { $defs{$strip}{$1} = $2; } elsif (/^provides\s+(.+)$/i) { unless ($1 =~ /^(any|latest)$/i) { die "Error: invalid 'provides' at $defs_file line $line\n"; } $defs{$strip}{'provides'} = $1; } elsif (/^artist\s+(.+)$/i) { $defs{$strip}{'artist'} = $1; } elsif (/^(.+)\s+?/) { die "Error: Unknown keyword '$1' at $defs_file line $line, in strip $strip\n"; } } elsif ($sectype eq "group") { if (/^desc\s+(.+)$/i) { $groups{$group}{'desc'} = $1; } elsif (/^include\s+(.+)$/i) { $groups{$group}{'strips'} .= join(';', split(/\s+/, $1)) . ";"; } elsif (/^exclude\s+(.+)$/i) { $groups{$group}{'nostrips'} .= join(';', split(/\s+/, $1)) . ";"; } elsif (/^(.+)\s+?/) { die "Error: Unknown keyword '$1' at $defs_file line $line, in group $group\n"; } } } # Post-processing validation for $group (keys %groups) { my (@strips, %nostrips, @okstrips); if (defined($groups{$group}{'nostrips'})) { @strips = sort(keys(%defs)); foreach (split (/;/,$groups{$group}{'nostrips'})) { $nostrips{$_} = 1; } } else { @strips = split(/;/, $groups{$group}{'strips'}); %nostrips = (); #empty } foreach (@strips) { unless ($defs{$_}) { warn "Warning: group $group references non-existant strip $_\n"; } next if ($nostrips{$_}); push (@okstrips,$_); } $groups{$group}{'strips'} = join(';',@okstrips); } } sub my_eval { my ($code) = @_; $code =~ s/\\\>/\>/g; return eval $code; #print STDERR "DEBUG: eval returned: " . scalar(eval $code) . ", errors: $!\n"; } sub make_avantgo_table { my ($file, $file_ext) = @_; my ($rows, $cols, $table); my $dimensions = `identify \"$file\"`; $dimensions =~ m/^$file (\d+)x(\d+)/; my $width = $1; my $height = $2; if (int($width/160) != ($width/160)) { $cols = int($width/160) + 1; } else { $cols = $width/160; } if (int($height/160) != ($height/160)) { $rows = int($height/160) + 1; } else { $rows = $height/160; } my $file_base = $file; $file_base =~ s/$file_ext$//; $file_base =~ s/ /\%20/g; $table = ""; foreach my $row (0 .. ($rows-1)) { $table .= ""; foreach my $col (0 .. ($cols-1)) { $table .= ""; } $table .= ""; } $table .= "
"; return $table; } sub make_avantgo_files { my ($file, $file_ext) = @_; my $file_base = $file; $file_base =~ s/$file_ext$//; system("convert -crop 160x160 \"$file\" \"$file_base-\%d$file_ext\""); } sub get_homedir { if ($^O =~ /Win32/ ) { my $dir = $ENV{'USERPROFILE'}; if ($dir eq "") {$dir = $ENV{'WINDIR'};} $dir =~ s|\\|/|g; return $dir; } else { return (getpwuid($>))[7]; } } dailystrips-1.0.28/dailystrips-clean0100755000076500007650000000700107676352255017344 0ustar amedicoamedico#!/usr/bin/perl # # Program Summary: # # Name: dailystrips-clean # Description: removes all downloaded dailystrips in the current directory # that are older than a specified number of days # Author: Andrew Medico # Created: 12 Feb 2002, 21:44 EST # Last Modified: 21 Jun 2002, 03:28 EDT # Current Revision: 1.0.1 # # Set up use strict; no strict qw(refs); use POSIX qw(strftime); use Getopt::Long; # Variables my (%options, $version, $time_today, @files); $version = "1.0.1"; $time_today = time; # Get options GetOptions(\%options, 'quiet|q','verbose|v','test|t','dir=s','archive|a','version|v','help|h') or exit 1; # Help and version override anything else if ($options{'help'}) { print "Usage: $0 [OPTIONS] DAYS DAYS is the number of days to keep. Options: -q --quiet Turn off progress messages -v --verbose Turn on extra progress information, overrides -q -t --test Do not acutally remove files -d --dir DIR Work in specified directory instead of current directory -a --archive Update archive.html file -V --version Print version number -h --help Print this help Bugs and comments to dailystrips\@amedico.dhs.org\n"; exit; } if ($options{'version'}) { print "dailystrips-clean version $version\n"; exit; } unless (defined $ARGV[0]) { die "Error: no number of days specified\n"; } else { $options{'days'} = $ARGV[0]; if ($options{'days'} =~ m/\D/) { die "Error:number of days must be numeric\n"; } if ($options{'days'} =~ m/\D/) { die "Error:number of days must be numeric\n"; } } # verbose overrides quiet if ($options{'verbose'} and $options{'quiet'}) { undef $options{'quiet'}; } # get list of existing files if ($options{'dir'} and (not $options{'dir'} =~ /\/$/)) { $options{'dir'} .= "/"; } @files = grep(/\d{4}\.\d{2}\.\d{2}/, glob("$options{'dir'}*")); for (@files) { if ($options{'verbose'}) { print "Existing file: $_\n"; } } # filter out files to keep for (0 .. $options{'days'} - 1) { my $save_day = strftime("\%Y.\%m.\%d", localtime ($time_today - (86400 * $_))); unless ($options{'quiet'}) { print "Keeping files for: $save_day\n"; } @files = grep(!/$save_day/, @files); } # remove anything that's still on the list for (@files) { if ($options{'verbose'}) { print "Removing file/directory: $_\n"; } unless ($options{'test'}) { if (-d $_) { my $dir_not_empty; foreach my $sub (glob("$_/*")) { unless (unlink("$sub")) { warn "Could not remove file $sub: $!\n"; $dir_not_empty = 1; } } if ($dir_not_empty) { warn "Directory $_ not empty, cannot remove\n"; } else { rmdir($_) or warn "Could not remove directory $_: $!\n"; } } else { unlink($_) or warn "Could not remove file $_: $!\n"; } } } if ($options{'archive'}) { if (open(ARCHIVE,"<$options{'dir'}archive.html")) { my $oldest = strftime("\%Y.\%m.\%d", localtime ($time_today - (86400 * ($options{'days'}-1)))); my $out; while() { if (/(\d{4}\.\d{2}\.\d{2})/) { if ($1 lt $oldest) { $_ = ""; } } $out .= $_; } close(ARCHIVE); if (open(ARCHIVE,">$options{'dir'}archive.html")) { print ARCHIVE $out; } else { warn "Error: cannot update archive.html - could not write file: $!\n"; } } else { warn "Error: cannot update archive.html - could not read file: $!\n"; } }dailystrips-1.0.28/dailystrips-update0100755000076500007650000001602307722315053017533 0ustar amedicoamedico#!/usr/bin/perl # # Program Summary: # # Name: dailystrips-update # Description: downloads updated dailystrips definitions # Author: Andrew Medico # Created: 29 May 2003, 10:07 EDT # Last Modified: 29 May 2003, 17:03 EDT # Current Revision: 1.0.0 # # Set up use strict; no strict qw(refs); use LWP::UserAgent; use HTTP::Request; use POSIX qw(strftime); use Getopt::Long; use File::Copy; # Variables my (%options, $version, $dailystrips_version); $version = "1.0.0"; $dailystrips_version = "1.0.28"; # Get options GetOptions(\%options, 'quiet|q','verbose','proxy=s', 'proxyauth=s','noenvproxy','version|v','help|h', 'retries=s','updates=s','minage=s') or exit 1; # Process options: # Note: Blocks have been ordered so that we only do as much as absolutely # necessary if an error is encountered (i.e. do not load defs if --version # specified) # Help and version override anything else if ($options{'help'}) { print "Usage: $0 [OPTIONS] This program will attempt to download updated dailystrips definitions and save the information to ~/.dailystrips-updates.def Options: -q --quiet Turn off progress messages --verbose Turn on extra progress information, overrides -q --proxy host:port Use specified HTTP proxy server (overrides environment proxy, if set) --proxyauth user:pass Set username and password for proxy server --noenvproxy Ignore the http_proxy environment variable, if set --retries NUM When downloading items, make NUM attempts instead of only once --updates FILE Save updates to FILE instead of ~/.dailystrips-updates.def --minage NUM Skip downloading updates if local file is less than NUM seconds old -v --version Print version number Bugs and comments to dailystrips\@amedico.dhs.org\n"; exit; } # Handle options that are needed first if ($options{'version'}) { print "dailystrips version $version\n"; exit; } if ($options{'retries'} =~ m/\D/) { die "Error: 'retries' value must be numeric\n"; } unless ($options{'retries'}) { $options{'retries'} = 3; } #Set proxy if ($options{'proxy'}) { $options{'proxy'} =~ /^(http:\/\/)?(.*?):(.+?)\/?$/i; unless ($2 and $3) { die "Error: incorrectly formatted proxy server ('http://server:port' expected)\n"; } $options{'proxy'} = "http://$2:$3"; } if (!$options{'noenvproxy'} and !$options{'proxy'} and $ENV{'http_proxy'} ) { $ENV{'http_proxy'} =~ /(http:\/\/)?(.*?):(.+?)\/?$/i; unless ($2 and $3) { die "Error: incorrectly formatted proxy server environment variable\n('http://server:port' expected)\n"; } $options{'proxy'} = "http://$2:$3"; } if ($options{'proxyauth'}) { unless ($options{'proxyauth'} =~ /^.+?:.+?$/) { die "Error: incorrectly formatted proxy credentials ('user:pass' expected)\n"; } } # verbose overrides quiet if ($options{'verbose'} and $options{'quiet'}) { undef $options{'quiet'}; } # minimum age must be non-zero if ($options{'minage'} =~ m/\D/) { die "Error: 'minage' value must be numeric\n"; } if ($options{'minage'} < 0) { die "Error: 'minage' value must be >= 0\n"; } unless ($options{'minage'}) { $options{'minage'} = 0; } # 1 retry by default unless ($options{'retries'}) { $options{'retries'} = 1; } # default updates path unless (defined $options{'updates'}) { $options{'updates'} = &get_homedir() . "/.dailystrips-updates.def"; } # Download new definitions and save unless ($options{'quiet'}) { print "dailystrips-update $version starting...\n"; } &get_updated_defs($options{'updates'}); sub http_get { my ($url, $referer) = @_; my ($request, $response, $status); my $headers = new HTTP::Headers; $headers->proxy_authorization_basic(split(/:/, $options{'proxyauth'})); $headers->referer($referer); my $ua = LWP::UserAgent->new; $ua->agent($options{'useragent'}); $ua->proxy('http', $options{'proxy'}); for (1 .. $options{'retries'}) { # main request $request = HTTP::Request->new('GET', $url, $headers); $response = $ua->request($request); ($status = $response->status_line()) =~ s/^(\d+)/$1:/; if ($response->is_error()) { if ($options{'verbose'}) { warn "Warning: could not download $url: $status (attempt $_ of $options{'retries'})\n"; } } else { return $response->content; } } # if we get here, URL retrieval completely failed warn "Warning: failed to download $url\n"; return "ERROR: $status"; } sub get_updated_defs { # set parameters my $updates_file = shift; my $updates_rev_url = "http://dailystrips.sourceforge.net/UPDATES/ds-update-" . $dailystrips_version . ".rev"; my $updates_url = "http://dailystrips.sourceforge.net/UPDATES/ds-update-" . $dailystrips_version; my $local_revision = 0; my $remote_revision = 0; # only update if local update file is old enough if (time() - (stat($updates_file))[9] < $options{'minage'}) { if ($options{'verbose'}) { print "Existing file is too new, exiting\n"; } return; } # check revision of local file if (open(UPDATES,"<$updates_file")) # or die "Error: cannot read updates file: $!\n"; { while() { if (/^#REVISION:\s*(\-?\d+)/i) { $local_revision = $1; #print "line in local: $_\n"; last; } } close(UPDATES); } if ($options{'verbose'}) { print "Local revision: $local_revision\n"; } # find current revision my $updates_rev = &http_get($updates_rev_url); if ($updates_rev =~ /^ERROR/) { die "Error: failed to download updates\n"; } # check revision of downloaded file for(split(/\n/, $updates_rev)) { if (/^#REVISION:\s*(\-?\d+)/) { $remote_revision = $1; last; } } if ($options{'verbose'}) { print "Remote revision: $remote_revision\n"; } # if there is a newer file available, download and save it if ($remote_revision > $local_revision) { unless ($options{'quiet'}) { print "Downloading updated definitions..."; } # download updates my $updates = &http_get($updates_url); if ($updates =~ /^ERROR/) { print "failed\n"; die "Error: failed to download updates\n"; } unless ($options{'quiet'}) { print "done\n"; } open(UPDATES,">$updates_file") or die "Error: cannot write updates ($updates_file) file: $!\n"; print UPDATES $updates; close(UPDATES); } else { unless($options{'quiet'}) { print "Local file is already latest revision, exiting.\n"; } } } sub get_homedir { if ($^O =~ /Win32/ ) { my $dir = $ENV{'USERPROFILE'}; if ($dir eq "") {$dir = $ENV{'WINDIR'};} $dir =~ s|\\|/|g; return $dir; } else { return (getpwuid($>))[7]; } } dailystrips-1.0.28/install.pl0100755000076500007650000000611707722307311015765 0ustar amedicoamedico#!/usr/bin/perl -w # # Program Summary: # # Name: install.pl # Description: installs dailystrips # Author: Andrew Medico # Created: 13 Jul 2001, 11:34 EST # Last Modified: 29 May 2003, 21:15 EDT # Current Revision: 1.0.5 # # Set up use strict; # Misc vars my (%options, $prog_version); $prog_version = "1.0.28"; # Not for Win32 if ($^O =~ /Win32/ ) { die "install.pl is not for use on Win32 systems. Please see INSTALL file.\n"; } # Editable paths $options{'sharedir'} = "/usr/share/dailystrips"; $options{'docdir'} = "/usr/share/doc/dailystrips-$prog_version"; $options{'scriptdir'} = "/usr/bin"; # Help overrides anything else for (@ARGV) { if (/^(--help|-h)$/) { print <-p.jpg&code=cs$2 provides any end class comicspage-panels-gen # $1 - more or less the real name # $2 - 3-letter abbreviation of $1 homepage http://www.comicspage.com/$1/index.html #type search #searchpage http://www.comicspage.com/$1/main.html #searchpattern -p.jpg&code=cp$2 #provides latest provides any end class comicspage-editorial-gen # $1 - more or less the real name # $2 - 3-letter abbreviation of $1 homepage http://www.comicspage.com/$1/index.html #type search #searchpage http://www.comicspage.com/$1/main.html #searchpattern /$1/$1%m%dg.gif provides any end class washpost-king homepage http://www.washingtonpost.com/wp-srv/style/comics/king.htm?$1 prefetch $homepage imageurl http://est.rbma.com/content/$1 type generate provides latest end class washpost-uclick homepage http://www2.uclick.com/client/wpc/$1/ type search searchpattern provides latest end class slate-cagle homepage http://cagle.slate.msn.com/politicalcartoons/PCcartoons/$1.asp type search searchpattern baseurl http://www.penny-arcade.com/ provides latest end strip plif name Parking Lot is Full homepage http://www.plif.com type generate imageurl http://www.plif.com/thisweek.gif provides latest end # gone? 2002-04-02 #strip punc # name Punc & Mark # homepage http://byteus.com/pm/ # type search # searchpage http://artiztik.com/cgi-bin/pmviewer.cgi?list=pm&config=pm.cfg&slide=999&style=pm # searchpattern baseurl $homepage provides latest end strip redmeat name Redmeat homepage http://www.redmeat.com/redmeat/current/ type generate imageurl http://www.redmeat.com/redmeat/current/index-1.gif provides latest end strip rudypark name Rudy Park homepage http://www.rudypark.com/ type generate imageurl http://www.rudypark.com/comics/rudy%Y%m%d.gif provides latest end strip sinfest name Sinfest homepage http://sinfest.net type generate imageurl http://sinfest.net/comics/sf%Y%m%d.gif provides any end strip sluggy name Sluggy Freelance homepage http://www.sluggy.com/ type search searchpage http://www.sluggy.com/daily.php?date=%y%m%d searchpattern %d.gif # provides any #end strip clanofthecats name Clan of the cats homepage http://www.clanofthecats.com/ #type generate #imageurl http://www.clanofthecats.com/comics/%Y%m%da.gif #provides any type search searchpage http://www.clanofthecats.com/d/%Y%m%d.html searchpattern 2;$s++if$w\>4;my$c=int(($s+99)/100);"ff${c}00/fv00$s.gif"> provides any end strip 8bit name 8-Bit Theater homepage http://www.nuklearpower.com/latest.php type search searchpattern provides latest end strip apodbig name Astronomy Picture of the Day (big image) homepage http://antwrp.gsfc.nasa.gov/apod/ type search searchpattern provides latest end strip fuzzylogic name Fuzzy Logic homepage http://www.bbspot.com/comics/fuzzy_logic/index.html type generate imageurl http://www.bbspot.com/Images/comics/fuzzy_logic/%Y/%Y%m%d.jpg provides any end strip littlegamers name Little Gamers homepage http://www.little-gamers.com/ #type generate #imageurl http://www.little-gamers.com/comics/%Y%m%d.gif #provides any type search searchpattern end # tuesdays, thursdays, sundays strip machall name Mac Hall homepage http://www.MacHall.com/ type search searchpattern baseurl http://www.cnsnews.com/cartoon/ provides latest end strip lang name Bob Lang Cartoon homepage http://www.cnsnews.com/cartoon/lang.asp type search searchpage http://www.cnsnews.com/cartoon/Lang.asp searchpattern baseurl http://www.cnsnews.com/ provides latest end strip shelton name Barry Shelton Cartoon homepage http://www.cnsnews.com/cartoon/shelton.asp type search searchpattern baseurl $homepage provides latest end strip winter name Winter homepage http://www.wintercomic.com/ type search #searchpattern img src='(pages/page(\d+)\.gif)' searchpattern baseurl http://lcd.keenspace.com provides latest end # could easily generate strip devilspanties name The Devil's Panties homepage http://thedevilspanties.keenspace.com type search searchpattern provides latest end strip spooner name Spooner homepage http://www.hookedoncomics.com/ type generate imageurl http://www.hookedoncomics.com/comics/Sp%Y%m%d.gif provides any end strip underpower name Under Power artist Jorge "Vaz" Rivas and David "vanishing" Trischuk homepage http://underpower.non-essential.com/ type generate imageurl http://underpower.non-essential.com/comics/%Y%m%d.jpg provides any end strip nekobox name Nekobox artist Jorge "Vaz" Rivas and David "vanishing" Trischuk homepage http://www.nekobox.org type generate imageurl http://www.nekobox.org/comic/%Y-%m-%d.jpg provides any end strip perscheid name Perscheids Abgruende artist Martin Perscheid -> www.martin-perscheid.de homepage http://portale.web.de/Boulevard/Comics/Perscheid/ type search searchpattern www.harmbengen.de homepage http://portale.web.de/Boulevard/Comics/Bengen/ type search searchpattern www.weyershausen.de homepage http://portale.web.de/Boulevard/Comics/Weyershausen/ type search searchpattern www.quirit.com homepage http://portale.web.de/Boulevard/Comics/Quirit/ type search searchpattern .html searchpage $homepage provides latest end strip tarzan name Tarzan useclass unitedmedia-srch-comics end strip thatslife name That's Life useclass unitedmedia-srch-wash end strip topofworld name Top of the World! useclass unitedmedia-srch-comics-lag end # done! #strip usplay # name The US of Play # useclass unitedmedia-srch-comics #end # also done! #strip warped # name Warped # useclass unitedmedia-srch-comics #end strip workingdaze name Working Daze useclass unitedmedia-srch-comics end strip pcnpixel name PC and Pixel useclass unitedmedia-srch-wash provides latest end strip billday name Bill Day useclass unitedmedia-srch-editoons $1 day end strip billschorr name Bill Schorr useclass unitedmedia-srch-editoons $1 schorr end strip claybennett name Clay Bennett useclass unitedmedia-srch-editoons $1 bennett end strip drewlitton name Drew Litton useclass unitedmedia-srch-editoons $1 litton end strip edstein name Ed Stein useclass unitedmedia-srch-editoons $1 stein end strip ettahulme name Etta Hulme useclass unitedmedia-srch-editoons $1 hulme end strip henrypayne name Henry Payne useclass unitedmedia-srch-editoons $1 payne end strip jeffstahler name Jeff Stahler useclass unitedmedia-srch-editoons $1 stahler end strip jerryholbert name Jerry Holbert useclass unitedmedia-srch-editoons $1 holbert end strip jimberry name Jim Berry useclass unitedmedia-srch-editoons $1 berry end strip mikesmith name Mike Smith useclass unitedmedia-srch-editoons $1 smith end strip robrogers name Rob Rogers useclass unitedmedia-srch-editoons $1 rogers end #strip robertariail # name Robert Ariail # useclass unitedmedia-srch-editoons # $1 ariail #end strip stevebenson name Steve Benson useclass unitedmedia-srch-editoons $1 benson end # sfgate strips strip babyblues name Baby Blues useclass sfgate-gen $1 Baby_Blues end strip beetlebailey name Beetle Bailey useclass sfgate-gen $1 Beetle_Bailey end strip blondie name Blondie useclass sfgate-gen $1 $name end strip crock name Crock useclass sfgate-gen $1 $name end strip curtis name Curtis useclass sfgate-gen $1 $name end strip dennisthemenace name Dennis the Menace useclass sfgate-gen $1 Dennis_The_Menace end #non-standard strip farley name Farley homepage http://www.sfgate.com/columnists/farley/ type search provides latest searchpattern