Render ASCII art diagrams to SVG using the Rust crate svgbob.
Project description
vye-svgbob
vye-svgbob
is a Python package that provides bindings for the Rust crate svgbob, allowing you to render ASCII art diagrams into SVG format in Python.
Installation
Requirements
Make sure you have the following prerequisites installed on your system:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Maturin
pip install maturin
Install package
pip install vye-svgbob
Example
# Import the vye_svgbob module
import vye_svgbob
# Your ASCII art diagram as a string
ascii_art = """
+---------------+
| Hello, |
| vye_svgbob! |
+---------------+
"""
# Render ASCII art to SVG
svg_output = vye_svgbob.to_svg(ascii_art)
# Save SVG to a file
with open('output.svg', 'w') as svg_file:
svg_file.write(svg_output)
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
vye_svgbob-0.1.4.tar.gz
(12.2 kB
view hashes)
Built Distribution
Close
Hashes for vye_svgbob-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71d23e8d62d76892d31d871ec354dd0a8b3aeacc6329d98883f564faa9b9e93d |
|
MD5 | 70b0c4953615517494f939bebde84d04 |
|
BLAKE2b-256 | b57300fd84c6fb179581b49f3850e6426ee6999adad63734f638035e65eb5959 |