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.

Source Distribution

mac-tag-2020.3.25.tar.gz (2.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: mac-tag-2020.3.25.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for mac-tag-2020.3.25.tar.gz
Algorithm Hash digest
SHA256 2a1515c0662bbfcd5e956e95f5f42ae8eb85a6340a13049a163befc82e505841
MD5 439c7b94e8ce0c1241aeb8a48e0bfe65
BLAKE2b-256 a3630f44526c72fab179347e23787e4b732477a4ca316b2f6fde51bd23e9514e

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