Uploading photos to picasa using googlecl w/ single click


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Uploading photos to picasa using googlecl w/ single click
# 1  
Old 06-20-2010
Question Uploading photos to picasa using googlecl w/ single click

Hi.

As you may (or may not) know:
Quote:
Google has introduced a command line utility for accessing various Chocolate Factory services, including YouTube, Blogger, Google Docs, Calender, and Contacts.
Here is the sample command that I find interesting:
Code:
google picasa post --title "Vermont Test" ~/old_photos/*.jpg #  Add to an album

So I am using ubuntu and a while ago, I found a nice little script that opens the terminal right from the folder that is currently opened. That saves me a lot of time as I don't have to repeatedly type 'cd' in the cmd line; I can run the script by right-clicking anywhere in Nautilus (Ubuntu's "Explorer").

Here is the code for the 'Open Terminal Here' script:
Code:
#!/bin/bash 
# From Chris Picton 
# Replaces a Script by Martin Enlund 
# Modified to work with spaces in path by Christophe Combelles 
  
# This script either opens in the current directory, 
# or in the selected directory 
  
base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`" 
if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then 
     dir="$base" 
else 
     while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done 
     dir="$base/$1" 
fi 
  
gnome-terminal --working-directory="$dir"

So what I want to do is add the picasa command above to this script. That will obviously let me upload all photos from an opened album folder directly to a picasa album.

So far I tried adding the picasa command at the last line of the "O.T.H" script, and some other variation, but I can't get that command to be executed.

Any help will be greatly appreciated Smilie

Thx
# 2  
Old 06-27-2010
BUMP...
# 3  
Old 06-27-2010
why not just create a script with an argument to specify location of folder to upload>?
# 4  
Old 06-27-2010
Quote:
Originally Posted by 3junior
why not just create a script with an argument to specify location of folder to upload>?
I do not know how to do that :S
# 5  
Old 06-27-2010
Code:
#!/bin/bash
google picasa post --title "$1" $2/*.jpg #  Add to an album

save the script to anyname.sh
chmod 755 anyname.sh
to upload pictures
./anyname.sh title path
ie. ./anyname.sh UNIXPICS /home/user/UNIXPICS
# 6  
Old 07-04-2010
Quote:
Originally Posted by 3junior
Code:
#!/bin/bash
google picasa post --title "$1" $2/*.jpg #  Add to an album

save the script to anyname.sh
chmod 755 anyname.sh
to upload pictures
./anyname.sh title path
ie. ./anyname.sh UNIXPICS /home/user/UNIXPICS
When I use this instead, for creating an album and uploading photos from it:

Code:
google picasa create --title "$1" $2/*.png

It still asks me to specify the title, when I want it to be named just like the folder I'm uploading photos from.

Also, the command fails even when I specify any title :S
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete Photos Script

Good Morning, I need to move a social networking site to another server and I need to delete a bunch of photos. The old site used to allow, our members, to upload up to 100 photos. Now I want to limit it to 10. How can I delete the remaining photos? Here is what it looks like: 2474-14637.jpg... (7 Replies)
Discussion started by: mpw5013
7 Replies

2. UNIX for Dummies Questions & Answers

Left click select,right click copy

Hi all, when i ssh into my linux machine, i can do a double left click and then right click to paste it anywhere i need. However, on the actual machine, in the terminal, i cannot do a double left click and right click to paste it. i need to right click and select Copy followed by click click... (1 Reply)
Discussion started by: new2ss
1 Replies

3. UNIX for Dummies Questions & Answers

uploading

can i upload the file using telnet from my computer to the internet ... let me repeat ... using putty telnet :) and whats the command ?? (6 Replies)
Discussion started by: SeeD
6 Replies
Login or Register to Ask a Question