Skip to content

cghanke/libfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libfs

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.

Usage

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.

Getting Help

Please report any bugs on the issue tracker.

Development Status

This code is very new and not tested heavily. So expect some errors.

Contributing

Surely, please do! This project is hosted on github.

Coding conventions

* 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.

TODO

  • Write/Improve documentation
  • Improve unittests
  • Implement exif-plugin: read jpeg md.
  • Implement xattr plugin: add arbitrary metadata into xattr.

About

FUSE FS to present a collection of files sorted by metadata.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages