<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Random Musings&#187; fspot</title> <atom:link href="http://www.nslms.com/tag/fspot/feed/" rel="self" type="application/rss+xml" /><link>http://www.nslms.com</link> <description></description> <lastBuildDate>Wed, 06 Jul 2011 20:47:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>Uploading to Flickr from Picasa on Linux</title><link>http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rss</link> <comments>http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/#comments</comments> <pubDate>Sun, 14 Dec 2008 21:17:30 +0000</pubDate> <dc:creator>RyanG</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Photography]]></category> <category><![CDATA[digikam]]></category> <category><![CDATA[flickr]]></category> <category><![CDATA[fspot]]></category> <category><![CDATA[gentoo]]></category> <category><![CDATA[linkedin]]></category> <category><![CDATA[picasa]]></category> <category><![CDATA[upload]]></category> <guid
isPermaLink="false">http://www.nslms.com/?p=51</guid> <description><![CDATA[When I performed my search for the perfect photo sharing solution, I fell in love with the Picasa desktop application. I even discovered that there is a linux version. However, as you&#8217;d likely expect, it didn&#8217;t really play nice as far as uploading photos to any photo sharing site other than Google&#8217;s Picasa Web Albums. [...]]]></description> <content:encoded><![CDATA[<div
class="tweetmeme_button" style="float: right; margin-left: 10px;"> <a
href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nslms.com%2F2008%2F12%2F14%2Fuploading-to-flickr-from-picasa-on-linux%2F"><br
/> <img
src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nslms.com%2F2008%2F12%2F14%2Fuploading-to-flickr-from-picasa-on-linux%2F&amp;source=rjgeyer&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br
/> </a></div><p>When I performed my search for the perfect <a
href="http://www.nslms.com/2008/09/25/photo-sharing-services/">photo sharing</a> solution, I fell in love with the Picasa desktop application.  I even discovered that there is a linux version.  However, as you&#8217;d likely expect, it didn&#8217;t really play nice as far as uploading photos to any photo sharing site other than Google&#8217;s Picasa Web Albums.</p><p>On windows, there is a great solution called <a
href="http://jerryong.com/blog/2008/06/picasa2flickr-uploads-your-picasa-photos-directly-to-flickr/">picasa2flickr</a> which passes the desired photo&#8217;s to the windows <a
href="http://www.flickr.com/tools/uploadr/">Flickr Uploader</a>.  Again, for obvious reasons, this doesn&#8217;t work well on linux.</p><p>So, having determined that it wasn&#8217;t worth my time to pursue trying to get Flickr uploads working from Picasa on Linux, I started evaluating many of the other native options on linux, such as digikam and fspot.  While these more easily uploaded to Flickr, and had open API&#8217;s, none of them worked quite the way I wanted, so I abandoned my search for a good solution.</p><p>Then, on a whim I did a Google search just a couple hours after Andy O&#8217;Neill made a <a
href="http://ultrahigh.org/2008/12/09/picflick-picasa-to-flickr-export-on-linux/">blog post</a> about a button he wrote to import photos to Flickr from the Linux version of Picasa, named picflick.</p><p>I eagerly (re)installed Picasa3 on my Gentoo box using a beta ebuild found <a
href="http://bugs.gentoo.org/show_bug.cgi?id=240406">here</a>.  Then installed his button.</p><p>After playing with it for a bit, I realized a few things didn&#8217;t quite jive for me.</p><p>1) The script automatically resizes the image before uploading it to Flickr.  I prefer to upload all of my images at their original resolution, so this was a bit of a road block for me.</p><p>2) The script used a Perl module to upload to Flickr.  For the life of me, I couldn&#8217;t seem to figure out how to get it authorized with my Flickr account to actually permit uploads.  I&#8217;m sure if I spent a bit more time and read a few more manuals I could have gotten it right, but it didn&#8217;t quite work &#8220;out-of-the-box&#8221; for me.</p><p>3) I&#8217;d prefer to see the progress being made, rather than the beeps and tray notifications that Andy&#8217;s script provided.</p><p>So, I stole the key part of his script, the part which translates Windows paths to *nix ones, and broke down the rest to simply pass the photos on to my preferred linux Flickr uploader, <a
href="http://kflickr.sourceforge.net/wikka.php?wakka=Kflickr">KFlickr</a></p><p>Here&#8217;s the contents of my script, including the win2native function written by Andy.</p><pre lang="bash" line="1">
#!/bin/bash
DEBUG=1     # debug to $LOG
LOG=/tmp/picflick.log
PICASA_WINE_DIR="$HOME/.google\/picasa\/3.0\/drive_c"  # Relative to $HOME
PICASA_WINE_DIR_NATIVE=`echo $PICASA_WINE_DIR |sed 's|\\\\||g'`
function debug() {
        if [ $DEBUG -eq 1 ]; then
                echo "$*" >> $LOG
        fi
}
# wine2native(): convert wine filename to native linux filenames
# Arguments: _name_ of variable which holds path
# Example: wine2native file  # not wine2native $file
function wine2native() {
        VAR=$1
        eval "VAL=\$$1"
        debug "Wine path: $VAL"
        # use '|' to delimit the paths
        VAL=`echo "$VAL" | \
                sed "s|C:|$PICASA_WINE_DIR|" | \
                sed 's|\\\\|/|g'`
        debug "Source file: $VAL"
        eval "$VAR=\$VAL"
}
# check we have the required dependencies
which kflickr > /dev/null || die "You need to install kflickr"
file=$1
wine2native file
DIR=`dirname "$file"`
EXT=${file##*.}
debug "START_UPLOAD"
for file in "$@"; do
        wine2native file
        KFLICKR="$KFLICKR $file"
done
debug "Launching kflickr with the following args $KFLICKR"
kflickr $KFLICKR
debug "Done"
</pre><p>Now when I click the &#8220;Flickr&#8221; button in Picasa, it brings up the KFlickr app with all the pictures I selected ready to upload.  Thanks for the inspiration, and code bits to make this work Andy, I was too lazy to actually figure out what was necessary to pull the image paths from Picasa and use them.</p><div
class="shr-bookmarks shr-bookmarks-center"><ul
class="socials"><li
class="shr-blogger"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=219&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a></li><li
class="shr-comfeed"> <a
href="http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li
class="shr-facebook"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a></li><li
class="shr-linkedin"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a></li><li
class="shr-mail"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading%20to%20Flickr%20from%20Picasa%20on%20Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=201&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li><li
class="shr-posterous"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=210&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post this to Posterous">Post this to Posterous</a></li><li
class="shr-twitter"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li
class="shr-digg"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a></li><li
class="shr-friendfeed"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a></li><li
class="shr-googlereader"> <a
href="http://www.shareaholic.com/api/share/?title=Uploading+to+Flickr+from+Picasa+on+Linux&amp;link=http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/&amp;notes=When%20I%20performed%20my%20search%20for%20the%20perfect%20photo%20sharing%20solution%2C%20I%20fell%20in%20love%20with%20the%20Picasa%20desktop%20application.%20%20I%20even%20discovered%20that%20there%20is%20a%20linux%20version.%20%20However%2C%20as%20you%27d%20likely%20expect%2C%20it%20didn%27t%20really%20play%20nice%20as%20far%20as%20uploading%20photos%20to%20any%20photo%20sharing%20site%20other%20than%20Google&amp;short_link=&amp;shortener=google&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=207&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a></li></ul><div
style="clear: both;"></div><div
class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a
target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div
style="clear: both;"></div></div> ]]></content:encoded> <wfw:commentRss>http://www.nslms.com/2008/12/14/uploading-to-flickr-from-picasa-on-linux/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> </channel> </rss>
