Creating SVG with Svgbob: From Installation to PowerShell + Vim
Svgbob is a powerful Rust tool that turns your plain text diagrams into beautiful SVG graphics. Svgbob can be used for documentation, presentations, and more.
Installing Svgbob binaries
Start by opening a Power Shell and use pip to install svg-bob binaries, as shown in the video below, with:
py -m pip install markdown-svgbob
This package includes the following binaries:
- svgbob_0.5.5_x86_64-Darwin
- svgbob_0.5.5_x86_64-Linux
- svgbob_0.5.5_x86_64-Windows.exe
It's useful to create a PowerShell Alias for the binary specific to the platform in use.
An option it's to add to the PowerShell user's profile the following lines:
$LocalAppData = $env:LocalAppData
Set-Alias svgbob "$LocalAppData\Programs\Python\Python310\Lib\site-packages\markdown_svgbob\bin\svgbob_0.5.5_x86_64-Windows.exe"
Finally, in a new Vim buffer you can generate a simple ASCII diagram with the famous Cowsay for GNU/Linux which it's available also for python with:
py -m pip install cowsay
and generate the corresponding SVG from the command line:
svgbob "your_diagram.txt" -o "output.svg"