Posts Tagged gentoo
Uploading to Flickr from Picasa on Linux
Posted by RyanG in Linux, Photography on December 14, 2008
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’d likely expect, it didn’t really play nice as far as uploading photos to any photo sharing site other than Google’s Picasa Web Albums.
On windows, there is a great solution called picasa2flickr which passes the desired photo’s to the windows Flickr Uploader. Again, for obvious reasons, this doesn’t work well on linux.
So, having determined that it wasn’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’s, none of them worked quite the way I wanted, so I abandoned my search for a good solution.
Then, on a whim I did a Google search just a couple hours after Andy O’Neill made a blog post about a button he wrote to import photos to Flickr from the Linux version of Picasa, named picflick.
I eagerly (re)installed Picasa3 on my Gentoo box using a beta ebuild found here. Then installed his button.
After playing with it for a bit, I realized a few things didn’t quite jive for me.
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.
2) The script used a Perl module to upload to Flickr. For the life of me, I couldn’t seem to figure out how to get it authorized with my Flickr account to actually permit uploads. I’m sure if I spent a bit more time and read a few more manuals I could have gotten it right, but it didn’t quite work “out-of-the-box” for me.
3) I’d prefer to see the progress being made, rather than the beeps and tray notifications that Andy’s script provided.
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, KFlickr
Here’s the contents of my script, including the win2native function written by Andy.
#!/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"
Now when I click the “Flickr” 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.
My First 64bit PC
Posted by RyanG in PC Upgrade, Worklogs on October 23, 2008
Time for the second installment of my worklog for my PC Upgrade.
Well, I actually received all the bits from UPS Monday (is it Thursday already? sheesh). I actually assembled the thing Monday afternoon/evening, and have been slowly installing software and getting it up to speed.
For the curious, and so I can brag a bit heres the parts list.
- FSP Group SAGA+ 450R 450W ATX12V Power Supply
- COOLER MASTER Centurion 534 RC-534-KKN2-GP Black Aluminum & Mesh bezel / SECC Chassis ATX Mid Tower Computer Case
- Intel BOXDP35DPM LGA 775 Intel P35 ATX Intel Motherboard – Retail
- Intel Core 2 Quad Q6600 Kentsfield 2.4GHz 2 x 4MB L2 Cache LGA 775 Quad-Core Processor
- 4 x 2GB = 8GB Kingston 2GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400)
- EVGA 512-P3-N954-TR GeForce 9500 GT 512MB
- Seagate Barracuda 7200.11 ST3500320AS 500GB 7200 RPM
Now, this isn’t quite bleeding edge stuff but it certainly brings me up to date and I’m quite happy. Because I wanted just a ROCK SOLID setup and wasn’t intending to overclock, I went with an Intel motherboard. I didn’t want to regret not getting enough memory, so I maxxed it out with 8GB. I don’t really game so the video card is nothing special, but I did want enough horsepower to drive my big monitor and take advantage of Vista’s Aero theme and some of the cool linux eye candy that’s in KDE4 etc. I am NOT disappointed!
So far I’ve gotten Gentoo linux installed on the system. The speed of compiling is admirable though not mind blowing. One of the first things I installed though was Cinelerra and I loaded up some of my HDV source material. While I should have expected as much I was able to play, edit, and render the HD in realtime! WOO HOO!
I’m quite impressed with Gentoo, no hardware headaches, everything more-or-less worked out of the box. I haven’t quite got all my favorite apps installed and running but I trust it will be uneventful.
I’m in the process of moving my drives/data over from my old system. I had a software RAID1 setup using mdadm which I’ve been able to bring back up on the new box. Going to play with a RAID5 since I now have enough disks, and maybe simulate a failure to test recovery. This should get my confidence up for building a linux software based RAID5 NAS box which is the next project.