From c28bbc9d94de633299512f3c2f5abc9632714f89 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Mon, 12 Feb 2024 09:21:57 +0100 Subject: [PATCH] Update README.md @elmouradiaminedev released the `diagonjs` library! This promotes it in the README.md and tweak the general description. See: https://github.com/ArthurSonzogni/Diagon/discussions/71 --- README.md | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7c42004..96b6ab3 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ into an ascii-art representation. It is written in C++ and use WebAssembly, HTML and CSS to make a Web Application. -We also expose a command line interface, for personal and 3rd party tools. +We also expose a command line interface and a JS library, for personal and 3rd party tools. -# Web application +## Web application [https://arthursonzogni.com/Diagon/](https://arthursonzogni.com/Diagon/) -# Command line interface +## Command line interface Diagon is also usable as a command line tool. For instance: @@ -33,15 +33,30 @@ sudo snap install diagon [![snapstore](https://snapcraft.io/diagon/badge.svg)](https://snapcraft.io/diagon) [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/diagon) -# IDE plugins +## Javascript library +See the JS library [diagonjs](https://github.com/elmouradiaminedev/diagonjs) +```bash +npm i diagonjs +``` +```js +import Diagon from "diagonjs"; +``` +```js +const diagon = await Diagon.init(); +diagon.translate.math("f(x) = 1 + x / (1 + x)", { style: "Unicode" }); + +// x +// f(x) = 1 + ───── +// 1 + x +``` + +## IDE plugins Make diagon easy to use inside your IDE. Thanks to contributors: - [vim-diagon](https://github.com/willchao612/vim-diagon) - [vscode-diagon](https://github.com/ElmouradiAmine/vscode-diagon) -### [https://arthursonzogni.com/Diagon/](https://arthursonzogni.com/Diagon/) - -**Table of content** +# Table of content * [Diagon](#diagon) * [Generators](#generators) * [Command line interface](#command-line-interface) @@ -49,11 +64,12 @@ Make diagon easy to use inside your IDE. Thanks to contributors: * [Build](#build) * [Thanks](#thanks) -# Generators +## Generators
Mathematic Expression +### Mathematic Expression input: ~~~ f(x) = 1 + x / (1 + x) @@ -151,7 +167,7 @@ input:
Sequence Diagram -## Sequence Diagram +### Sequence Diagram input ~~~ @@ -241,6 +257,8 @@ Output (Unicode)
Tree +### Tree + Input ~~~ Linux @@ -314,6 +332,8 @@ Output (Style Unicode right center)
Frame +### Frame + Input ~~~ #include @@ -367,6 +387,9 @@ Output (Style Unicode)
GraphPlanar +### GraphPlanar + + Input ~~~ if -> "then A" -> end @@ -398,6 +421,8 @@ Output (Unicode)
GraphDAG +### GraphDAG + Input: ``` socks -> shoes @@ -523,6 +548,8 @@ Output:
Flowchart +### Flowchart + Input: ``` if ("DO YOU UNDERSTAND FLOW CHARTS?") @@ -596,11 +623,11 @@ Output:
-# Download packages +## Download packages Binaries using multiple formats are provided in the [release](https://github.com/ArthurSonzogni/Diagon/releases) section. -# Build +## Build This depends on cmake, uuid-dev and libboost-graph-dev On Linux: