Skip to content

BrokenSource/Typenaut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Typenaut

Typst documents from python classes



Important

This project is under active development. While basic functionality works, most features are missing, no documentation exists, and anything may (and will) change anytime! Feedback is welcome πŸ™‚

πŸ”₯ Description

An experiment on typst metaprogramming within python for heavy templating.

from typenaut import Document, Rectangle, Text

class Minimal(Document):
    def build(self):
        with Rectangle(self) as rect:
            Text(rect, value="Hi, I'm inside the rectangle")

# Automated usage!
document = Minimal()
document.build()
document.pdf(output="output.pdf")

πŸ“¦ Installation

Use pip install git+https://github.com/BrokenSource/Typenaut until further PyPI releases are made.

πŸš€ Usage

Your best chance is on exploring the examples directory likely for a good while.

  • Upstream typst documentation is always a valuable resource!

Note: I really do not have the time to write structured documentation, but the code contains quality type hints and docstrings.

βš–οΈ License

Still deciding, currently source available.

Likely same as Typst, still studying libraries compliances.

About

πŸš€ Typst code from python classes for easy templating and extra utilities

Topics

Resources

Contributing

Stars

Watchers

Forks

Sponsor this project

  •  

Languages