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
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-2019.3.22.tar.gz
(2.1 kB
view details)
Built Distribution
File details
Details for the file mac-tag-2019.3.22.tar.gz
.
File metadata
- Download URL: mac-tag-2019.3.22.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dc086e018b332e6201153b709e7f3bcccfaa4a14ebbb6e146fb98d0fd5911fd |
|
MD5 | 1a12581d2e4e35d0bd27356cd42736f6 |
|
BLAKE2b-256 | db95bbe90c748de715aace3a585f75c1cd95c3b00ebaa38468962952c476b62e |
File details
Details for the file mac_tag-2019.3.22-py2.py3-none-any.whl
.
File metadata
- Download URL: mac_tag-2019.3.22-py2.py3-none-any.whl
- Upload date:
- Size: 119.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db1775c04024e3c2a2872372b3a595606cdae1d9099e31c666c384abb1acf1f |
|
MD5 | cd90cf404c1a06ac085158fab6931b7f |
|
BLAKE2b-256 | 8619f0ff4945029107836eb9628731d15e316720484d50d957c1b1d89d6f21dc |