Skip to main content

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


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 details)

Uploaded Source

Built Distribution

mac_tag-2018.11.22-py2.py3-none-any.whl (14.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mac-tag-2018.11.22.tar.gz.

File metadata

  • Download URL: mac-tag-2018.11.22.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

Hashes for mac-tag-2018.11.22.tar.gz
Algorithm Hash digest
SHA256 9a357928bae5bcdeec09202e50557b21262fefdbf66b21019baf6ae8955a0881
MD5 31da7a9db42b56a69ce74010e1e72caa
BLAKE2b-256 a34233224ecf304b4a34c2141f0189c028d5bc03891e53da849fbe977e1bf090

See more details on using hashes here.

File details

Details for the file mac_tag-2018.11.22-py2.py3-none-any.whl.

File metadata

  • Download URL: mac_tag-2018.11.22-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.2 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

Hashes for mac_tag-2018.11.22-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b436bd5a8a318517f508c05a33f56f70535748f0f6f5fd58568ea8a87ce24caa
MD5 c8ed89cfda0a06759abc887c811d9797
BLAKE2b-256 dc471cc59e188ada8956cbb086da07ccafdea482269221f9b4f59c3485d9939c

See more details on using hashes here.

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