MacOS Finder tags. github.com/jdberry/tag python implementation
Project description
Install
$ [sudo] pip install mac-tag
Requirements
$ brew install tag
Functions
function | description |
---|---|
mac_tag.add(tags, path) |
add tags to path(s) |
mac_tag.find(tags, path=None) |
return 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 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
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mac-tag-2018.11.22.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for mac_tag-2018.11.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b436bd5a8a318517f508c05a33f56f70535748f0f6f5fd58568ea8a87ce24caa |
|
MD5 | c8ed89cfda0a06759abc887c811d9797 |
|
BLAKE2b-256 | dc471cc59e188ada8956cbb086da07ccafdea482269221f9b4f59c3485d9939c |