openmeta / README.rst

pythonic file tagging

Simple-to-trivial wrapper for OpenMeta. Rather than re-implementing OpenMeta using, say, Bob Ippolito's excellent xattr, I decided to do it by wrapping the already-functional CLI binary, on advice from those more experienced than myself who suggested that the pain in getting OpenMeta working as advertised from the direct xattr business was great and terrible.

Warning - this thing does rely on parsing the output of CLI apps, with the flakiness and performance troubles that implies. However, it's working reliably for me.

Usage

>>> import openmeta
>>> open('./test.txt', 'w').close()
>>> openmeta.set_tags('./test.txt', ['foo', 'bar'])
>>> openmeta.get_meta('./test.txt')['tags']
['foo', 'bar']

TODO

  • more graceful error message when the openmeta CLI binary is not installed

Credits

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.