#!/bin/bash
#
# tree2dotx --- transfer a "tree"(such as the result of tree,calltree,cflow -b)
# to a picture discribed by DOT language(provided by Graphviz)
#
# Author: falcon <[email protected]>
# Update: 2007-11-14, 2015-3-19
# Usage:
#
# tree -L 2 -d /path/to/a/directory | bash tree2dotx | dot -Tsvg -o tree.svg
# cd /path/to/a/c/project/; calltree -gb -np -m *.c | bash tree2dotx | dot -Tsvg -o calltree.svg
# cd /path/to/a/c/project/; cflow -b -m setup_rw_floppy kernel/blk_drv/floppy.c | bash tree2dotx | dot -Tsvg -o cflow.svg
#
# Set the picture size, direction(LR=Left2Right,TB=Top2Bottom) and shape(diamond, circle, box)
size="1920,1080"
direction="LR"
shape="box"
# color, X11 color name: http://en.wikipedia.org/wiki/X11_color_names
fontcolor="blue"
fillcolor="Wheat"
# fontsize
fontsize=16
# Specify the symbols you not concern with space as decollator here
filterstr="";
# output: dot, flame
output="dot"
# Usage
function us
tree2dotx
最新推荐文章于 2024-05-13 05:09:46 发布
