glyph-cli 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- glyph_cli-0.2.0/.gitignore +9 -0
- glyph_cli-0.2.0/LICENSE +21 -0
- glyph_cli-0.2.0/PKG-INFO +94 -0
- glyph_cli-0.2.0/README.md +68 -0
- glyph_cli-0.2.0/docs/assets/examples/conversation.drawing.txt +39 -0
- glyph_cli-0.2.0/docs/assets/examples/conversation.svg +900 -0
- glyph_cli-0.2.0/docs/assets/examples/how-many.drawing.txt +7 -0
- glyph_cli-0.2.0/docs/assets/examples/how-many.svg +164 -0
- glyph_cli-0.2.0/docs/assets/examples/pulsars.drawing.txt +9 -0
- glyph_cli-0.2.0/docs/assets/examples/pulsars.svg +210 -0
- glyph_cli-0.2.0/docs/assets/examples/question.drawing.txt +7 -0
- glyph_cli-0.2.0/docs/assets/examples/question.svg +164 -0
- glyph_cli-0.2.0/docs/assets/examples/saw-that.drawing.txt +9 -0
- glyph_cli-0.2.0/docs/assets/examples/saw-that.svg +210 -0
- glyph_cli-0.2.0/docs/assets/examples/saw-your-world.drawing.txt +3 -0
- glyph_cli-0.2.0/docs/assets/examples/saw-your-world.svg +72 -0
- glyph_cli-0.2.0/docs/assets/examples/shadow.drawing.txt +9 -0
- glyph_cli-0.2.0/docs/assets/examples/shadow.svg +210 -0
- glyph_cli-0.2.0/docs/assets/examples/third-voice.drawing.txt +11 -0
- glyph_cli-0.2.0/docs/assets/examples/third-voice.svg +256 -0
- glyph_cli-0.2.0/docs/assets/parts.txt +19 -0
- glyph_cli-0.2.0/docs/cli.md +238 -0
- glyph_cli-0.2.0/docs/getting-started.md +128 -0
- glyph_cli-0.2.0/docs/index.md +47 -0
- glyph_cli-0.2.0/docs/pages.md +213 -0
- glyph_cli-0.2.0/docs/python.md +41 -0
- glyph_cli-0.2.0/docs/script.md +85 -0
- glyph_cli-0.2.0/docs/stylesheets/extra.css +27 -0
- glyph_cli-0.2.0/docs/vocabulary.md +97 -0
- glyph_cli-0.2.0/examples/conversation.txt +8 -0
- glyph_cli-0.2.0/examples/how-many.txt +4 -0
- glyph_cli-0.2.0/examples/pulsars.txt +5 -0
- glyph_cli-0.2.0/examples/question.txt +3 -0
- glyph_cli-0.2.0/examples/saw-that.txt +5 -0
- glyph_cli-0.2.0/examples/saw-your-world.txt +2 -0
- glyph_cli-0.2.0/examples/shadow.txt +5 -0
- glyph_cli-0.2.0/examples/third-voice.txt +4 -0
- glyph_cli-0.2.0/pyproject.toml +61 -0
- glyph_cli-0.2.0/scripts/gen_docs.py +85 -0
- glyph_cli-0.2.0/src/glyph_cli/__init__.py +7 -0
- glyph_cli-0.2.0/src/glyph_cli/__main__.py +5 -0
- glyph_cli-0.2.0/src/glyph_cli/cli.py +269 -0
- glyph_cli-0.2.0/src/glyph_cli/data/vocab.json +545 -0
- glyph_cli-0.2.0/src/glyph_cli/drawing.py +202 -0
- glyph_cli-0.2.0/src/glyph_cli/export.py +28 -0
- glyph_cli-0.2.0/src/glyph_cli/graph.py +147 -0
- glyph_cli-0.2.0/src/glyph_cli/page.py +113 -0
- glyph_cli-0.2.0/src/glyph_cli/script.py +272 -0
- glyph_cli-0.2.0/tests/conftest.py +20 -0
- glyph_cli-0.2.0/tests/test_cli.py +118 -0
- glyph_cli-0.2.0/tests/test_pages.py +158 -0
- glyph_cli-0.2.0/tests/test_script.py +111 -0
- glyph_cli-0.2.0/zensical.toml +68 -0
glyph_cli-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 InterImm
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
glyph_cli-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: glyph-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: The dictionary and toolkit for the grid script of Ross 128 b (InterImm, The Contact Era).
|
|
5
|
+
Project-URL: Homepage, https://github.com/InterImm/glyph-cli
|
|
6
|
+
Project-URL: Documentation, https://interimm.github.io/glyph-cli/
|
|
7
|
+
Project-URL: Source, https://github.com/InterImm/glyph-cli
|
|
8
|
+
Project-URL: Issues, https://github.com/InterImm/glyph-cli/issues
|
|
9
|
+
Author: InterImm
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: conlang,interimm,knowledge graph,science fiction,writing system
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Other Audience
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# glyph
|
|
28
|
+
|
|
29
|
+
The dictionary and toolkit for the **grid script**: how humans write down what Ross 128 b sends, in InterImm's *The Contact Era*.
|
|
30
|
+
|
|
31
|
+
**Docs:** https://interimm.github.io/glyph-cli/
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uvx --from glyph-cli glyph show BODY.OTHER STAR.TIME COUNT.137
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
+++.+++ .+..+.+ .....+.
|
|
39
|
+
+++.+.. +++.+.+ ......+
|
|
40
|
+
+++.+++ .+..+.+ +++...+
|
|
41
|
+
BODY.OTHER: your world
|
|
42
|
+
STAR.TIME: pulsar
|
|
43
|
+
COUNT.137: 137
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
uv tool install glyph-cli # or: pipx install glyph-cli, or: pip install glyph-cli
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Python 3.10 or newer, no other dependencies.
|
|
53
|
+
|
|
54
|
+
## Use
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
glyph parts # the 16 parts
|
|
58
|
+
glyph find wind # search meanings
|
|
59
|
+
glyph check BODY.STAR # is it a word? exit 1 if not
|
|
60
|
+
glyph show BODY.OTHER --symbol × # draw words
|
|
61
|
+
glyph render examples/third-voice.txt # draw a page
|
|
62
|
+
glyph render examples/third-voice.txt --svg -o page.svg
|
|
63
|
+
glyph graph examples/conversation.txt # read it as a knowledge graph (--json, --dot)
|
|
64
|
+
glyph render examples/question.txt | glyph decode - # and back
|
|
65
|
+
glyph init my-vocab.json && export GLYPH_VOCAB=$PWD/my-vocab.json
|
|
66
|
+
glyph add BODY.STAR "a star-world" --domain Worlds
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A page file has one band per line, `SYMBOL: node | relation | node`; a blank line starts the next statement. See [`examples/`](https://github.com/InterImm/glyph-cli/tree/main/examples) and the [docs](https://interimm.github.io/glyph-cli/pages/).
|
|
70
|
+
|
|
71
|
+
## Develop
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
uv sync --all-groups # or: pip install -e . pytest ruff zensical
|
|
75
|
+
uv run pytest
|
|
76
|
+
uv run ruff check . && uv run ruff format --check .
|
|
77
|
+
uv run python scripts/gen_docs.py # regenerate docs/vocabulary.md, docs/cli.md and the example drawings
|
|
78
|
+
uv run zensical serve # docs at http://localhost:8000
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The vocabulary ships in [`src/glyph_cli/data/vocab.json`](https://github.com/InterImm/glyph-cli/blob/main/src/glyph_cli/data/vocab.json). Change it with the tool (`glyph --vocab src/glyph_cli/data/vocab.json add ...`), then run `scripts/gen_docs.py`; the tests fail if the generated docs are stale.
|
|
82
|
+
|
|
83
|
+
Pushes to `main` publish the docs to GitHub Pages.
|
|
84
|
+
|
|
85
|
+
## Release
|
|
86
|
+
|
|
87
|
+
1. Bump `__version__` in `src/glyph_cli/__init__.py` and merge it to `main`.
|
|
88
|
+
2. Publish a GitHub release tagged `vX.Y.Z` (the same version).
|
|
89
|
+
|
|
90
|
+
The release workflow checks the tag matches the version, builds the package, tests the built wheel and uploads it to [PyPI](https://pypi.org/project/glyph-cli/) with Trusted Publishing, so no token is stored.
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# glyph
|
|
2
|
+
|
|
3
|
+
The dictionary and toolkit for the **grid script**: how humans write down what Ross 128 b sends, in InterImm's *The Contact Era*.
|
|
4
|
+
|
|
5
|
+
**Docs:** https://interimm.github.io/glyph-cli/
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
uvx --from glyph-cli glyph show BODY.OTHER STAR.TIME COUNT.137
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
+++.+++ .+..+.+ .....+.
|
|
13
|
+
+++.+.. +++.+.+ ......+
|
|
14
|
+
+++.+++ .+..+.+ +++...+
|
|
15
|
+
BODY.OTHER: your world
|
|
16
|
+
STAR.TIME: pulsar
|
|
17
|
+
COUNT.137: 137
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
uv tool install glyph-cli # or: pipx install glyph-cli, or: pip install glyph-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Python 3.10 or newer, no other dependencies.
|
|
27
|
+
|
|
28
|
+
## Use
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
glyph parts # the 16 parts
|
|
32
|
+
glyph find wind # search meanings
|
|
33
|
+
glyph check BODY.STAR # is it a word? exit 1 if not
|
|
34
|
+
glyph show BODY.OTHER --symbol × # draw words
|
|
35
|
+
glyph render examples/third-voice.txt # draw a page
|
|
36
|
+
glyph render examples/third-voice.txt --svg -o page.svg
|
|
37
|
+
glyph graph examples/conversation.txt # read it as a knowledge graph (--json, --dot)
|
|
38
|
+
glyph render examples/question.txt | glyph decode - # and back
|
|
39
|
+
glyph init my-vocab.json && export GLYPH_VOCAB=$PWD/my-vocab.json
|
|
40
|
+
glyph add BODY.STAR "a star-world" --domain Worlds
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
A page file has one band per line, `SYMBOL: node | relation | node`; a blank line starts the next statement. See [`examples/`](https://github.com/InterImm/glyph-cli/tree/main/examples) and the [docs](https://interimm.github.io/glyph-cli/pages/).
|
|
44
|
+
|
|
45
|
+
## Develop
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
uv sync --all-groups # or: pip install -e . pytest ruff zensical
|
|
49
|
+
uv run pytest
|
|
50
|
+
uv run ruff check . && uv run ruff format --check .
|
|
51
|
+
uv run python scripts/gen_docs.py # regenerate docs/vocabulary.md, docs/cli.md and the example drawings
|
|
52
|
+
uv run zensical serve # docs at http://localhost:8000
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The vocabulary ships in [`src/glyph_cli/data/vocab.json`](https://github.com/InterImm/glyph-cli/blob/main/src/glyph_cli/data/vocab.json). Change it with the tool (`glyph --vocab src/glyph_cli/data/vocab.json add ...`), then run `scripts/gen_docs.py`; the tests fail if the generated docs are stale.
|
|
56
|
+
|
|
57
|
+
Pushes to `main` publish the docs to GitHub Pages.
|
|
58
|
+
|
|
59
|
+
## Release
|
|
60
|
+
|
|
61
|
+
1. Bump `__version__` in `src/glyph_cli/__init__.py` and merge it to `main`.
|
|
62
|
+
2. Publish a GitHub release tagged `vX.Y.Z` (the same version).
|
|
63
|
+
|
|
64
|
+
The release workflow checks the tag matches the version, builds the package, tests the built wheel and uploads it to [PyPI](https://pypi.org/project/glyph-cli/) with Trusted Publishing, so no token is stored.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
+++.+++.........+++.+.+
|
|
2
|
+
+++.+....+......+++....
|
|
3
|
+
+++.+++.........+++.+.+
|
|
4
|
+
.......................
|
|
5
|
+
....................×××
|
|
6
|
+
.......................
|
|
7
|
+
....................×××
|
|
8
|
+
.......................
|
|
9
|
+
....................*.*
|
|
10
|
+
.......................
|
|
11
|
+
....................*.*
|
|
12
|
+
.......................
|
|
13
|
+
.......................
|
|
14
|
+
.......................
|
|
15
|
+
+++.....+.+.....+++.+++
|
|
16
|
+
+.+......+..+...+++.+..
|
|
17
|
+
+++.....+.+.....+++.+++
|
|
18
|
+
.......................
|
|
19
|
+
.......................
|
|
20
|
+
.......................
|
|
21
|
+
.......................
|
|
22
|
+
.......................
|
|
23
|
+
.......................
|
|
24
|
+
.......................
|
|
25
|
+
.......................
|
|
26
|
+
.......................
|
|
27
|
+
.......................
|
|
28
|
+
.......................
|
|
29
|
+
+++.....+..............
|
|
30
|
+
+.+.....++...+...+.....
|
|
31
|
+
+++.....+++............
|
|
32
|
+
.......................
|
|
33
|
+
.......................
|
|
34
|
+
.......................
|
|
35
|
+
.......................
|
|
36
|
+
.......................
|
|
37
|
+
.......................
|
|
38
|
+
.......................
|
|
39
|
+
.......................
|