Giter Site home page Giter Site logo

codeviz's Introduction

CodeViz

Visualize code dependencies between files in your C/C++ projects.

CodeViz is a simple, cross-platform, python3 script that creates a code dependency graph using source and header files.

It works by first creating a dot file. The dot file is then then passed into graphviz, which is a supporting program that will automagically create a map of your code.

Installation

You will need to have a python3 interpreter installed to run the script.

The script itself requires graphviz installed. Follow the install instructions from the graphviz website for your platform:

Once installed, make sure that you have these tools in your environment path.

To install codeviz into your system:

$ git clone https://github.com/jmarkowski/codeviz.git
$ cd codeviz
$ python3 setup.py install

Example

The image below shows the result of generating the visual code map for the original git source at hash e83c516.

git e83c516

Usage

Run codeviz inside of your source directory. By default, it will only use the source/header files in the working directory (system header files such as stdio.h are ignored).

$ codeviz

You may also search for source/header files recursively as so

$ codeviz -r

If you want a black and white version of the generated dependency graph

$ codeviz -n

What if you want a black and white version of the generated dependency graph, AND you would like to ignore files that are not including any other header in your source files?

$ codeviz -m

You can specify the name of an output file. The extension will be passed into graphviz to generate the appropriate file.

$ codeviz -o jpeg-file.jpg
$ codeviz -o postscript-file.ps
$ codeviz -o png-file.png

See here for a complete list of supported output formats

Finally, can you exclude certain files and directories from being used.

$ codeviz -r --exclude=unit-tests/* --exclude=test *.{c,cpp,h}   # exclude tests

codeviz's People

Contributors

jmarkowski avatar

Watchers

 avatar  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.