Automating Flickr upload

by

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!

Publicités

2 Réponses 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

  2. Wade Says:

    Hello would you mind stating which blog platform you’re working with?
    I’m going to start my own blog soon but I’m having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your layout seems different then most blogs and I’m looking for
    something unique. P.S Apologies for getting
    off-topic but I had to ask!

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s


%d blogueurs aiment cette page :