Metadata-Version: 2.4
Name: rst2typst
Version: 0.1.0
Summary: Converter from docutils AST to Typst source
License-Expression: Apache-2.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup :: reStructuredText
Classifier: Topic :: Utilities
Requires-Dist: atsphinx-footnotes>=0.3.2
Requires-Dist: typst>=0.14.8 ; extra == 'pdf'
Requires-Python: >=3.10
Project-URL: homepage, https://rst2typst.attakei.dev/
Project-URL: source, https://github.com/atsphinx/rst2typst
Project-URL: documentation, https://rst2typst.attakei.dev/
Project-URL: issues, https://github.com/atsphinx/rst2typst/issues
Project-URL: funding, https://github.com/sponsors/attakei
Provides-Extra: pdf
Description-Content-Type: text/x-rst

=========
rst2typst
=========

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.

Usage
=====

Use CLI
-------

You write reStructuredText source to generate for PDF using Typst.
(e.g. this filename is ``document.rst``.)

.. code:: 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.

.. code:: console

   rst2typst document.rst document.typ

Generated `document.typ` has this content (actually this is not formated).

.. code:: typst

   #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.
