Kludge to replace WebMagick's javascript thumbnail index with existing no-javascript one.

webmagick's generated thumbnail index contains javascript which breaks badly under reasonably secure Mozilla settings. Using this wrapper allows you to view the resulting thumbnail indeces without compromising you browser configuration.

Yeah, this *is* a marginal post to snippets.   The criteria appear to be clever, useful, and hard to write, so I'm batting 300.   8^P

#!/usr/bin/perl -w # webmagick.pl # pod at tail $|++; use strict; use Cwd; my $dmw = 'index.html'; my $wmBin = '/usr/bin/webmagick'; my $wmSyn = '--forcehtml --forcecache --forcemontage'; my $wmPaths = '--rootpath /var/www/ --iconpath doc/webmagick/icons/'; my $wmColors = '--colorback white --thumbbackground white'; my $baseDir = '/var/www/Graphics'; my @dirs = ( 'Christian', 'Ico', 'Icons', 'Images', 'Tech', ); for(@dirs){ -d "$baseDir/$_" or next; chdir "$baseDir/$_" or next; unlink $dmw if -w $dmw; system("$wmBin $wmSyn $wmPaths $wmColors") and warn $!; unlink $dmw if -w $dmw; symlink '.index1.html', 'index.html' or warn $!; } =head1 TITLE wm.pl =head1 DESCRIPTION Wrapper for webmagick. Webmagick creates thumbnails and markup to easily browse said thumbnails Sadly, Debian's current webmagick uses JavaScript in it's markup. My Mozilla settings don't seem to like that. So this ditty runs webmagick against a configured list of image directories, then unlinks the javascripted index.html, and symlinks index.html from a non-JS thumbnail montage page. Yes, I know it's a brittle kludge. But I don't care because it's *my* kludge. ;^) Oh yeah, and as a kludge, it doesn't support recursing directories. P.S. $dmw stands for Dead Man Walking. I considered $ejs for Evil Java Script. =head1 AUTHOR ybiC =head1 UPDATES 2002-04-20 20:55 CDT Post to PerlMonks Initial working code =cut

In reply to (code) WebMagick, thumbnail index, no javascript by ybiC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.