{"id":15592095,"url":"https://github.com/derhuerst/node-spotlight","last_synced_at":"2025-04-15T05:30:37.486Z","repository":{"id":57311762,"uuid":"77171634","full_name":"derhuerst/node-spotlight","owner":"derhuerst","description":"Search macOS using Spotlight.","archived":false,"fork":false,"pushed_at":"2022-11-23T23:59:14.000Z","size":46,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T16:21:20.968Z","etag":null,"topics":["macos","osx","spotlight"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derhuerst.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T19:49:00.000Z","updated_at":"2024-06-23T10:50:37.000Z","dependencies_parsed_at":"2023-01-22T01:52:39.434Z","dependency_job_id":null,"html_url":"https://github.com/derhuerst/node-spotlight","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"88ae671292ec9f55c1988d05131e6841ca5f4498"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fnode-spotlight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fnode-spotlight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fnode-spotlight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Fnode-spotlight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derhuerst","download_url":"https://codeload.github.com/derhuerst/node-spotlight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249014525,"owners_count":21198620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macos","osx","spotlight"],"created_at":"2024-10-02T23:54:35.242Z","updated_at":"2025-04-15T05:30:37.460Z","avatar_url":"https://github.com/derhuerst.png","language":"JavaScript","funding_links":["https://github.com/sponsors/derhuerst"],"categories":[],"sub_categories":[],"readme":"# node-spotlight\n\n**Search macOS using Spotlight.**\n\n[![npm version](https://img.shields.io/npm/v/node-spotlight.svg)](https://www.npmjs.com/package/node-spotlight)\n![ISC-licensed](https://img.shields.io/github/license/derhuerst/node-spotlight.svg)\n![minimum Node.js version](https://img.shields.io/node/v/node-spotlight.svg)\n[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)\n[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)\n\n\n## Installing\n\n```shell\nnpm install node-spotlight\n```\n\n\n## Usage\n\n```js\nspotlight(query, directory, attributes)\n```\n\n```js\nconst spotlight = require('node-spotlight')\n\nconst results = spotlight('bvg-wlan', null, [\n\t'kMDItemAuthors',\n\t'kMDItemContentType',\n\t'kMDItemFSInvisible',\n\t'kMDItemKind',\n\t'kMDItemNumberOfPages',\n\t'kMDItemTitle',\n\t'kMDItemUseCount',\n\t'kMDItemVersion',\n])\nfor await (const result of results) {\n\tconsole.log('result', result)\n}\n```\n\n```js\n{\n\tpath: '/Users/j/Downloads/bvg/bvg-wlan.pdf',\n\tkMDItemAuthors: ['BVG VBA-FGI Kartographie'],\n\tkMDItemContentType: 'com.adobe.pdf',\n\tkMDItemFSInvisible: false,\n\tkMDItemKind: 'Portable Document Format (PDF)',\n\tkMDItemNumberOfPages: 1,\n\tkMDItemTitle: 'S+U-Bahn_2901_2016_18-10_WLAN',\n\tkMDItemUseCount: 15,\n\tkMDItemVersion: '1.6'\n}\n// …\n```\n\n\n## API\n\n```js\nspotlight(query, dir = null, filters = [])\n```\n\n- `query` must be a string.\n- `dir` is an optional string.\n- `filters` is an optional array if attributes that should be filtered by.\n\nReturns an [async iterator/iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) of search results.\n\n\n## Contributing\n\nIf you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/node-spotlight/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fnode-spotlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderhuerst%2Fnode-spotlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Fnode-spotlight/lists"}