dumas
Table of Contents
Installation
pip install dumas
Using it (prepare your doc)
Using dumas on any markdown file will leave the file almost unchanged, we use marko under the hood and marko is opinionated on what gets output from a markdown document. But the power of dumas start when you use the dumas blocks, right now there is only the "dumas fenced code block" (the one with the backticks). Just add to your document this
\```dumas[python]
a = 1
def foo(o):
return 2**o
foo(a+1)
\```
and this will turn the content into an ipython (jupyter notebook) cell.
Using it (cli)
then execute:
$ dumas render-file example.md
and this will output to stdout:
In [1]: a = 1
...:
...:
...: def foo(o):
...: return 2**o
...:
...:
...: foo(a + 1)
Out[1]: 4
you can write to specific file
$ dumas render-file example.md --output-file /tmp/myfile.md
or render the entire files of a dir into another
$ dumas render-dir docs/ --output-dir publish/
Using it (api)
You could use dumas as part of your own workflow/program
# First import the render functions
In [1]: import textwrap
...: from dumas.lib.renderer import render_text, render_file
...:
...:
...: MD_TEXT = textwrap.dedent(
...: """
...: This is a regular MD
...: ====================
...:
...: with some `funny text` and some text
...:
...: ```dumas[python@readme]
...: x = 1+1
...:
...: x**2
...:
...: ```
...: """
...: )
...:
...: MD_TEXT
Out[1]:
This is a regular MD
====================
with some `funny text` and some text
\```dumas[python@readme]
x = 1+1
x**2
\```
In [2]: render_text(MD_TEXT)
Out[2]:
# This is a regular MD
with some `funny text` and some text
\```python
In [1]: x = 1 + 1
...:
...: x**2
Out[1]: 4
\```
Interpreters
dumas comes with a python interpreter, I plan to expand interpreters as I need them.
Contributing and a usage warning
Yes please, but not a lot... I'nm the only one mantaining this project, I'm mostly making it for me, and i want to be able to change the interfaces without breaking the world, please
License
dumas is distributed under the terms of the MIT license.
Metadata
Release files for dumas 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dumas-0.0.6.tar.gz | 10.7 kB | Without provenance | Details for dumas-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dumas-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for dumas-0.0.6-py3-none-any.whl |
Total release size: 19.1 kB
Release files / dumas-0.0.6.tar.gz
| Download URL | dumas-0.0.6.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2295c9db601fde49cfc09ea8fcdc7f6beee819f80fcceb667327c8d0b9466ce9
|
|
BLAKE2b-256 checksum How to use checksums |
a5446a04edc742d9ebf2c6af33e49aceebca69ef11bc8d7d376dd405bdf86b6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.26.0
|
Release files / dumas-0.0.6-py3-none-any.whl
| Download URL | dumas-0.0.6-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac4f24765542fc60c84ffa5650eb414089a3d09f47c090db4cc464ae065f7dce
|
|
BLAKE2b-256 checksum How to use checksums |
c2dd7f58b7fc80e36f7a89295ce5022c442efc63d46cf0f396ca18c56231c32f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.26.0
|
Security for dumas 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.