Skip to content

Command reference

$ glyph --help
usage: glyph [-h] [--version] [--vocab PATH] COMMAND ...

glyph: the dictionary and toolkit for the grid script, our transcription of what Ross 128 b sends.

Words are written KIND.WHICH (BODY.OTHER = "your world"), or KIND alone.
A number is COUNT and base-512 digits: COUNT.137, COUNT.4.171 = 2219 (COUNT.2219 also works);
COUNT alone is zero. "_" is an empty position or an empty word.
Pages are text files, one band per line: "SYMBOL: node | relation | node".
A block of bands is one triplet; a blank line starts the next.

positional arguments:
  COMMAND
    parts       list the parts and the relation markers
    list        list the vocabulary
    check       is a word in the vocabulary? (exit 1 if not)
    find        search meanings and notes
    show        draw words
    number      write a number in base-512 digits and draw it
    add         add a word to an editable vocabulary
    remove      remove a word from an editable vocabulary
    validate    check the vocabulary (exit 1 on problems)
    render      draw a page from page source
    graph       read a page as a knowledge graph
    decode      read a drawing back into page source
    export-md   print the vocabulary as Markdown
    init        copy the vocabulary to a file you can edit

options:
  -h, --help    show this help message and exit
  --version     show program's version number and exit
  --vocab PATH  vocabulary file (default: $GLYPH_VOCAB, else the bundled one)

The vocabulary is the bundled one unless --vocab or $GLYPH_VOCAB names a file.
Run `glyph init` to make an editable copy. Docs: https://interimm.github.io/glyph-cli/

glyph parts

$ glyph parts --help
usage: glyph parts [-h] [--json]

list the parts and the relation markers

options:
  -h, --help  show this help message and exit
  --json      print JSON

glyph list

$ glyph list --help
usage: glyph list [-h] [--domain DOMAIN] [--json]

list the vocabulary

options:
  -h, --help       show this help message and exit
  --domain DOMAIN  only domains containing this text
  --json           print JSON

glyph check

$ glyph check --help
usage: glyph check [-h] word

is a word in the vocabulary? (exit 1 if not)

positional arguments:
  word

options:
  -h, --help  show this help message and exit

glyph find

$ glyph find --help
usage: glyph find [-h] text

search meanings and notes

positional arguments:
  text

options:
  -h, --help  show this help message and exit

glyph show

$ glyph show --help
usage: glyph show [-h] [--symbol SYMBOL] WORD [WORD ...]

draw words

positional arguments:
  WORD

options:
  -h, --help       show this help message and exit
  --symbol SYMBOL  the party's symbol (default +)

glyph number

$ glyph number --help
usage: glyph number [-h] [--symbol SYMBOL] n

write a number in base-512 digits and draw it

positional arguments:
  n                a whole number, 0 or more

options:
  -h, --help       show this help message and exit
  --symbol SYMBOL  the party's symbol (default +)

glyph add

$ glyph add --help
usage: glyph add [-h] [--domain DOMAIN] [--note NOTE] [--force] word gloss

add a word to an editable vocabulary

positional arguments:
  word
  gloss            its meaning

options:
  -h, --help       show this help message and exit
  --domain DOMAIN
  --note NOTE
  --force          add even if the meaning is already used

glyph remove

$ glyph remove --help
usage: glyph remove [-h] word

remove a word from an editable vocabulary

positional arguments:
  word

options:
  -h, --help  show this help message and exit

glyph validate

$ glyph validate --help
usage: glyph validate [-h]

check the vocabulary (exit 1 on problems)

options:
  -h, --help  show this help message and exit

glyph render

$ glyph render --help
usage: glyph render [-h] [--svg] [--per-line N] [--cell CELL] [--no-grid] [-o OUTPUT] file

draw a page from page source

positional arguments:
  file                 page source file, or - for stdin

options:
  -h, --help           show this help message and exit
  --svg                draw SVG pixels instead of text
  --per-line N         triplets per drawn line (default 2)
  --cell CELL          SVG cell size in pixels (default 12)
  --no-grid            SVG: leave empty cells undrawn
  -o, --output OUTPUT  write to a file instead of stdout

glyph graph

$ glyph graph --help
usage: glyph graph [-h] [--json | --dot] file

read a page as a knowledge graph

positional arguments:
  file        page source file, or - for stdin

options:
  -h, --help  show this help message and exit
  --json      print JSON
  --dot       print Graphviz DOT

glyph decode

$ glyph decode --help
usage: glyph decode [-h] file

read a drawing back into page source

positional arguments:
  file        drawing file, or - for stdin

options:
  -h, --help  show this help message and exit

glyph export-md

$ glyph export-md --help
usage: glyph export-md [-h] [--title TITLE] [-o OUTPUT]

print the vocabulary as Markdown

options:
  -h, --help           show this help message and exit
  --title TITLE        add a top-level heading
  -o, --output OUTPUT  write to a file instead of stdout

glyph init

$ glyph init --help
usage: glyph init [-h] [--force] [path]

copy the vocabulary to a file you can edit

positional arguments:
  path

options:
  -h, --help  show this help message and exit
  --force     overwrite an existing file