diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2023-08-24 19:09:17 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2023-08-24 19:09:17 +0800 |
commit | d926528a9d9efa004015b1379b6c0fa5ea603ff5 (patch) | |
tree | 6d061731949900b8612f9e77365bf0b0db5b9fd2 | |
parent | cdceb33fa209ea0f6c43ffa9834e0d484acd1e67 (diff) |
improve docs
-rw-r--r-- | README.md | 56 | ||||
-rw-r--r-- | TODO.md | 6 | ||||
-rw-r--r-- | packages/svgbob/test_data/example.bob | 2 |
3 files changed, 57 insertions, 7 deletions
@@ -4,14 +4,64 @@ <img src="https://api.travis-ci.org/ivanceras/svgbob.svg"/> </a> -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 / + `._____________.' +``` <a href="https://liberapay.com/ivanceras/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a> @@ -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? |