NAME

Comics::Fetcher::Direct -- Named url grabber

SYNOPSIS

  package Comics::Plugin::LeastICouldDo;
  use parent qw(Comics::Fetcher::Direct);

  sub register {
      # Current image is date formatted.
      my @tm = localtime(time);
      my $path = sprintf( "%s/%04d/%02d/%04d%02d%02d.jpg",
			  "wp-content/uploads",
			  1900+$tm[5], 1+$tm[4],
			  1900+$tm[5], 1+$tm[4], $tm[3] );
      shift->SUPER::register
	( { name    => "Least I Could Do",
	    url     => "http://www.leasticoulddo.com/",
	    path    => $path,
	  } );
  }
  # Return the package name.
  __PACKAGE__;

DESCRIPTION

The Direct Fetcher requires registration of a path that is the URL of the desired image. This image will be fetched and saved.

The Fetcher requires the common arguments:

name

The full name of this comic, e.g. "Least I Could Do".

url

The base url of this comic.

Fetcher specific arguments:

path

The URL of the desired image.

If path is not an absolute URL, it will be interpreted relative to the url.