skabelon
Skabelon ([sɡ̊ɑb̥əˈloːˀn]), from the Danish word for "template", is a python package to create complex document templates. It wraps the Jinja2 library and enriches its default filters with sensible options for converting Python types to Markdown and LaTeX (e.g. for lists and tables).
Usage
Filters
Filters (i.e. Jinja2 functions) can be called like any filter within a Jinja2 template, and are designed to be used directly with corresponding Python types.
Example: *_list
For example, both latex_list and markdown_list accept a list of strings
(or any other type that can be represented as a string) and transform them into appropriate templated strings during
rendering.
Assume that our Python list looks like this: foo = ["foo", "bar", "baz"]. In a Markdown Jinja2 template, applying the
filter could like this:
# My rendered list
This example renders a markdown list:
{{ foo | markdown_list }}
Which would result in the following rendered output:
# My rendered list
This example renders a markdown list:
- foo
- bar
- baz
For LaTeX templates, the template and outlook would look like this:
\section{My rendered list}
This example renders a \LaTeX list:
{{ foo | latex_list }}
Which accordingly would result in the following rendered output:
\section{My rendered list}
This example renders a \LaTeX list:
\begin{itemize}
\item foo
\item bar
\item baz
\end{itemize}
Both rendered outputs could then be processed further with their respective toolchains, e.g. a Markdown renderer, or a LaTeX toolchain matching the overall templated contents (e.g., LuaLaTeX).
Development
This project is written in python3. It uses pipenv for dependency management, pytest for testing, and black for
formatting.
Release files for skabelon 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| skabelon-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / skabelon-1.1.1-py3-none-any.whl
| Download URL | skabelon-1.1.1-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
310228830dc1517179ab9c5290dd22501dd368a9baa64c07b91a529ad8fccc61
|
|
BLAKE2b-256 checksum How to use checksums |
22bc2af6d17191c1004a5108d91d86552da461064d71aa5fdf0d8b34121cdf5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|