Thursday, November 03, 2005

Announcing Flickrfs!

Always wanted to create a virtual filesystem for Gmail in Linux. However, someone stole me of that privilege. Now that festival holidays were coming near giving me some time to do some hacking, I decided to go for the most popular online photo sharing service, Flickr. What other way can it be when you want a prototype up and running rapidly; hence, Python.

Flickrfs is a virtual filesystem based upon FUSE for Linux. It can be mounted on your computer and then can be accessed using the standard commands. But, here are the twists. The filesystem uses threads, and hence, improves usability and speed. When you mount the filesystem, it will create 2 directories automatically: 'tags' and 'sets'. 'sets' will automatically retrieve your photos (only metadata information, hence fast) and will show you all the photos available in your sets. You can then easily copy images to your hdd. And here comes the nicer part, If you want to add some more photos to these sets, just copy them to the folder, and they will be uploaded to the respective set.

'tags' directory allows for searching functionality. It contains 2 directories, 'personal', and 'public'. To search for any tag, just create a directory inside, with separating the tags with ':'
# pwd
/tmp/flickrfs/tags/public
# mkdir linux:ubuntu

This will start searching for photos available in public domain matching these 2 tags, and will provide a list of all these photos. And all this will happen in background, with the help of threads, so dun have to sit and watch while results come.

Now, if you want to upload your photo with tags 'opensource', 'party', 'sfd', then just do this. In either tags/personal, or tags/public, create a directory
#mkdir "opensource:party:sfd"

and then just copy over the images to this directory, they will automatically be uploaded with these tags. And ya! An additional tag 'flickrfs' ;).

For those who will be wondering how long is it going to take to search and 'download' the files over to local disk; Dun worry! Flickrfs doesn't download anything till you either open the photo for viewing, or copy them to some other location. Its a purely virtual filesystem, even the files and directories that are visible to you don't exist on your hdd.

And here comes a trick:
If you searched for say photos with 'linux' tag, and like a particular photo, want to post it online on flickr; just do this
# cd /tmp/flickrfs/tags/public/linux
# cp Penguins\ Austin ./Penguin_Austin

And whoa! The photo is straightaway uploaded to flickr with tags 'linux' (and 'flickrfs' :D).

With Flickrfs, you don't have to worry if you have the photo or not, just upload from where you find it. And those who are mad about 'Flickrlicio.us' (like me), what other way to copy over all those *beautiful* photos to you hdd. Flickrfs is made to provide maximum functionality possible using the general linux commands. If time permits, I will probably be adding a 'gmail' folder, which will allow uploading of photos/files to gmail as well.

The project is hosted at sourceforge: http://sourceforge.net/projects/flickrfs. Check out the Installation instructions at the home page: http://flickrfs.sourceforge.net. To the fans of Flickr out there, Do try it out! :)

I would surely like to thank the Open Source Community for allowing the creation of such a FS. Used flickr api by beej. Though debugged and modified it to allow for uploading through proxy as well. Richard's (the someone) Gmailfs code came in handy as well, to create all those virtual inodes. And especially thanks to my prime inspiration for flickr Deepak's pyflickruploader.

Tags:

10 comments:

pemdasi said...

Cool idea.

Quick Online Tips said...

Now listed in the Great Flickr Tools Collection.

JJ said...

Did you think about limiting bandwidth on the client side, instead of doing it on the serverside?

mann said...

Thanks to all for trying out flickrfs.

@quick online tips: Thanks for putting it up in flickr tools. That's great!

Anonymous said...

Any chance something like this could be built into FSpot? That would be pretty cool :)

Anonymous said...

I posted a guide for Ubuntu Linux, and some comments at the Ubuntu blog.

Web 2.0 café said...

FlickrFS announcement on Web 2.0 café

mann said...

Thanks people for blogging abt it, and making it more reachable.
Please do check out version 1.1

@F-Spot: That'll be great. However, will include completely different set of code, as that will be GUI based, integrated into the application itself.

@Ubuntu blog: Your guide on installation is surely handy. I have included a separate page for ubuntu installation here

@Web 2.0 Cafe: That's great!

nagu (ನಾಗು) said...
This comment has been removed by a blog administrator.
mann said...

@nagu: Please use flickrfs mailing list, or mail me up privately regarding the problems/bugs encountered in flickrfs.