Archives for: July 2006

07/18/06

Fuse and FCO's

A few days ago Ikke was experimenting with FUSE. I had read about FUSE on Planet Gnome, but I never really looked into its possibilities. It seems though that FUSE could provide a solution for the first problem I mentioned at the end of my previous post. Writing a FUSE filesystem doensn't seem to be all that hard, and there are Python bindings too! (mmmm, Python :-p )

But the more I think about this, and the more I discuss it with Ikke, the more I'm convinced that this 'magic' directory should do a lot more than just move files. It should also allow me to browse my files in some set-based way. That brings us to the FCO's, or First Class Objects: a user should be able to browse his/her FCO's (and their attributes). When he/she wants to listen to music of artist Foo, he/she just browses to ~/Music/Artist/Foo/. (This example is based on the functionality of TagsFs.) Equally, when our user wants to open a file that belongs to a Project he/she is working on (Projects are FCO's), he/she browses to ~/Projects/Bar/. When the 'Bar' Project has a Subproject called 'Barbar', our user just browses to ~/Projects/Bar/Subprojects/Barbar/. (I'm assuming here that Project has a 'Subprojects' attribute.)

Not only should our user be able to find his/her files through this interface, it should also work the other way around: when a file is dropped into ~/Projects/Bar/ it should appear there each time that directory is opened. To implement this kind of behaviour, a database of FCO's should be updated each time files are being handled in these 'magic' directories. The files themselves could be moved into a seperate (hidden?) directory where they can be easily retrieved when needed. Ikke has some great ideas about how this could work.

But what if our user wants to group some files together that don't have any relation that can be expressed with an FCO? Answer: tags. There should be an extra 'magic' directory ~/Tags/ that allows the user to browse using tags. ~/Tags/Fun/ would contain all fun files, ~/Tags/Vacation/ should return all files with a 'Vacation' tag. Now let's say that our user wants to view all files that are fun, and have something to do with vacation. A possible path could be ~/Tags/Fun/Vacation/ or ~/Tags/Vacation/Fun/. The problem with these paths is that only interections between the tag-sets are possible. Unions and complements should be possible too...

This could be solved by adding special keywords to the path: 'and', 'or' and 'not'. The path for an intersection would then be: ~/Tags/Fun/and/Vacation/. Files that are fun, but do not have anything to do with vacation would be in ~/Tags/Fun/and/not/Vacation/. And files that are fun or are vacation-related would be in ~/Tags/Fun/or/Vacation/.

I hope I'll find some time to implement tiny parts of this in the near future. If I get something interesting working, I'll post it here. :-)

Permalink . RealNitro . 20:47:39 . 586 Words . Coding . Email . 1337 views

07/16/06

Auch


Should I be worried?

Permalink . Ikke . 12:04:05 pm . 4 Words . Life . . 839 views . 3 comments

07/12/06

Automatic file-sorting

My home directory is a mess. I have all kinds of files on my Desktop, in my downloads directory, in a Media directory, everywhere. The reason for this is that I'm too lazy to move new files into their appropriate directories. Especially when I'm downloading stuff. The ideal situation would be to have all my videos inside my Media/Video directory, my music inside my Media/Music directory (preferably inside an artist/album subdirectory), images in another directory, screenshots inside a subdirectory of that image directory, etc.

The problem is that I'm forced to do all of this by hand, and that I only do it from time to time:

jens@dell ~ $ ls downloads/ | wc -l
122

The 'algorithm' I use to move the files I download to their destination directories is executed by me, not by my computer.

Some time ago, I started dreaming about an 'active' directory that did this sorting for me. This directory would:

  1. Detect when a file was dropped inside of it

  2. Extract all needed (meta)data from the file

  3. Analyse this data and descide where the file should be moved to

  4. Tag the file

  5. Move the file

The tagging of the file would allow to reconstruct the contents of the 'magic' directory with a saved Beagle search. That way I could still open my downloads directory right after I downloaded a new file, and find that new file inside of it.

Having an idea is one thing, implementing it is another. I would like to implement this idea, but there are a few problems still remaining that keep me from doing so:

  • Which technology should I use to make the directory 'active'? And by 'active' I mean that a script or some code would be called for each file that is moved into it. Could this be done in Gnome-VFS, or should some daemon monitor the directory?
  • The 'active' folder should be configurable in an easy, intuitive and flexible way. I will need to give this some thinking. The (simple) filtering user-interfaces I know are not flexible enough to use them for this purpose.

If you read this, and have an idea to solve (a part) of these problems, or any other idea about the rest of this post, please leave a comment. ;-)

Permalink . RealNitro . 20:12:24 . 378 Words . Coding . Email . 1582 views