lookatme.contrib.render
This is a lookatme extension that renders code blocks of supported languages into images, which are then rendered using whichever image rendering options the user has available.
To get something useful out of this extension, you must have an image-rendering contrib extension installed for lookatme that is able to display images, such as lookatme.contrib.urwid_ueberzug. See lookatme's list of known extensions for other potential options.
Example
After installing this lookatme, this extension, and lookatme.contrib.urwid_ueberzug, you should be able to see something like this:
Installation
pip install lookatme.contrib.render
Usage
Enable this plugin by adding it to the metadata in the head of the markdown file.
---
title: <title>
author: <author>
extensions:
- render
---
The following languages are currently supported:
| Code-block Language(s) | Renderer | Executable Required | Note |
|---|---|---|---|
dot, graphviz |
Graphviz | dot |
apt-get install graphviz |
mermaid |
mermaid.cli | mmdc |
npm install mermaid.cli; export PATH="$PATH:$(pwd)/node_modules/.bin" |
The height of the rendered image can be set by either appending -N or N
to the codeblock language to specify the number of rows the rendered image
should use when being displayed.
The example below will render a mermaid-js graph with a height of 10 rows:
```mermaid-10
graph TD
A0 -> B
A1 -> B
B -> C
C -> D
```
Metadata
Release files for lookatme.contrib.render 1.1.0
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 | |
|---|---|---|---|---|
| lookatme.contrib.render-1.1.0.tar.gz | 4.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lookatme.contrib.render-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / lookatme.contrib.render-1.1.0.tar.gz
| Download URL | lookatme.contrib.render-1.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18ae8f8f4e9cc9d249d2a64fbfeb21b4527acb222221c94cd8e9f460c3692572
|
|
BLAKE2b-256 checksum How to use checksums |
bf8765a1a703156c5260f4fa623cbd5bdfcb3ef1ed6a096f2d83e29539ad983e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / lookatme.contrib.render-1.1.0-py3-none-any.whl
| Download URL | lookatme.contrib.render-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
114c39d75bc240a7dd29b816b2f46849d3d327aa4cbddc60ad46c6ea55af38b1
|
|
BLAKE2b-256 checksum How to use checksums |
84bd864b92b0880145094adc6a750c52a3df1b540312334f75e287891cdd81b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for lookatme.contrib.render 1.1.0
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.