Skip to main content

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)

Uploaded Source

Built Distribution

vye_svgbob-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (452.4 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

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