Quantcast
Viewing latest article 10
Browse Latest Browse All 11

Terminal 101: Posting Photos to Google’s Picasa Service

Image may be NSFW.
Clik here to view.
Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!

We’re continuing our series of Terminal 101s focusing on accessing and using Google’s services through the command line. Today, we’ll show you how to use Google’s photo-sharing service, Picasa. Like Flickr, Picasa lets you create albums of photos, tagging them along the way so you can find them later. Today, we’ll show you how to create an album, populate it with your photos, tag them, and even delete them, all through the Terminal.

Note: If you haven't already done so, follow our guide from last week to set up your Mac to enable your computer to talk with Google's services. The guide can be found here.

Listing Your Photos

Image may be NSFW.
Clik here to view.

If you want to see a listing of all the photos currently stored inside of your Google Picasa account, use the following command:

google picasa list

After pressing enter, you will be given a list of photos, beginning with the title of the photo, followed by a comma, then a URL of the photo that can be viewed on Picasa's web service.

Creating Albums with Photos

Image may be NSFW.
Clik here to view.

In Picasa, Albums are a way to organize your photos into distinct sections. To create a new album, simply open the Terminal and type the following command:

google picasa create --title "My Album Title" --tags Tag ~/pathToPhotos/*

Replace “My Album Title” with the name of the album that you are creating, replace “Tag” with the tag that you wish to use with the album (this is optional), and finally replace “pathToPhotos” with the path and name of the folder containing the photos that you wish to upload. Since we specified a wildcard (the *) after the path, it will go through all the files in that folder, and upload all of the photos.

Uploading Photos to Existing Albums

Image may be NSFW.
Clik here to view.

If you have an existing album and wish to upload single or multiple photos to it, then it’s just as easy. Simply use the following command, replacing the string “My Album Title” with the title of the album the photos will be added to, and replace “pathToPhotos” with the path and name of the folder of photos that you wish to upload:

google picasa post --title "My Album Title" ~/pathToPhotos/*

Optionally, if you wish to only upload a single photo instead of an entire folder of photos, then you could specify only a single picture instead:

google picasa post --title "My Album Title" ~/pathToPhoto/Photo.jpg

Deleting Photos or Albums

Image may be NSFW.
Clik here to view.

So, you’ve posted something, and now you want to remove it? No problem. Instead of going through the Picasa website to do the same task, we can delete photos and albums right from the command line by specifying the following command:

google picasa delete --title "My Album Title"

You can replace “My Album Title” with the title of an album that you wish to remove; or, you can replace that string with the name of the single photo that you wish to remove. After pressing enter, you will be asked to confirm your intentions before the photo will be removed from your Picasa account for good. If you have multiple albums or photos that match the same search name, then you will be asked to confirm the deletion of each one.

Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.


Viewing latest article 10
Browse Latest Browse All 11

Trending Articles