docs: The Dictionary of v4 -- every live word, alphabetical, its stack notation and description; built and published with every release (#157) [skip ci]
make dictionary -> build/docs/Dictionary.pdf (20 pages): mkdictionary.py checks docs/reference/v4-dictionary.tsv against the booted system's words first, so a stale dictionary fails the build; then Markdown, pandoc, docs/book/dictionary.tex (the books' preamble, its own title page: version and commit). Quoted FORTH tokens set as code, so their quotes print straight. The nightly's docs stage builds it; publish sends classifier dictionary; the Gitea release attaches it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
@@ -160,6 +160,9 @@ def main():
|
||||
stack, desc = table.get(w, ("", ""))
|
||||
rel = defs.get(w, ("", "", ""))[0]
|
||||
cell = lambda x: x.replace("|", "\\|")
|
||||
# a token with a quote in it is FORTH (." text" S" ABORT"): set as code, so its
|
||||
# quotes print straight, not as typographic ones
|
||||
desc = re.sub(r'(\S*"\S*)', lambda mm: "`" + mm.group(1) + "`", desc)
|
||||
f.write(f"| `{cell(w)}` | `{cell(stack)}` | {cell(desc)} | `{rel}` |\n")
|
||||
print(f"mkdictionary: {out}, {len(words)} words")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user