Automating Flickr upload

By camille

More automating :-)

I was fed up by having to resize and then manually upload all images to flickr web interface by hand…

So I wrote the little script below, that calls the JFlickrUploader http://sourceforge.net/projects/jflickruploader

That script transforms images found in current dir! (use copies!):

flickrize.sh -family

by default images are reduced to 800×800.

#!/bin/bash
# http://sourceforge.net/projects/jflickruploader
JFU=/usr/local/bin/jflickruploader-1.0-rc3/JFlickrUploader
max_size=800x800
echo "Resizing images to $max_size maximum...."
files=$(find . -maxdepth 1 -type f |grep -Ei 'jpg$|jpeg$|gif$|png$' |sort -r)
for i in $files; do echo $i; mogrify -geometry $max_size "$i";done
$JFU $* -files $files

Note that first time the script is used you’ll have to register the uploading tool to flickr. Follow instructions.

Enjoy!

One Response to “Automating Flickr upload”

  1. Wildman Says:

    Two comments, one: I guess it’s better if you add the -quality parameter to the mogrify command to avoid degrading ‘even more’ the JPEG (yes, quality matters), so the mogrify command would be:
    mogrify -geometry $max_size -quality 85 “$i”

    Two: it’s flickr, not fliskr ;-)

    Nice article

Leave a Reply