mirror of
https://github.com/ArthurSonzogni/Diagon.git
synced 2026-08-29 16:40:45 +08:00
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
This commit is contained in:
@@ -7,13 +7,13 @@ into an ascii-art representation.
|
|||||||
|
|
||||||
It is written in C++ and use WebAssembly, HTML and CSS to make a Web
|
It is written in C++ and use WebAssembly, HTML and CSS to make a Web
|
||||||
Application.
|
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/)
|
[https://arthursonzogni.com/Diagon/](https://arthursonzogni.com/Diagon/)
|
||||||
|
|
||||||
# Command line interface
|
## Command line interface
|
||||||
|
|
||||||
Diagon is also usable as a command line tool.
|
Diagon is also usable as a command line tool.
|
||||||
For instance:
|
For instance:
|
||||||
@@ -33,15 +33,30 @@ sudo snap install diagon
|
|||||||
[](https://snapcraft.io/diagon)
|
[](https://snapcraft.io/diagon)
|
||||||
[](https://snapcraft.io/diagon)
|
[](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:
|
Make diagon easy to use inside your IDE. Thanks to contributors:
|
||||||
- [vim-diagon](https://github.com/willchao612/vim-diagon)
|
- [vim-diagon](https://github.com/willchao612/vim-diagon)
|
||||||
- [vscode-diagon](https://github.com/ElmouradiAmine/vscode-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)
|
* [Diagon](#diagon)
|
||||||
* [Generators](#generators)
|
* [Generators](#generators)
|
||||||
* [Command line interface](#command-line-interface)
|
* [Command line interface](#command-line-interface)
|
||||||
@@ -49,11 +64,12 @@ Make diagon easy to use inside your IDE. Thanks to contributors:
|
|||||||
* [Build](#build)
|
* [Build](#build)
|
||||||
* [Thanks](#thanks)
|
* [Thanks](#thanks)
|
||||||
|
|
||||||
# Generators
|
## Generators
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Mathematic Expression</summary>
|
<summary>Mathematic Expression</summary>
|
||||||
|
|
||||||
|
### Mathematic Expression
|
||||||
input:
|
input:
|
||||||
~~~
|
~~~
|
||||||
f(x) = 1 + x / (1 + x)
|
f(x) = 1 + x / (1 + x)
|
||||||
@@ -151,7 +167,7 @@ input:
|
|||||||
<details>
|
<details>
|
||||||
<summary> Sequence Diagram </summary>
|
<summary> Sequence Diagram </summary>
|
||||||
|
|
||||||
## Sequence Diagram
|
### Sequence Diagram
|
||||||
|
|
||||||
input
|
input
|
||||||
~~~
|
~~~
|
||||||
@@ -241,6 +257,8 @@ Output (Unicode)
|
|||||||
<details>
|
<details>
|
||||||
<summary>Tree</summary>
|
<summary>Tree</summary>
|
||||||
|
|
||||||
|
### Tree
|
||||||
|
|
||||||
Input
|
Input
|
||||||
~~~
|
~~~
|
||||||
Linux
|
Linux
|
||||||
@@ -314,6 +332,8 @@ Output (Style Unicode right center)
|
|||||||
<details>
|
<details>
|
||||||
<summary>Frame</summary>
|
<summary>Frame</summary>
|
||||||
|
|
||||||
|
### Frame
|
||||||
|
|
||||||
Input
|
Input
|
||||||
~~~
|
~~~
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -367,6 +387,9 @@ Output (Style Unicode)
|
|||||||
<details>
|
<details>
|
||||||
<summary>GraphPlanar</summary>
|
<summary>GraphPlanar</summary>
|
||||||
|
|
||||||
|
### GraphPlanar
|
||||||
|
|
||||||
|
|
||||||
Input
|
Input
|
||||||
~~~
|
~~~
|
||||||
if -> "then A" -> end
|
if -> "then A" -> end
|
||||||
@@ -398,6 +421,8 @@ Output (Unicode)
|
|||||||
<details>
|
<details>
|
||||||
<summary>GraphDAG</summary>
|
<summary>GraphDAG</summary>
|
||||||
|
|
||||||
|
### GraphDAG
|
||||||
|
|
||||||
Input:
|
Input:
|
||||||
```
|
```
|
||||||
socks -> shoes
|
socks -> shoes
|
||||||
@@ -523,6 +548,8 @@ Output:
|
|||||||
<details>
|
<details>
|
||||||
<summary>Flowchart</summary>
|
<summary>Flowchart</summary>
|
||||||
|
|
||||||
|
### Flowchart
|
||||||
|
|
||||||
Input:
|
Input:
|
||||||
```
|
```
|
||||||
if ("DO YOU UNDERSTAND FLOW CHARTS?")
|
if ("DO YOU UNDERSTAND FLOW CHARTS?")
|
||||||
@@ -596,11 +623,11 @@ Output:
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
# Download packages
|
## Download packages
|
||||||
|
|
||||||
Binaries using multiple formats are provided in the [release](https://github.com/ArthurSonzogni/Diagon/releases) section.
|
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
|
This depends on cmake, uuid-dev and libboost-graph-dev
|
||||||
On Linux:
|
On Linux:
|
||||||
|
|||||||
Reference in New Issue
Block a user