support metadata from extended filesystem attributes

Bug #742649 reported by Raphaël Droz on 2011-03-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pytagsfs
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.metastore.mutagen.MutagenFileMetaStore) would define the following methods: tags_class, extract, inject, ...

- an alternative to mutagen.MutagenFileMetaStore would implements the methods above.

- 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
Forest Bond (forest-bond) wrote :

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.FooMetaStore" (i.e. use a full Python dotted path specifying where to load the class from).

Hope this helps.

Thanks,
Forest

Raphaël Droz (raphael-droz) wrote :

Metastore supporting extended attributes attached

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers