Guidedog ======== **Write once. Explain well. Publish on the web and on paper.** Guidedog builds a documentation website and a PDF book from the same reStructuredText or Markdown files. We keep one set of source files and publish it for readers on the web and on paper. The release provides one ``guidedog`` executable, with PDF typesetting, diagram rendering, and music engraving included. Sphinx inspires the authoring workflow. Guidedog is an independent system: configuration is declarative TOML, API extraction is static, and Python configuration and extensions are never executed. Complete Sphinx compatibility is not a goal. This page is the repository overview. On GitHub, the ``README`` files at the root of the repository give the same overview in each language of the manual. Start a project --------------- .. code:: sh guidedog quickstart docs guidedog build html docs guidedog build pdf docs guidedog serve docs The project contains ``conf.toml``, ``index.rst``, ``_templates/`` (``layout.html``, ``book.typ``, ``discussion.typ``, ``article.typ``, and ``theme.typ``), and ``_static/`` (``guidedog.css``, ``guidedog.js``, and ``typography.js``). Templates and static assets are ordinary files we can edit locally. HTML provides navigation, search, code highlighting, diagrams, equations, and Knuth-Plass paragraph typesetting. PDF books provide chapters, cross-references, figures, indexes, and language-aware typesetting. We can embed Graphviz or Typst drawing source, including CeTZ and Fletcher, directly in RST and MyST with automatic HTML and PDF assets; see :doc:`topics/diagrams`. We embed LilyPond notation directly in RST and MyST with the native ``lilypond`` directive, including staves, up to four simultaneous voices per staff, lyrics, structured ``\markup``, and common markings; see :doc:`topics/music`. Outlined Bravura SVG and PNG figures work in HTML and multi-system PDF books without an installed LilyPond program: .. code-block:: rst .. lilypond:: :caption: Beethoven's Joy theme, four bars in C major. :alt: A four-bar melody beginning E, F, G and ending with dotted-quarter E, eighth-note D and half-note D. \fixed c' { \clef treble \key c \major \time 4/4 e2 f4 g | g4 f e d | c2 d4 e | e4. d8 d2 | } .. lilypond:: :caption: Beethoven's Joy theme, four bars in C major. :alt: A four-bar melody beginning E, F, G and ending with dotted-quarter E, eighth-note D and half-note D. \fixed c' { \clef treble \key c \major \time 4/4 e2 f4 g | g4 f e d | c2 d4 e | e4. d8 d2 | } The built-in theme follows the system theme by default, with light and dark choices; Guidedog's own documentation website defaults to the light reading edition. The website detects the browser language on its landing page and repository overview. A saved choice takes precedence. Direct links to an edition or chapter remain explicit requests. .. code:: sh guidedog convert notes.md --to pdf --output notes.pdf guidedog clean docs guidedog migrate conf.py Install ------- Each `release `__ has an archive for Linux, macOS, and Windows, with ``SHA256SUMS``. The Typst compiler, the Bravura 1.482 music font, and the tree-sitter parsers are compiled into ``guidedog``. Unix archives link Graphviz statically, and the Windows ZIP bundles Graphviz DLLs, so nothing else needs to be installed at run time. Fetching remote intersphinx inventories and publishing to GitHub Pages use the HTTP client built into ``guidedog``, so no ``curl`` program is needed. Check and install the archive: .. code:: sh sha256sum -c --ignore-missing SHA256SUMS # on macOS: shasum -a 256 -c --ignore-missing SHA256SUMS tar -xzf guidedog-linux-amd64.tar.gz sudo install guidedog-linux-amd64/guidedog /usr/local/bin/ The release notes describe each platform's requirements and limits. See the :doc:`installation guide ` for the details. Build from source ----------------- Install a Rust toolchain (the workspace's ``rust-version`` or later), a C compiler, and the Graphviz development files (``libgvc``, ``libcgraph``; for example ``libgraphviz-dev`` on Debian and Ubuntu, ``graphviz-devel`` on Fedora, or ``brew install graphviz`` on macOS; on Linux, also ``perl`` and ``make`` for the embedded Typst package downloader's vendored OpenSSL). Then, at the checkout root: .. code:: sh cargo build --release -p guidedog-cmd # target/release/guidedog cargo fmt --all --check cargo run -p check # source limits cargo xtask tables --check cargo xtask check-music-font cargo clippy --workspace --all-targets -- -D warnings cargo test --workspace cargo xtask fetch-fonts --music && cargo run -p music-check The ``typst`` crates are a default feature of ``gd-typst``. Without them, Guidedog runs an installed ``typst`` 0.15.1 program for PDF books, while ``.. typst-diagram::`` and ``.. lilypond::`` with ``:format: png`` require the embedded compiler. `RELEASING.md `__ describes the release workflow. The workspace is split by responsibility. The engine crates (``guidedoc``, the readers and renderers, ``guidedoc-defaults``) use only the standard library. Supporting libraries (``gd-toml``, ``gd-json``, ``gd-jinja``, ``gd-highlight``, ``gd-gettext``, ``gd-graphdog``, ``gd-typst``, ...) never depend on the engine. The project builder and the command line sit above both. The programs are under ``cmd/``. See :doc:`Internals `. Translate with Guidedog ----------------------- .. code:: sh mkdir -p docs/manual/_editions guidedog build -b gettext docs/manual docs/manual/locales/templates -W guidedog intl update -p docs/manual/locales/templates \ -l zh_CN -l ja -l ko -l hi -l es -l de docs/manual guidedog intl stat -l zh_CN -l ja -l ko -l hi -l es -l de docs/manual guidedog build -b html docs/manual docs/manual/_editions/de \ -D language=de -D 'html_extra_path=[]' -W Translate and review ``msgstr`` values in the PO files. Guidedog extracts POT files, merges catalogs, reports progress, and builds each edition. It does not invent translations. Commands, paths, code, API names, and reference targets stay unchanged. The website landing page, the manual, and the repository overview are translated. The API reference and GDS remain English. See the :doc:`manual build instructions ` for assembling all editions and PDF books. Extend and publish ------------------ Write a build plugin or a publisher with the :doc:`step-by-step plugin chapter `. A plugin implements one Rust trait. The same value is linked into a custom ``guidedog`` binary with ``gd_cli::run_with``, or served as an installed program with ``gd_plugins::serve_plugin``. The chapter then follows the real GitHub Pages publisher through ownership, credentials, conditional updates and recovery. ``guidedog publish --timeout=SECONDS`` bounds each complete exchange (default: 300 seconds). We choose a value longer than ``--wait``. After an unknown outcome, we recover before publishing again. Keep discussions ---------------- ``guidedog dsc`` keeps proposals and decisions as reStructuredText records, one file each. It builds them into a website and PDF books. Each catalog has a prefix: Guidedog's design records use ``gds``, and another project might use ``eds``. .. code:: sh guidedog dsc init docs/eds --prefix=eds --name="Enso Discussions" cd docs/eds guidedog dsc new "Cache policy" --labels=architecture guidedog dsc promote cache-policy guidedog dsc state 1 --to=accepted --reason="Review converged" guidedog dsc build A catalog's ``discussion.toml`` sets its lifecycle states, record types, and numbering. ``guidedog dsc config`` prints it. The commands come from the discussion plugin, which every ``guidedog`` links, so nothing else needs to be installed. Guidedog's own ``docs/gds`` is one such catalog: we run ``guidedog dsc check`` in that folder. See :doc:`Keep a discussion catalog `. Publish static sites -------------------- ``guidedog ssg`` manages articles, research logs, collections, feeds, pinned theme archives, and multi-project websites from the same ``conf.toml`` and document tree: .. code:: sh guidedog ssg init site --preset=journal --title="Field Notes" cd site guidedog ssg new posts/2026-04-17-zero-copy.rst --title="Zero-Copy Readers" guidedog ssg schedule posts/2026-04-17-zero-copy.rst --at=2026-05-01T09:00:00Z guidedog ssg publish posts/2026-04-17-zero-copy.rst guidedog ssg build Pages marked with ``:pdf: article`` also build standalone print-quality PDFs alongside their HTML pages. Multi-project websites mount sub-projects (such as ``docs/site``, ``docs/manual``, and ``docs/gds``) declaratively through ``[[site.mounts]]``; ``docs/api`` builds as a standalone reference project and manual PDF appendix. See :doc:`Static site publishing `. Read and embed -------------- - :doc:`Manual `: tutorials, topics, practical tasks, reference, and internals. - :doc:`API reference `: generated from the Rust source of the main crates and included in the manual's PDF appendix. - :download:`Engine guide <_static/repository/library-README.md>`: the ``guidedoc`` crate's workspaces, requests, adapters, and conversion examples. - :doc:`Templates `: customize HTML with Jinja and books with Typst. - :download:`GDS <_static/repository/gds-README.md>`: numbered design records and implementation decisions. - :download:`Discussion library <_static/repository/discussion-README.md>`: the catalogs that ``guidedog dsc`` keeps. Guidedoc works in a caller-owned, reusable workspace and returns structured diagnostics. The host manages files, budgets, caching, publication, and native compilers. ``--untrusted`` restricts capabilities. It is not a process sandbox or a limit on all native resource use. Credits and license ------------------- Created by **Vikrant Rathore**, with assistance from **Ronak Rathore** and **Kanak Rathore**. Contributions are welcome through issues and pull requests. Documentation credits use names or handles, not personal email addresses. Git identity settings are managed separately. Thanks to Sphinx and Georg Brandl, Docutils and David Goodger, Typst, Steinberg Media Technologies and Daniel Spreadbury (Bravura and SMuFL), Tree-sitter and Max Brunsfeld, Graphviz, and the Rust project. Guidedog is released under the :download:`GNU Lesser General Public License v3.0 or later <_static/repository/LICENSE>` (LGPL-3.0-or-later), which adds permissions to the :download:`GNU General Public License v3.0 <_static/repository/COPYING>`. For other licensing terms, contact the authors. :download:`NOTICE <_static/repository/NOTICE>` says how to reach them and lists the third-party components, such as the bundled fonts and the Rust crates compiled into the programs, that keep their own licenses. An additional permission allows Guidedog to be linked and distributed with Graphviz. See :download:`NOTICE <_static/repository/NOTICE>`.