A virtual filesystem based on llfuse. It presents a collection of files in a virtual directory structure based by the of the files metadata (Simple Key-Value pairs). Each directory-level represents a key and all directories in it are different values for this key, respecting the key/values pairs of the higher directories.
This is best explained by an example: mp3 Here, the files are sorted by their id3-tags. So you could sort them by
Genre/Album/Year/Artist/Album/file.mp3
or by
Artist/Album/file.mp3
The filename itself is also generated by a user-defined pattern. You can access the metadata by '%{KEY}' In the id3-case the default filename is: "%{tracknumber} -- %{title}.mp3"
The type of metadata supported is implemented by plugins, thus it is easy to extend.
Another plugin could be the exif, which reads the metadata of jpeg files.
You can also change the metadata of files by moving it to another location within libfs. For this, it is allowed to create new directories within a mounted libfs. These will be lost when they are still empty and the libfs unmounted.
libfs has two modes of operation :
- update: scan files under a given location to import it's metadata into the database.
- mount : use the given database to present the data in a user-defined view.
Please report any bugs on the issue tracker.
This code is very new and not tested heavily. So expect some errors.
Surely, please do! This project is hosted on github.
- names of variables:
- vpath: The virtual path as seen in the mounted filesystem
- srcpath: The real path of a file
- pylint: use the provided pylintrc to check the code.
- Write/Improve documentation
- Improve unittests
- Implement exif-plugin: read jpeg md.
- Implement xattr plugin: add arbitrary metadata into xattr.