https://github.com/odlp/dictionary-osx
Access the Mac OSX Dictionary app via the command line
https://github.com/odlp/dictionary-osx
cli mac-osx-dictionary osx
Last synced: about 1 year ago
JSON representation
Access the Mac OSX Dictionary app via the command line
- Host: GitHub
- URL: https://github.com/odlp/dictionary-osx
- Owner: odlp
- Created: 2016-11-20T16:13:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-20T16:27:27.000Z (over 9 years ago)
- Last Synced: 2025-03-29T06:11:15.731Z (about 1 year ago)
- Topics: cli, mac-osx-dictionary, osx
- Language: Swift
- Size: 23.4 KB
- Stars: 26
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# OSX Dictionary CLI
Access the Mac OSX Dictionary app via the command line.
## Installation
- [Download the latest release](https://github.com/odlp/dictionary-osx/releases). Only available for OSX (tested on El Capitan).
- Place the binary on your path, e.g. `/usr/local/bin/dictionary `
Alternatively you can build the project with Xcode 7.3 or later. After running the build (`⌘R`), right click on the `Products` group and select `Show in Finder`.
## Usage
```sh
dictionary cat
# cat 1 |kat| ▶noun 1 a small domesticated carnivorous mammal with soft fur...
```
### Formats
Adjust the output with `-f` or `--format` flags:
- `text`: Plaintext output
- `html`: Default Dictionary.app output
- `speech-part`: Parses the speech part of the first definition (e.g. noun, verb)
## Background
This CLI uses [DictionaryKit](https://github.com/mattt/DictionaryKit) to fetch definitions via private Dictionary Services on OSX. This private API usage is not suitable for App Store apps. Read more background about [dictionary services on NSHipster](http://nshipster.com/dictionary-services/).