Converter from docutils AST to Typst source
Project description
Converter from DocTree of docutils to Typst source and PDF.
Overview
rst2typst is Python project that includes docutils custom writer and frontend CLI.
I develop this for two purposes:
To generate PDF documentation from reStructuredText rapidly.
To work as core of atsphinx-typst that it is Sphinx extension to generate PDF file on Sphinx lifecycle.
I will use this and atsphinx-typst to generate documentation PDF files of my Python projects.
Benchmark
rst2typstpdf is about 53.5x faster than rst2latex+pdflatex when including the installation of TeX Live (1.7 s vs 92.3 s).
For full details, see Benchmark in the documentation.
Usage
Use CLI
You write reStructuredText source to generate for PDF using Typst. (e.g. this filename is document.rst.)
==================
rst2typst document
==================
Overview
========
We like reStructuredText! It is an one of great docutils.
* This has custom writer of docutils.
* This has CLI endpoint named ``rst2typst`` and ``rst2typstpdf``.
Usage
=====
Enjoy it!
You can run these command to convert to Typse code.
rst2typst document.rst document.typ
Generated document.typ has this content (actually this is not formated).
#title([rst2typst document])
= Overview
We like reStructuredText! It is an one of great docutils.
- This has custom writer of docutils.
- This has CLI endpoint named `rst2typst` and `rst2typstpdf`.
= Usage
Enjoy it!
Use as library
(TBD)
License
Apache-2.0 license. Please see LICENSE on repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rst2typst-0.3.1.tar.gz.
File metadata
- Download URL: rst2typst-0.3.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8a3620764da55034f73bdc6150b7b4f12d429c3ca2a3da11bffd1e551a9f88c
|
|
| MD5 |
31307153eec9390cf7bfa4fbafe2ff4a
|
|
| BLAKE2b-256 |
37a6abbfa6c7416e7d1891cfdb6717411f6a0cd7fdc6aed7fce18c4826f2da96
|
Provenance
The following attestation bundles were made for rst2typst-0.3.1.tar.gz:
Publisher:
release.yaml on atsphinx/rst2typst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rst2typst-0.3.1.tar.gz -
Subject digest:
e8a3620764da55034f73bdc6150b7b4f12d429c3ca2a3da11bffd1e551a9f88c - Sigstore transparency entry: 1437325840
- Sigstore integration time:
-
Permalink:
atsphinx/rst2typst@a29716797b2f3233cf09d75ad26cc5428452569a -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/atsphinx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a29716797b2f3233cf09d75ad26cc5428452569a -
Trigger Event:
push
-
Statement type:
File details
Details for the file rst2typst-0.3.1-py3-none-any.whl.
File metadata
- Download URL: rst2typst-0.3.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46032ec9f21cd08247ff6eec976731536f715b290ebf6b738c4332d2a7a3dab3
|
|
| MD5 |
378def280d05afdc140fe3bb2f601f10
|
|
| BLAKE2b-256 |
ae08d06c6b678c14b83bd0755c1484395d4ed673a718723dfc589294fe55cf56
|
Provenance
The following attestation bundles were made for rst2typst-0.3.1-py3-none-any.whl:
Publisher:
release.yaml on atsphinx/rst2typst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rst2typst-0.3.1-py3-none-any.whl -
Subject digest:
46032ec9f21cd08247ff6eec976731536f715b290ebf6b738c4332d2a7a3dab3 - Sigstore transparency entry: 1437325850
- Sigstore integration time:
-
Permalink:
atsphinx/rst2typst@a29716797b2f3233cf09d75ad26cc5428452569a -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/atsphinx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a29716797b2f3233cf09d75ad26cc5428452569a -
Trigger Event:
push
-
Statement type: