diff --git a/README.md b/README.md index 0a695ca..0f2dfbd 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,64 @@ -Svgbob can create a nice graphical representation of your text diagrams. +Svgbob is a utility tool and library for generating nice graphical representation from simple ascii diagrams. +It uses a combination of characters which are readily available in your keyboards. -Svgbob provides a cli which takes text as an input and creates an svg image as an output. -[**Demo**](https://ivanceras.github.io/svgbob-editor/) +Example ascii diagrams: +Rectangles: +```txt ++-------+ .--------. +| | | | ++-------+ `--------' +``` + +Circle and arcs: +```txt + + ____ __ __ + ,' `. ,' `. + / \ / \ + \ / + `.____.' \ / + `.__ __.' + +``` + + +Interactive demo with more examples can be found [**here**](https://ivanceras.github.io/svgbob-editor/) [Specification](https://ivanceras.github.io/content/Svgbob/Specification.html) + +## TODO +- Support for pills with variable radius for the rounded corner + +```txt + + _____________ + ,' `. + / This is a \ + \ pill / + `._____________.' + + + _____________ + ,' `. + / This is a \ + | | + | v | + | e | + | r | + | t | + | i | + | c | + | a | + | l | + | | + \ pill / + `._____________.' +``` Donate using Liberapay diff --git a/TODO.md b/TODO.md index ee13205..cdb1bb3 100644 --- a/TODO.md +++ b/TODO.md @@ -22,10 +22,10 @@ - [X] Revise calculation of Circle and Arc center by basing on the number of chars/width - [ ] Add more circle art, dynamically created - use `ito-canvas` -- [~] Enhance quarter arc to be able to merge 2 or 3 quarters to form bigger arcs +- [X] Enhance quarter arc to be able to merge 2 or 3 quarters to form bigger arcs - [X] Quarter circle arcs - [X] Half circle arcs - - [ ] 3/4 circle arcs + - [X] 3/4 circle arcs - [ ] Support for pills, elongated ovals - [X] Update to library to latest version - nalgebra @@ -39,4 +39,4 @@ but not reduces into a single shape - [ ] Move the modules into flat structure as possible rather than deep - [ ] Make use of dot canvas for circles that are larger than radius 10. -- [ ] Use `jss` and json syntax for the legen to allow more flexibility with layered class names. +- [ ] Use `jss` and json syntax for the legend to allow more flexibility with layered class names. diff --git a/packages/svgbob/test_data/example.bob b/packages/svgbob/test_data/example.bob index 9112bd5..64fc54e 100644 --- a/packages/svgbob/test_data/example.bob +++ b/packages/svgbob/test_data/example.bob @@ -11,7 +11,7 @@ to approximate the intended shape. \ / ' It uses a combination of characters -which are readily available on your keyboards. +which are readily available in your keyboards. What can it do?