Skip to content

jmcguire/garner

Repository files navigation

Garner

Garner is a command-line interface for the Garner Usage Dictionary.

Install

On macOS or Linux with Homebrew:

brew install jmcguire/garner/garner-dict

Or, on any system with Python 3.9 or newer, install the Python package with pipx:

pipx install garner-dict

Both install the command as garner. Try it with:

garner affect
garner --search accomodate
garner --help

Pipe a long entry through less for paged output:

garner affect | less

About Distribution

This is an independent command-line interface and packaging project. It is not an official publication of Bryan A. Garner or of the Garner Usage Dictionary. The code is MIT licensed, but the dictionary content is copyrighted by Bryan A. Garner and is not licensed by this repository. See NOTICE.

The Homebrew package is intentionally published in the maintainer's personal tap (jmcguire/garner), not in homebrew/core. That makes the source, maintainer, and content notice explicit, and does not imply that the dictionary content has been approved for official Homebrew distribution. The PyPI package and Homebrew formula bundle the same compiled dictionary database. Anyone who uses or redistributes it remains responsible for respecting the applicable rights.

Developer Notes

Clone this repository, then create a development environment:

python3 -m venv venv
./venv/bin/python -m pip install -r requirements.txt

The Markdown files in definitions/ are the editable source of truth. Garner builds them into an SQLite database for fast lookup and search. Build the local database before trying source changes:

./venv/bin/garner --build

Then use the tool normally:

./venv/bin/garner affect
./venv/bin/garner --search accomodate

Tests

Run the tests with:

./venv/bin/python -m unittest discover -s tests

The tests use a small fixture dictionary in tests/fixtures/definitions, not the full definitions collection. They build a temporary SQLite database from those entries and cover core lookup, search, forwarding, and formatting behavior without making small source-formatting changes needlessly brittle.

Licensing

The code in this repository is MIT licensed. See LICENSE.

The dictionary content and bundled definitions are copyrighted by Bryan A. Garner. See NOTICE.

Releases

Release preparation is scripted:

./venv/bin/python scripts/release 1.1.0

See RELEASING.md for the release and distribution checklist.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages