|
PicasaFS
Open your picasa images like normal files and directories.
IntroductionPicasaFS 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.) InstallationDownload 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:
UsageInstallationPut the files in a directory of your choice (if you downloaded a .zip file, unzip it first). Mount the filesystemThe 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] OptionsYou 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.
Options are comma separated. Credential filesThe 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 albumsOnce 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 photosUploading 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 metadataThe 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 filesAgain, 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) CommentsAny 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