Creating doc/netcomics.html from doc/netcomics.pod mics


NAME

netcomics - retrieve comics from the Internet


SYNOPSIS

netcomics [-bBDhiIlLosuvv] [ -c,-C ``comic ids''] [ -p proxy] [ -S,-T,-E date] [ -n,-N days] [ -d,-m,-t dir] [ -f date_fmt] [ -g [program]] [-nD] [ -r rc_file] [ -W,-w [=n]] [-nw]


DESCRIPTION

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 occurred.

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 interpreted 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 weary mind a little relief from your hectic workday, so another script called show_comics has been provided to periodically popup the retrieved comic strips throughout the workday. Another script called display_comics has also been provided, but it is only an example script of what can be done for displaying comics on many users computers on a network.

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.


OPTIONS

-b
Get black & white comics if their is a choice between that and color.

-B
Don't get black & white comics if their is a choice between that and color. Use this option to override the setting in the rc file.

-c 'comic_ids'
Get the supplied comics (ids are separated 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 separated 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 retrieving.

-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'.

-g [program]
Specify a program to use to perform HTTP requests. The URL to retrieve is attached to the end of the provided text without a space. The program must write the retrieved content of the URL on its stdout. The default command is:

'wget -q -O - '.

-h
Show usage. Comics will not be downloaded.

-i
Don't create an index for the webpages.

-I
Create an index for the webpages. Specify this to override the setting in the rc file if need be.

-l
List supported comics & their identifiers, sorted by name alphabetically. Comics will not be downloaded.

-L
Sort comics in webpages by date and when using -l , by days behind.

-m dir
Add dir to the locations of comic modules. Default is /usr/share/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 latest 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 , but not with -S or -E .

-o
Write the webpage on standard out. Cannot specify the number of comics per page for -W or -w if you use this option.

-p url
Specify a URL to use as a proxy. Both HTTP and FTP are supported.

-r rc filename
Specify an alternate name for the user-specific rc file

-s
Don't skip bad comics when creating the web page. This will potentially cause the web page 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/share/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.

-u
Don't download comics, but print URLs on stdout, or if creating a webpage, make the images be implementing using the URLs.

-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.

-nw
Don't create a webpage. Use this option to override the rc file setting if need be.

-wt title
Specify a title for the web page 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 web page 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.

.


EXAMPLES

  1. Run as a cron job at 7:30am, Monday through Friday, removing the previous day's comics beforehand, and creating a web page. 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

  2. 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 -N 1 -n 2 -D -w 30 07 * * 2 /usr/bin/netcomics -n 2 -D -w 30 07 * * 3-5 /usr/bin/netcomics -D -w

  3. Grab Dilbert & Foxtrot comics from the past 30 days, place them in /tmp, and create a web page 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">'

  4. 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

  5. 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

  6. 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

  7. Specify the date range of comics to retrieve to be all those that are dated three, four, and five days ago. This example is given to show the difference between -E & -S (when given a number) and -N. All comics downloaded will have the same 3 dates, while in the previous example, the comics will have varying dates that are determined by the 3rd column in the output of -l. Note that since many comics aren't available until 2 weeks have past, many of them will not download with this example.

    netcomics -E 3 -n 3 or netcomics -E 3 -S 5

  8. Use wget instead of libwww-perl (makes it so you don't have to install libwww-perl).

    netcomics -g

  9. Do not actually download the comics, and output the webpage to stdout.

    netcomics -uwo

.


FILES

/usr/share/netcomics
Directory containing the modules that return RLIs.

/usr/share/netcomics/html_tmpl
Directory containing the HTML template files used to create the web page.

/var/spool/netcomics
Default directory where comics and the web page are placed.

/usr/bin/display_comics
Example script that should be modified to be used to display the downloaded comics.

.


BUGS

Some of the comics depend on having the LANG and/or LC_CTYPE set so that
the abbreviated month names are of only a certain locale. Therefore, these comics will not download for certain locals.

.


SEE ALSO

show_comics(1)


AUTHOR

Ben Hochstedler <hochstrb@cs.rose-hulman.edu> ICQ: 15469308 AIM: hochstrb