svgbob extension for Python Markdown
Project description
markdown-svgbob
This is an extension for Python Markdown which renders diagrams using svgbob.
You can try it out using the Svgbob Editor or the AsciiGrid Editor.
Project/Repo:
Code Quality/CI:
Name | role | since | until |
---|---|---|---|
Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2019-04 | - |
Install
$ pip install markdown-svgbob
This package includes the following binaries:
svgbob_0.4.1_x86_64-Darwin
svgbob_0.4.1_x86_64-Linux
svgbob_0.4.1_x86_64-Windows
If you are on another platform, or want to use a more recent version of svgbob_cli
, you will need to install rust and then svgbob via cargo.
$ curl https://sh.rustup.rs -sSf | sh # see https://rustup.rs/
$ cargo install svgbob_cli
This extension will always use the installed version of svgbob if it is available.
Usage
In your markdown text you can define the block:
```bob
.---.
/-o-/--
.-/ / /->
( * \/
'-. \
\ /
'
```
The info string bob
is chosen to match spongedown.
Development/Testing
$ git clone https://github.com/mbarkhau/markdown-svgbob
$ cd markdown-svgbob
$ make conda
$ make lint mypy test
MkDocs Integration
In your mkdocs.yml
add this to markdown_extensions.
markdown_extensions:
- markdown_svgbob:
tag_type: inline_svg
bg_color: white
fg_color: black
min_char_width: 80
Valid options for tag_type
are inline_svg
(the default), img_utf8_svg
and img_base64_svg
.
The option min_char_width
allows you to create diagrams of a uniform scale.
Changelog for https://github.com/mbarkhau/markdown-svgbob
v202107.1017
- Fix: False positive warning due to 'toc' extension.
v202104.1016
- Fix: Close file descriptiors of Popen
- Add support for blocks with extra backticks
v202103.1015
- Fix related to #14: Since
Markdown>=3.3
support for Markdown in HTML was broken.
v202006.0015
- Fix:
bg_color
not updated in some cases
v202001.0013-beta
- Fix #2: Ignore trailing whitespace after closing fence.
v202001.0012-beta
- Add:
min_char_width
option. Allows diagrams in a document to have a uniform scale.
v202001.0011-beta
- Fix: Bad image substitution when markdown has multiple diagrams
v202001.0009-beta
- Fix: Bad parsing of fences
v201907.0008-beta
- Fix: use PEP 508 environment marker to not always install the
typing
package. Fixes gitlab#1
v201905.0007-beta
- Add:
bg_color
andfg_color
options
v201905.0006-beta
- Fix: better error reporting
- Fix: cleanup temp dir
v201904.0004-beta
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for markdown-svgbob-202107.1018.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 797ac4b3a9dec7ad45adf779f1cd04be952ebab5a5dd428971438c5b1071b2db |
|
MD5 | 2647ec95f5f54d1e30701592fad56b90 |
|
BLAKE2b-256 | 36e332ae35301dae82eaba23f27ba4138bd8a28f42044803d7f6420c9f052ad0 |
Hashes for markdown_svgbob-202107.1018-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d620c441422c831d5c2662007dbac032d4e1c555f931e18ff7695fd18498390 |
|
MD5 | 73470ff28673cd3dfa6e1e88cdbf60b8 |
|
BLAKE2b-256 | b2fb15fc64724680499a0510e2a24a364de2048dcb6a6b5a03ca345d794a6ed4 |