Skip to main content

macOS Finder tags. github.com/jdberry/tag python implementation

Project description

Installation

$ [sudo] pip install mac-tag

Requirements

$ brew install tag

Functions

function __doc__
mac_tag.add(tags, path) add tags to path(s)
mac_tag.find(tags, path=None) return a list of all paths with tags, limited to path(s) if present
mac_tag.get(path) return dict where keys are paths, values are lists of tags. equivalent of tag -l
mac_tag.match(tags, path) return a list of paths with with matching tags
mac_tag.parse_list_output(out) parse tag -l output and return dict
mac_tag.remove(tags, path) remove tags from path(s)
mac_tag.update(tags, path) set path(s) tags. equivalent of `tag -s

Examples

>>> mac_tag.update(["Red","Blue"],["path1","path2"])
>>> mac_tag.add(["Green"],["path1","path2"])
>>> mac_tag.get(["path1"])
{'path1': ['Blue', 'Red', 'Green']}
>>> mac_tag.remove(["Red"],["path1","path2"])
>>> mac_tag.remove(["*"],["path1","path2"])

Links

python-readme-generator

Project details


Download files

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

Files for mac-tag, version 2020.3.26
Filename, size File type Python version Upload date Hashes
Filename, size mac-tag-2020.3.26.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page