Skip to main content

mdfind wrapper

Project description

Install

$ [sudo] pip install mdfind

Functions

function description
mdfind.count(query=None, name=None, onlyin=None) return search results count
mdfind.mdfind(args) execute mdfind with arguments
mdfind.name(name, onlyin=None) mdfind -name name search by name
mdfind.query(query, onlyin=None) search by Spotlight query

Examples

>>> import mdfind
>>> mdfind.name('Group Containers')
['/Users/username/Library/Group Containers']
>>> mdfind.query('kMDItemContentType==public.shell-script')
[...]
>>> mdfind.count(query='kMDItemContentType==public.mp3')
42
>>> mdfind.count(name='Group Containers')
1
>>> mdfind.mdfind(['-count','-onlyin','/usr','kMDItemContentType==public.shell-script'])
42

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

mdfind-2018.11.20.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdfind-2018.11.20-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mdfind-2018.11.20.tar.gz.

File metadata

  • Download URL: mdfind-2018.11.20.tar.gz
  • Upload date:
  • Size: 1.6 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 mdfind-2018.11.20.tar.gz
Algorithm Hash digest
SHA256 a179c226aa477c664c2063711b0682962cebea02ce212b9fcd2df4215b131dd2
MD5 c94abaa9a2748ce9d1de0ffc12a2fd2c
BLAKE2b-256 3b25e27f0c674922345809f4c37326c01ef0850ac51078b2eb2e715df73b6847

See more details on using hashes here.

File details

Details for the file mdfind-2018.11.20-py2.py3-none-any.whl.

File metadata

  • Download URL: mdfind-2018.11.20-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.9 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 mdfind-2018.11.20-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 07c82bc2c9a98ed154013905a17c95cfaf37c04638117efaf5b9d87780e23d29
MD5 cfd03f33eee793f030cfdd2cd0cfdc3a
BLAKE2b-256 46904eae40474e58aa6d6536cbe9f0c284652225e4bc6b8c47421ddf1680443b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page