Donner 0.5.0
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner-svg CLI Tool

Overview

donner-svg is a command line utility for rendering SVG files to PNG and previewing output in terminal environments. A convenience wrapper is checked in at tools/donner-svg, which is the recommended way to invoke it from inside the repository.

Build and run:

tools/donner-svg input.svg

Common flags

  • --output <png>: Output filename (default output.png).
  • --width <px> / --height <px>: Override render size.
  • --preview: Show a terminal preview.
  • --interactive: Enable mouse-driven terminal selection mode (implies --preview).
  • --quiet: Suppress parser warnings.
  • --verbose: Enable verbose renderer logs.
  • --experimental: Enable experimental parser features.
  • --help: Print usage.

Examples

# Render to PNG
tools/donner-svg input.svg --output output.png
# Terminal preview mode
tools/donner-svg input.svg --preview
# Interactive mode
tools/donner-svg input.svg --interactive
Note
tools/donner-svg is a thin shell wrapper that invokes bazel run //donner/svg/tool:donner-svg -- <args> with Bazel's progress/info output suppressed so the tool behaves like a normal CLI. You can invoke the underlying Bazel target directly if you prefer.

Terminal preview

--preview renders the SVG directly in your terminal using Unicode quadrant block characters with 24-bit truecolor foreground/background, giving 2×2 sub-pixels per character cell.

Interactive mode

--interactive implies --preview and additionally enables mouse-driven selection: hover over the terminal image to see the element under the cursor, and click to lock the selection. The right-hand pane shows the DOM path and computed style of the selected element.