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.19.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file mac-tag-2018.11.19.tar.gz
.
File metadata
- Download URL: mac-tag-2018.11.19.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b059fccf584feede019f1fda880784df77529cd917b19923e90dbad9ef91fba |
|
MD5 | 9c2249f0cd2f2fdc34349e992e437041 |
|
BLAKE2b-256 | 2384ac06c5f1058c8d771c633b076712f65ffd49ebe4f0fefbe6ed8084612a23 |
File details
Details for the file mac_tag-2018.11.19-py2.py3-none-any.whl
.
File metadata
- Download URL: mac_tag-2018.11.19-py2.py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a47034bbe95b23f856f738f684b21465c4ab918bf6f4599fc36ec46ac9bc9f |
|
MD5 | 12e3eb44f001045a4c21388a99f198e4 |
|
BLAKE2b-256 | 627a8164c3d57f5f91294363ab6d13f25d1a3ba74d573f84b509673009a2a378 |