tetrak_authority.cli

The tetrak-authority command.

tetrak-authority count                         # how big the default scope is, per kind
tetrak-authority snapshot --out snapshots/hy   # build a dated snapshot
tetrak-authority lookup --snapshot snapshots/hy "Tumanyan, Hovhannes"
tetrak-authority show --snapshot snapshots/hy Q380797
tetrak-authority rekey --snapshot snapshots/hy   # after a tetrak-translit upgrade
tetrak-authority search "Նարեկացի"             # a one-off live search

Exit status is 0 on success, 1 when a lookup finds nothing, and 2 for a bad argument or a failed request.

Functions

build_parser()

The argument parser; also what the documentation renders.

client_of(args[, endpoint])

A client with the user agent the arguments ask for, on the enumeration endpoint or the one given.

kinds_of(names)

Expand agent into person and organisation.

main([argv])

Run the command; returns the exit status.

run_lookup(authority, names, kinds, as_json)

Print what each name reaches; 1 if any name reaches nothing.

scope_of(args)

The scope the command-line arguments describe.