support metadata from extended filesystem attributes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytagsfs |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Tagging currently only relies on mutagen.
It restricts tagging to the subset of media files which support metadata, known by mutagen.
It should possible to tag any (regular) file of a filesystem which supports extended attributes.
(most of modern filesystems nowadays)
I though about the following implementation:
- an abstract class (following pytagsfs.
- an alternative to mutagen.
- an option to specify the tagging method to use may be offered.
The xattr method would be activated if the filesystem is mounted with the "user_xattr" or "xattr" attributes and the user asked for it.
Both "file-based" and "file-system-based" methods may be used together (or in conjunction) if needed.
listing, adding, removing tags would then internally use the xattr utils.
A python module exists to ease this task; dev-python/pyxattr
summary: |
- extend tagging to any file type + support metadata from extended filesystem attributes |
Changed in pytagsfs: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Hi Raphaël,
pytagsfs already has a base class similar to what you describe. It's called "MetaStore" and it's defined in metastore/ __init_ _.py.
You can implement support for storing and retrieving source filesystem extended attributes by sub-classing MetaStore and implementing the "get" and "set" methods. I would be happy to review such a contribution for inclusion in pytagsfs.
You can tell pytagsfs to use your MetaStore implementation with command-line option "-o metastores= pytagsfs. metastore. foo.FooMetaStor e" (i.e. use a full Python dotted path specifying where to load the class from).
Hope this helps.
Thanks,
Forest