Working On TagFs

26 Sep 2008 19:23

Today I spent another hour or two on working on tagfs (described in TagFs Idea). It's now pretty much usable. You can now:

  • browse files with the tag-directory mapping
    • directory tag1/tag2/tag3 is the same as tag2/tag3/tag1 or tag3/tag1/tag2
  • read/write files
    • file tag1/tag2/tag3/file is the same as tag2/tag3/tag1/file AND even tag2/tag1,tag3,file
    • tags are not only allowed as directory names, but also as comma-separated file prefix
  • create new files
    • echo Some Content > tag1/tag2/some_file
    • echo Some Other Content > tag1/tag2,some_file
  • files have all their "real" properties (owner, group, modification time — this is stored on the back-end filesystem)

Things to do yet:

  • forbid creating a file with tags rendering some directory with name of existing file
    • example: you have tag1/great file
    • then you create a tag1/tag2,great,people.txt file
    • this way, you would have a great directory showing in the tag1 directory, because there is a file having both tag1 and great
    • you also have great file there, so you end up with a file and a directory (tag) of the same name
  • scan and list files by their properties
    • file type — PDF, JPEG, HTML, …
    • EXIF tags for JPEG — date taken, camera info
    • ID3 tags for MP3 — artist, title, album
  • improve directory listing
    • include SOME files in sub-directories if the sub-directories consist of small number of files
    • as a result we get a easily-browsable repository of files
  • do some marketing
    • I would like to serve files from such a file system with FTP or Apache to let people feel the system

I think this experiment is really worth working on this.

In case you want to test the FS, drop me a note or comment.

Comments: 1

tag filesystem idea

31 Aug 2008 08:14

I just thought of my ideal file system, where nothing hides and is easy to find (without going through the whole system — either manually, or automatically — find or even the indexed way — mlocate).

The main idea is tags.
When I save a file I want to give it some tags.
Moreover, I want to be able to find a file based on its properties, like

  • file properties — author, date created, type (PDF/TXT/XML)
  • EXIF data — camera name, camera settings
  • audio tags — artist, title, year, album, genre

How could it look like?

# ls /home/quake
wikidot/    python/    work/    tmp/    img/    music/
# ls /home/quake/wikidot
work/    tmp/    img/    howto.pdf
# ls /home/quake/wikidot/work
# ls /home/quake/work/wikidot

So it looks, like it doesn't matter if you navigate to work and then to wikidot or the reverse.

Moreover, I want to browse all my music files (having music tag) by author information:

# ls /home/quake/music/+artist/
Britney Spears/    Shakira/

PDF files inside of wikidot:

# ls /home/quake/wikidot/+type/pdf/

This idea will be implemented with:

  • Filesystem in User SpacE — FUSE
  • Python
  • SQLite
  • Ubuntu laptop :)

Wish me luck

Comments: 3

Python Database: The Work Continues

28 Aug 2008 21:36

Today more work was done by me on the object oriented database implemented in Python.

I dealt with some problems I came across like proper object encapsulation. Now, my database allows any object to be stored in it, even of classes that are internally used by my database.

I implemented "." and "WHERE" operators, which seemed the worst, because they needed working environmental stack.

Now comes, what's the most individual — optimizing things with query cache. Actually it's not a query cache, but rather a evaluateNode cache, but this works very similar (the only difference is that the evaluateNode cache is more deep in operation and can be used inside of queries. This means it can accelerate the processing even for one query!

More work will come for sure on this, because the cache seems to be really tricky with such a flexible database model we've assumed.

Keep tuned for more news

Comments: 1

Object Database In Python - Day 2

16 Aug 2008 16:12

Hello again,

as pointed in the previous day comment, there is another IDE for developing in Python, which is BoaConstructor. As a matter of fact, I haven't taken that into consideration, because it was told it is a IDE for GUI development. As I was not about creating a GUI, this was completely skipped.

My impressions of the IDEs:

  • pida, geany, drpython — interesting, but not worth a try for me
  • eric — good overall, but raises many dialog boxes with information of exceptions. These are fatal and are about the GUI, so you have to click OK and continue working

I tried the Eric first, because it was written as a really good program. I like it, but it is not polished and would never be bought (if commercial) by anyone:

  • the support for SVN is really tricky
  • the GUI is really not intuitive — no "delete a file" or "new file (here)" in the navigator context menu
  • the code completion is there, but not really so clever

for example, having the following code:

class aClass:
    def method(self, param):
        assert isinstance(param, list)

the IDE should know, that the param is a list and complete the list methods! I believe the PyDev plugin for Eclipse already did it when I last used it.

After trying all the listed IDEs I got back to Eric as one of two best Python IDEs tried by me (the second is PyDev).

Happy Pythoning
Your Piotr

Comments: 1

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License