netcomics - retrieve comics from the Internet
netcomics [-lhDvvs] [-p proxy] [-n,-N days] [-c,-C ids]
[-S,-T,-E date] [-d,-m,-t dir] [-w,-W[=n] [-wt title]]
The netcomics program will download today's comic strips from the Web, and place them in
a spool directory where they can be retrieved for display. Because each
website that carries comic strips chooses how old of strips to show, the
comic strips downloaded will actually be from different dates. Most common
will be comic strips that are 1 week, 2 weeks, and 3 weeks old. Also, each
website is not updated at the same time, nor are any of them updated at a
consistent time during the day. Therefore, when running netcomics as a cron
job in the early morning, you may need to rerun it by hand a little later
in the day to get the comics that it couldn't find. The exact command to
run is given at the end of netcomics output if any failures occured.
netcomics also supports retrieving specific dates of comics. A ``Starting Date'' may
be specified with -S. An ``Ending Date'' may be specified with -E. And a specific date may be specified with
-T. All dates are given in the M-D-[YY]YY format. If a start date is given
without an end date, -n may be used to specify the number of days of comics to retrieve starting at
the specified start date. If an end date is given without a start date, -n will specify the number of days of comics to retrieve counting backwards
from the end date. If a start date is given without -n or -E, then the end date is assumed to be today's date. If the option given to -E,
-S, or -T is just an integer, that integer is interpretted as the number of days
prior to the current day (specify specific dates relatively).
Another way to specify the dates to download comics, is to use -N
in conjunction with -n. The argument to -N is the number of days prior to the current day to retrieve comics. Note
that this does not specify an actual date. It rather indicates the number
of days ago a comic was made available, rather than the actual date of the
comic. To see how far behind the date of each comic is from the date it
actually gets released, use -l. So if today is Wednesday, and you specify -N 2, netcomics will download the comics that were made available on Monday. This is useful
for running netcomics in a timezone that is way ahead of the timezones the
comics' websites are located.
netcomics was created for the purpose of giving your weiry mind a little relief from
your hectic workday, so another script called display_comics is also provided as an example way to periodically show the retrieved comic
strips throughout the workday.
Important: The further east your timezone is from the US, the later in the day you'll
have to run netcomics. As a reference, I suggest those whose timezone in GMT to wait to run the
script at 12:30pm if they want to get all the comics at a time that's
pretty likely to have had all of the websites updated. Use -N if you want to run the script early in the morning and are having problems
getting comics to download. Also, just because a comic failed to download
doesn't mean that the module for that comic is broken--it most likely the
website just hasn't been updated yet.
netcomics can also create an HTML file, ``index.html'', in the directory you have the
comics placed. If a number is given with
-W or -w, it will be used to determine the number of comics to be placed in each
html file. Subsequent files are named ``comic#.html''.
Disclaimer: Do not put the comics up on the Internet! You should only use them for your
own use. Also, do not redistribute the comics downloaded by netcomics in any other way unless you receive written authorization from each
publisher.
- -c 'comic_ids'
-
Get the supplied comics (ids are seperated by white spaces). This option
may be repeated, and may not be used in conjunction with -C.
- -C 'comic_ids'
-
Don't get the supplied comics (ids are seperated by white spaces). This
option may be repeated, and may not be used in conjunction with -c.
- -d dir
-
Put comics into directory. Default is /var/spool/netcomics.
- -D
-
Delete files in directory before retreiving.
- -E [date | days]
-
Specify an ending date, or the date that is the specified number of days
prior to today, with which to define the range of days of comics to
retrieve. Must be used in combination with one of -S or -n. The date is of the form: M-D-Y.
- -f date_fmt
-
Specify the date format used when naming files. Default is
'%y%m%d'
.
- -h
-
Show usage. Comics will not be downloaded.
- -l
-
List supported comics & their identifiers. Comics will not be
downloaded.
- -m dir
-
Add dir to the locations of comic modules. Default is /usr/lib/netcomics.
This option may be repeated to add multiple directories.
- -n days
-
Retrieve this number of days of comics, going backwards. Default is 1. This
option may be used in conjunction with -N.
- -N days
-
Start retrieving comics this many days before the currently available date.
If you use -l to show the comic id's, the 3rd column indicates the number of days behind
a comic is available. By default, if -E or -S are not specified, then netcomics will retrieve each comic, understanding
that the lastest available is that many days ago (according to the number
shown in the 3rd column). Use this option to push the number of days ago
back even further. Default is 0. This option may be used in conjunction
with
-n. It may not be used in conjuntion with -S or -E.
- -p url
-
Specify a URL to use as a proxy. Both HTTP and FTP are supported.
- -s
-
Don't skip bad comics when creating the webpage. This will potentially
cause the webpage to be loaded into a browser more slowly, but it will make
it evident exactly which websites don't return proper HTTP errors.
- -S [date | days]
-
Specify a starting date, or the date that is the specified number of days
prior to today, with which to define the range of days of comics to
retrieve. May be used in combination with of -E or
-n. The date is of the form: M-D-Y.
- -t dir
-
Specify the location of html template files. Default is
/usr/lib/netcomics/html_tmpl.
- -T [date | days]
-
Specify a specific date, or the date that is the specified number of days
prior to today, of comics to retrieve. This option my be repeated. The date
is of the form: M-D-Y.
- -v
-
Be a little verbose.
- -vv
-
Be extra verbose
- -w[=n]
-
Create an html file, index.html, for the comics downloaded. Optionally, n
specifies the number of comics to have in each page, where subsequent html
files are named comic#.html.
- -wt title
-
Specify a title for the webpage rather than the default (``Today's Comics
From the Web on <DATE>``). This is useful for when you download specific comics, and want the
title of the webpage to reflect the actual contents.
- -W[=n]
-
Recreate the html file, index.html, from the comics that are in the
directory, as well as any new comics downloaded. Optionally, n specifies
the number of comics to have in each page, where subsequent html files are
named comic#.html.
-
Run as a cron job at 7:30am, Monday through Friday, removing the previous
day's comics beforehand, and creating a webpage. And for Monday, also
retrieve Saturday & Sunday's comics.
30 07 * * 2-5 /usr/bin/netcomics -D -w
30 07 * * 1 /usr/bin/netcomics -n 3 -D -w
-
Same as before, except, for Monday, get Saturday's & Sunday's comics,
and for Tuesday, get Monday & Tuesday's. This is so there isn't such an
overload of comics on Monday.
30 07 * * 1 /usr/bin/netcomics -E 1 -n 2 -D -w
30 07 * * 2 /usr/bin/netcomics -n 2 -D -w
30 07 * * 3-5 /usr/bin/netcomics -D -w
-
Grab Dilbert & Foxtrot comics from the past 30 days, place them in
/tmp, and create a webpage with a specific title (<DATE> gets
replaced with the name of the month).
netcomics -c "dilbert ft" -n 30 -d /tmp -w -wt 'Dilbert & \
Foxtrot Comics From the Month of <DATE FORMAT="%b">'
-
Specify the date range of comics to retrieve to be from Feb 3, 1999 to Feb
6, 1999, and also get comics on March 3, 1998.
netcomics -S 2-3-99 -E 2-6-99 -T 3-3-98
-
Specify the date range of comics to retrieve to be from Jan 6, 1999 and the
5 days before it. Get all the comics except Jerkcity and Doodie
netcomics -E 1-6-99 -n 6 -C jc -C doodie
-
Specify the date range of comics to retrieve to be all those that came
available three, four, and five days ago.
netcomics -N 3 -n 3
- /usr/lib/netcomics
-
Directory containing the modules that return RLI's.
- /usr/lib/netcomics/html_tmpl
-
Directory containing the HTML template files used to create the webpage.
- /var/spool/netcomics
-
Default directory where comics and the webpage are placed.
- /usr/bin/display_comics
-
Example script that should be modified to be used to display the downloaded
comics.
-
Have options be able to be supplied smushed together.
-
Finish each of the disabled modules.
-
User .netcomicsrc file to specify options.
-
Add timezone adjustment logic & include general TZ for each rli.
-
Implement a better display_comics program.
-
Find a program that can display animated gifs.
-
Implement a backup-site scheme.
-
Add webpage creation option to arrange comics in webpages by accumulative
size.
-
Add webpage creation option to specify order of comics in webpages.
-
Find screensavers that can show the comics.
-
Add option to delete a comic file if it fails the Image::Size test.
Ben Hochstedler <hochstrb@cs.rose-hulman.edu>
ICQ: 15469308 AIM: hochstrb