根据文本描述生成流程图、网络序列图、GraphViz点图和Railroad图

网友投稿 1044 2022-10-29

根据文本描述生成流程图、网络序列图、GraphViz点图和Railroad图

根据文本描述生成流程图、网络序列图、GraphViz点图和Railroad图

Overview

Command line tool for generating a suite of various types of diagrams, each based on intuitive text DSLs.

Also see Atom Diagrams Plugin that integrates this into the Atom IDE

Documentation

InstallationUsagewatchbuild Diagramsflowchartnetwork sequencegraphviz's dotrailroad diagrams

Installation

npm install -g diagrams

Usage

watch

The diagrams CLI provides the watch command that will automatically generate the .svg visualization of each diagram file format it supports. Run the following:

Generates all of the .svg files, then starts watching the current directory and regenerates any diagram file that changes.

diagrams watch

Generates all .svg files, but don't start watching after.

diagrams build

To provide the target directory to watch just pass it as an argument right after the watch command.

diagrams watch somedirectory --build

Diagrams

flowchart

Documentation: Flowchart.js .

To generate flowcharts, run:

diagrams flowchart input.flowchart flowchart.svg

sequence

Documentation: Network Sequence Diagram Syntax .

To generate Network Sequence Diagrams, run:

diagrams sequence input.sequence sequence.svg

dot

Documentation on the dot file format:

Read dotguide.pdf.See the online generator.

To generate diagrams from Graphviz's .dot file format, run:

diagrams dot input.dot dot.svg

railroad

Documentation see railroad-diagrams's documentation':

NOTE: There is no real documentation for the input file syntax (PRs welcome), but the examples should help you figure it out a bitExamplesOnline Generator

To generate Railroad Diagrams, run:

diagrams railroad input.railroad railroad.svg

Contributing

Setup

git clone git@github.com:francoislaberge/diagrams.gitcd diagrams

Testing

npm test

Publishing to NPM

Do the usual npm version bump then publish.

npm version git push; git push --tagsnpm publish

All tests are run automatically on push via our travis-ci integration.

Credits

flowchart.js for the flowchart diagramsjs-sequence-diagrams for the sequence diagramsviz.js for getting Graphviz compiled to jsrailroad-diagrams for the railroad diagramselectron for headless browsing to wrap above libraries that don't work without a browser environment

TODOs

It's a work in progress. See TODO.md.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:6.0 每个课程增加对应的协议
下一篇:jsp 的介绍(什么是jsp、作用、语法、page指令、静态包含)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~