Turn your Python and Javascript source code into DOT flowcharts
Code2flow will sweep through your project source code looking for function definitions. Then it will do another sweep looking for where those functions are called. Code2flow connects the dots and presents you with a flowchart estimating the functional structure of your program.
In other words, code2flow generates callgraphs
Code2flow is especially useful for untangling spaghetti code and getting new developers up to speed.
Code2flow is EXPERIMENTAL and meant to provide a rough overview of the structure of simpler projects. There are many known limitations (see below). Expect MOST aspects of this application to change in future releases.
Here is what happens when you run it on jquery
On the python calendar module
On code2flow/languages/python.py
Download, navigate to the directory, and run:
sudo python setup.py install
If you don't have it already, you will also have to install graphviz
Using apt-get:
sudo apt-get install graphviz
Using port (for macs):
sudo port install graphviz
To generate a DOT file run something like:
code2flow mypythonfile.py
Or, for javascript
code2flow myjavascriptfile.js
By default, code2flow will render a DOT file, out.gv and a PNG file, out.png.
You can also render the flowchart in any of the formats that graphviz supports: bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz x11 xdot xlib
For example:
code2flow mypythonfile.py -o myflow.jpeg
Specify multiple files, import directories, and even use *
code2flow project/directory/*.js
code2flow project/directory --language js
Code2flow is meant to provide a reasonable conjecture of the structure of simple projects and has many known limitations.
Basically, code2flow may not diagram your sourcecode exactly as you might expect it to
Please do email! scottmrogowski@gmail.com
You can contribute code! The project is open source and is new so any reasonably useful feature would probably be helpful and accepted. New languages are especially appreciated!
You can spread the word! A simple way to help is to share this project with others. If you have a blog, mention code2flow! Linking from relevant questions on StackOverflow or other programming forums also helps quite a bit. I would do it myself but it is unfortunately against the community guidelines. The more exposure this project gets, the more I can devote my time to building it!
There is a lot in the pipeline already but email me! Those requests which keep coming up repeatedly will get priority.
To get the feature you want more quickly there are two options:
A. The project is open source so it is easy to contribute.
B. I am available for hire on contract and will happily build your request or just do headstands for you all day for the correct amount of money. For more about me, visit http://scottrogowski.com/about
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。