Documentation
What accent-draw converts, what it finds, and how to run it: from the command line, in a browser, or as a Rust library.
accent-draw reads an SVG file and writes a .drawio file. The shapes, the text
and the arrows in that file are draw.io cells that you can edit. A box is a box
with its label in it. An arrow connects the two shapes at its ends. When you move
a box in draw.io, its label and its arrows move with it.
accent-draw is one Rust library with three hosts. One host is a command for the shell. One host is a WebAssembly binding for a browser. The third host is a command that converts many Miro boards at one time. The library does not use files, the clock, random numbers or threads. Thus the same code gives the same bytes in all three hosts.
Start here
| Page | What it tells you |
|---|---|
| How it works | The five stages, what the layout finds from the positions of the parts, and what becomes a note |
| Profiles | The eight sources that accent-draw reads by the names of their parts, and what each source gives |
| Command line | The accent-draw command, its output, its exit codes, and the Miro command |
| JavaScript | The WebAssembly binding: convert, the result, the errors, and the size of the download |
| Architecture | The crates, the library without I/O, the output that does not change, and the round trip through draw.io |
You can also convert a file now. The demo has nine samples, and it sends no data.
What it is not
accent-draw is not a renderer. It writes draw.io files, and draw.io shows them. We do not recommend a port of draw.io.
accent-draw does not copy each pixel. Some parts cannot become a draw.io cell: a filter, a mask, a pattern, or text along a path. Each of these parts becomes an image of that part, with a note. The first conversion of a drawing is an approximation, and the documentation tells you where.
accent-draw does not guess without a note. Each element that shows something becomes a cell, a part of a cell, or a note. An SVG file that contains nothing to show causes an error. It does not become an empty diagram that looks correct.