Skip to main content

Trivial wrapper providing tidy python access to the openmeta command-line client to set OS X openmeta tags on files

Project description

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

News

0.1dev

Release date: 16-March-2011

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openmeta-0.1dev.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page