NAME

ping-mega.pl - generates urls to each image in each size

SYNOPSIS

ping-mega.pl url [ /path/to/image-root | /path/to/config ]

DESCRIPTION

ping-mega.pl takes a url and optional a path to the image-root or the config. Without that path it will expect the images in the default location (see WWW::MeGa) which is most likely not what you want.

Now it searches for files in the root dir and outputs the matching url to each file in each size (atm the sizes are: 0, 1 and 2, see WWW::MeGa for more futher info about the thumbnail sizes).

The idea behind that is simple: The thumbnails of WWW::MeGa are getting generated on the fly, but you might force the (re)generation of the thumbnails (for not letting your visitors wait when the thumbnail is getting created the first time or if you have changed some images)

USAGE EXAMPLES

You can pipe to output to a tool like wget for creating read the thumbnail:

ping-mega.pl http://sophiesfotos.de/gallery /webjail/bilder/sophie/ | xargs -d'\n' wget -O /dev/null

TODO

  • read sizes from config

  • refresh Folder thumbnails only (for the case the THUMBNAIL link was changed)