Skip to main content

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.

Project/Repo:

MIT License Supported Python Versions PyCalVer v201907.0008-beta PyPI Version PyPI Downloads

Code Quality/CI:

Build Status Type Checked with mypy Code Coverage Code Style: sjfmt

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://gitlab.com/mbarkhau/markdown-svgbob
$ cd markdown-svgbob
$ make install
$ 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

Valid options for tag_type are inline_svg (the default), img_utf8_svg and img_base64_svg.

Changelog for https://gitlab.com/mbarkhau/markdown-svgbob

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 and fg_color options

v201905.0006-beta

  • Fix: better error reporting
  • Fix: cleanup temp dir

v201904.0004-beta

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown-svgbob-201907.8b0.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

markdown_svgbob-201907.8b0-py2.py3-none-any.whl (3.5 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file markdown-svgbob-201907.8b0.tar.gz.

File metadata

  • Download URL: markdown-svgbob-201907.8b0.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for markdown-svgbob-201907.8b0.tar.gz
Algorithm Hash digest
SHA256 9542f109db933a0f2097dacb7f488878d7f676b58ab4dfdba8bf8ce9b3faf2b1
MD5 2d8a6f41dc6d06466c1ca865bb2b70e8
BLAKE2b-256 f17fb0e5201aa9ede91c6bec8ee343916a26ac6e8caec14af9b6c0974d4f9476

See more details on using hashes here.

File details

Details for the file markdown_svgbob-201907.8b0-py2.py3-none-any.whl.

File metadata

  • Download URL: markdown_svgbob-201907.8b0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for markdown_svgbob-201907.8b0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e46db06fe7f73a819193650b3ab61d32b88d5f416e458601f0fe4e925945193c
MD5 a24375536542a1a1bbf19c471b0cfaa5
BLAKE2b-256 f7861c48d73ad466620807309ab98167ffb73df4a140c029c34fdbf2cf0f43e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page