My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 23, 2008 by havard.gulldahl
Labels: Featured
PicasaFS  
Open your picasa images like normal files and directories.

Introduction

PicasaFS gives you your picasa images as a local file system: you can copy, move, delete, rename and more, just like with other files.

This is accomplished with FUSE+python-fuse and it's really quite nifty. (You may have seen this before, in flickrfs.)

Installation

Download the package from the project pages:

Or, if you want to get the latest version of the code, get it from SVN. Note that this code is not guaranteed to work, though:

  1. http://picasapush.googlecode.com/svn/trunk/mount.picasafs
  2. http://picasapush.googlecode.com/svn/trunk/picasafs.py

Usage

Installation

Put the files in a directory of your choice (if you downloaded a .zip file, unzip it first).

Mount the filesystem

The process of connecting the PicasaWeb server to your file system is called mounting. You can mount the PicasaWeb file system to any empty directory.

By convention, mount directories exist under /mnt, /mount or /tmp.

Syntax:

Run this command (as a normal user) to mount the virtual photo file system. You can put it in your /etc/fstab, too.

    mount.picasafs none  /mnt/picasapics [-o options]

Options

You may want to add options to the mount script. At the moment this allows you to supply a username, a password, or a password file, e.g.

  1. -o username=test.me@gmail.com,password=Mydirtysecret
  2. -o credentials_file=/tmp/mysecretfile

Options are comma separated.

Credential files

The credentials_file option must contain the full path name of a file that contains the Google Photos username and password, separated by a newline.

By default, the program also tries to read a credentials file from ~/.picasapass, and if it exists it is assumed to contain the username and password (again, each on a line of its own).

This way you don't have to reveal the password in /etc/fstab or the process listing. Take care to create this file with 0400 privileges.

If you supply the username or password options, their values will override any values from any credentials read from files.

Creating and removing albums

Once your file system is mounted, create an album with mkdir:

  mkdir /mnt/picasapics/My\ New\ Album

You can remove the album if there are no photos in it:

  rmdir /mnt/picasapics/"My New Album"

Adding and removing photos

Uploading is easy. Just copy the file into the album:

  cp ~/Photos/shiny.jpg /mnt/picasapics/"My New Album"/"Shiny sea"

You can also let PicasaFS scale the picture for you - this requires the Python Imaging Library (PIL):

  cp ~/Photos/shiny.jpg /mnt/picasapics/"My New Album"/.UPLOAD_640x480/"Shiny sea"

To remove a photo, use rmdir:

  rmdir /mnt/picasapics/"My New Album"/"Shiny sea"

Reading and updating photo description, tags, and other metadata

The photo has a lot of metadata tied to it. Each photo property lives in its own text file, update it with your text tool of choice, e.g.:

Will output the tags of the photo:

  cat /mnt/picasapics/"My New Album"/"Shiny sea"/tags.txt 

Update the latitude and longtitude (a.k.a. GPS info):

  echo "-71.10 x 10.0" > /mnt/picasapics/"My New Album"/"Shiny sea"/where.txt

Since the the directory name is based on the description, the directory structure will change if you update description.txt.

Photo attributes available as files

Again, you may change these attributes by editing each file.

  checksum.txt        --  unique checksum generated by Google at upload
  client.txt          --  name of the upload client (default PicasaFS)
  date.txt            --  date of upload
  info.txt            --  xx
  original.jpg        --  (READONLY) the original image
  rotation.txt        --  rotation in degrees (default 0)
  tags.txt            --  photo tags, a.k.a. keywords
  thumb_?x?.jpg       --  (READONLY) photo thumbnails in various sizes
  where.txt           --- latitude x longtitude: "GPS data" (WGS84 datum)

Comments

Any comments live in a sub-directory of the image, COMMENTS. Each comment is represented by a file.

Add a comment by creating a new file. Don't worry about the file name, just make sure that the new file has a .txt extension!


Sign in to add a comment
Hosted by Google Code