Giter Site home page Giter Site logo

mlouielu / pycflow2dot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valbendan/pycflow2dot

17.0 3.0 2.0 54 KB

Layout C call graphs from cflow using GraphViz dot

Home Page: https://pypi.org/project/pycflow2dot/

License: GNU General Public License v3.0

Python 100.00%

pycflow2dot's Introduction

pycflow2dot

Summary

Draw call graphs for C source codes using dot and cflow. Typeset PDF with a page per source file and clickable cross-file function references.

cflow2dot -i hello_simple.c -f png produces:

from hello_simple.c.

Description

Draw the call graph of C source code using cflow and dot. Output to LaTeX, .dot, .PDF, .SVG, .PNG and from dot to all formats supported from it. The LaTeX output is obtained by including the SVG via Inkscape's LaTeX export functionality.

Multi-file sources are converted to multiple SVG files, one for each source. These contain links using the LaTeX package hyperref, so that after compilation one can click on the name of a function call and be taken to its definition, even if that definition is in another page of the PDF, because the function is defined in another source file than the one corresponding to the current PDF page.

Note that if a file containing the definition is missing, then the hyperref link is omitted, so that no dead links result after compiling with LaTeX. This might be the case of for example the file with the definitions is available, but is not passed to pycflow2dot, e.g., for the purpose of focusing on a subset of the sources.

For now the LaTeX result has to be manually compiled, though this extra step will be automated in the future. Multi-SVG export will still be available, so that the results can be included in a larger document, e.g., a report.

PyCflow2dot is a Python port of the Perl script cflow2dot. Tested with Python 3.2 (NetworkX not yet available in 3.3.).

Installation

Use pip with Python 3 or 2:

pip install pycflow2dot

You also need to install the following non-Python dependencies:

  • GNU cflow:
    • apt-get install cflow on Debian GNU/Linux
    • port install cflow with MacPorts
  • dot:
    • apt-get install graphviz
    • port install graphviz

Optionally, cpp too.

License

PyCflow2dot is licensed under the GNU GPL v3.

pycflow2dot's People

Contributors

johnyf avatar valbendan avatar mlouielu avatar

Stargazers

Ming-Hung Tsai avatar Stephon Fan avatar CHENG Jean avatar  avatar Philipp Huth avatar jinfu avatar jingyang.wang avatar Roman Kr avatar PinkD avatar Gabriel Lee avatar  avatar  avatar  avatar Steven Cheng avatar Jeff avatar  avatar Shaun Lin avatar

Watchers

James Cloos avatar  avatar Philipp Huth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.