Main »

Computers-software-scripts




2010.3.25

picst code ver2 with thumbnails is here updated the script to handle spaces in the dir/file/ names and to show larger or mid size image on mouse over if available.
it doesn't create the thumbnails, just displays them next to the file name.
updated thumbn.pl below too to generate the mid and thumb nail images now only if they don't already exist.
you can test it here with thumbnails


thumbn2 code, generates thumbnails is here thumbn2.pl will auto generate thumbnails both mid(640x480) and small(75x50) sizes and put them in a dir called ./thumbs, ONLY if they don't already exist.
with the above script will all a medium sized pop picture when one does a mouse over of the thumbnail.
it uses a cmd line something like this:
>find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" -o -iname "*.tif" -o -iname "*.tiff" \) -exec ./thumbn2.pl {} \;
had to : sudo apt-get install imagemagick perlmagick
as it wasn't standard on my web server.
if at somepoint you want to remove all the 'thumbs/' directories, maybe to have them all recreated, this cmdline came in handy:
>find . -type d -name thumbs -exec rm -rf {} \;

I used this crontab entry to do a scan and auto thumbnail creation once an hour:
22 * * * * /usr/bin/find /var/www/www.mywebsite.com/web/travels -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.gif" -o -iname "*.tif" -o -iname "*.tiff" \) -mmin +15 -exec /var/www/www.mywebsite.com/web/travels/thumbn2.pl {} \; > /dev/null 2>&1

2010.1.25

picst code with thumbnails is here updated the script below to show thumbnails if available.
it doesn't create the thumbnails, just displays them next to the file name.
you can test it here with thumbnails


thumbn.pl code, generates thumbnails is here thumbn.pl will auto generate thumbnails and put them in a dir called ./thumbs.
it uses a cmd line something like this:
>find . \( -iname *.jpg -o -iname *.jpeg -o -iname *.png -o -iname *.gif -o -iname *.tif -o -iname *.tiff \) -exec ./thumbn.pl {} \;
had to : sudo apt-get install imagemagick perlmagick
as it wasn't standard on my web server.
if at somepoint you want to remove all the 'thumbs/' directories, this cmdline came in handy:
>find . -type d -name thumbs -exec rm -rf {} \;


findem.cgi code, generates thumbnails via web access is here findem.cgi will auto generate thumbnails and put them in a dir called ./thumbs.
it is meant to be run from a web page / access .. but the problem is the web server has
to be able to create sub directories ... <frown> .. not likely in most setups.
listed here for maybe future use. I used the cmdline perl tool find2perl to gen the code.
>find2perl . \( -iname *.jpg -o -iname *.jpeg -o -iname *.png -o -iname *.gif -o -iname *.tif -o -iname *.tiff \) -exec ./thumbn.pl {} \;


picst code is here old version, see above for latest version - nice little script when dumped in a dir under a web browser, will produce url for all the pictures it finds.
generates simple navigation bar at the top of the page.
when filename is clicked on picture will display in a new browser window.
you can test it here \\

top level subjects:

Page last modified on October 29, 2014, at 04:10 AM

^