All Projects → Gusabary → Flowchar

Gusabary / Flowchar

Licence: mit
A tiny tool for conversion from pseudo-code to flowchart in character format.

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Flowchar

Warewolf
Effortless Microservice Design and Integration. This repository includes the code-base for the Warewolf Studio and Server.
Stars: ✭ 238 (-35.68%)
Mutual labels:  flowchart
Mermaid
Provides a parser function to generate diagrams and flowcharts with the help of the mermaid script language
Stars: ✭ 27 (-92.7%)
Mutual labels:  flowchart
react-flow-designer
This repository has been archived and the code has been moved to https://github.com/Talend/ui
Stars: ✭ 29 (-92.16%)
Mutual labels:  flowchart
mermaid.ink
Given a mermaid code (markdown-like), serve an image for you
Stars: ✭ 43 (-88.38%)
Mutual labels:  flowchart
flowchart-angular6
一个基于jsplumb的使用angular6写的一个可拖拽的流程图实例
Stars: ✭ 46 (-87.57%)
Mutual labels:  flowchart
imove
INACTIVE: Move your mouse, generate code from flow chart
Stars: ✭ 3,598 (+872.43%)
Mutual labels:  flowchart
Wireflow
Wireflow - user flow chart real-time collaborative tool
Stars: ✭ 2,788 (+653.51%)
Mutual labels:  flowchart
Flowpoints ml
An intuitive approach to creating deep learning models
Stars: ✭ 346 (-6.49%)
Mutual labels:  flowchart
git-pretty
🤖 A helpful CLI for your git troubles!
Stars: ✭ 29 (-92.16%)
Mutual labels:  flowchart
dashboard
Interactive UI for analyzing Jina logs, designing Flows and viewing Hub images
Stars: ✭ 105 (-71.62%)
Mutual labels:  flowchart
container-flow-chart
Immediately create your own unique variation of this popular C++ 11 Standard Container Flowchart at https://drive.google.com/file/d/1wAUsTIeKRgSfo0m-3rR4P6Boi3FuixEk/view
Stars: ✭ 12 (-96.76%)
Mutual labels:  flowchart
bpmn
BPMN diagrams in R
Stars: ✭ 16 (-95.68%)
Mutual labels:  flowchart
codeX
CodeX is a platform which converts code into easy to understand language.
Stars: ✭ 46 (-87.57%)
Mutual labels:  flowchart
flowjs
FlowJS allows you to render dynamic, animated flow charts using HTML5 canvas
Stars: ✭ 51 (-86.22%)
Mutual labels:  flowchart
awesome-canvas
Canvas资源库大全中文版。An awesome Canvas packages and resources.
Stars: ✭ 288 (-22.16%)
Mutual labels:  flowchart
Imove
Move your mouse, generate code from flow chart
Stars: ✭ 3,282 (+787.03%)
Mutual labels:  flowchart
Mxgraph-EasyFlowEditor
基于mxGraph+vue设计的流程图编辑器
Stars: ✭ 73 (-80.27%)
Mutual labels:  flowchart
Flowchart
svg实现流程图绘制,导入导出json [正在重构项目flowchart-vue],地址:
Stars: ✭ 350 (-5.41%)
Mutual labels:  flowchart
React Flow
Highly customizable library for building interactive node-based UIs, editors, flow charts and diagrams
Stars: ✭ 8,348 (+2156.22%)
Mutual labels:  flowchart
react-direct-graph
📏 React component for drawing direct graphs with rectangular (non-curve) edges.
Stars: ✭ 25 (-93.24%)
Mutual labels:  flowchart

简体中文 | English

FlowChar

一个用来从伪代码生成纯字符格式流程图的小工具。

背景

前几天学习红黑树,插入和删除的操作过于复杂,心想画个小流程图好让笔记看上去更直观些,又懒得用画图工具,于是就一个字符一个字符地敲,敲完发现其实也没比用画图工具轻松多少。后来我就想搞一个小工具,只要输入一些很简单的伪代码就能生成一张纯字符格式的流程图,于是就有了这个仓库。

示例

伪代码:

be born;
while (alive) {
    if (happy) {
        smile;
    }
    else {
        try to be happy;
    }
}
die;

流程图:

              +-------------+                   
              |   be born   |                   
              +-------------+                   
                     |                          
                     V                          
             N /-----------\                    
+--------------|   alive   |<------------------+
|              \-----------/                   |
|                    | Y                       |
|                    V                         |
|            Y /-----------\ N                 |
|         +----|   happy   |----+              |
|         |    \-----------/    |              |
|         |                     |              |
|         V                     V              |
|   +-----------+    +---------------------+   |
|   |   smile   |    |   try to be happy   |   |
|   +-----------+    +---------------------+   |
|         |                     |              |
|         +--------->O<---------+              |
|                    |                         |
|                    V                         |
|                    O-------------------------+
|                                               
|                                               
|               +---------+                     
+-------------->|   die   |                     
                +---------+                     

更多示例

如何使用

首先克隆仓库并进行构建:

git clone https://github.com/Gusabary/FlowChar.git
cd FlowChar

# for linux
chmod +x ./build.sh
./build.sh

# for windows
.\build.bat

然后指定伪代码文件,可选地,可以指定流程图输出文件,缺省的话会打印到标准输出:

cd build
./flowchar -c ../examples/simple -o ../examples/simple-chart

使用 -h 选项以打印帮助信息:

./flowchar -h

Docker

或者直接拉取 Docker 镜像,挂载并运行:

# from dockerhub
docker pull gusabary/flowchar:v1.0

# or from github
docker pull docker.pkg.github.com/gusabary/flowchar/flowchar:v1.0

# run
docker run -v /path/to/dir:/app/files gusabary/flowchar:v1.0 -c files/code -o files/chart

需要将伪代码文件所在目录挂载为容器的 /app/files 目录。

从 github docker registry 拉取镜像的话可能会需要 token,可以参考这里

伪代码语法

目前仅支持顺序结构,if-else 控制的选择结构以及 while 控制的循环结构。

  • 一串以分号结尾的字符串是一个语句,会出现在流程图的一个方框中:

    a;
    do this;
    
  • if 关键字后要求跟一对圆括号,其中为 if 的判断条件,然后是由一对花括号包裹着的语句块:

    if (condition) {
        statementA;
        statementB;
    }
    

    可选地,使用 else 关键字,并跟上一对花括号包裹着的语句块:

    if (condition) {
        ok;
    }
    else {
        no;
    }
    
  • while 关键字后要求跟一对圆括号,其中为 while 的判断条件,然后是由一对花括号包裹着的语句块:

    while (condition) {
        loop;
    }
    
  • 语句块可以是简单语句、if 语句和 while 语句的组合。

使用许可

MIT

Last-modified date: 2020.5.17, 4 p.m.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].