Logo

Mail Me


The Think Page
Food for Thought
Me Says
Bonded Labour ?
On the WWW
Life's precious !
Ekatech
Seeta Mai
Musical Interview
From the Collective
What is Thinking ?
Confident People
A to Z
Make Lemonade
Ego n Isolation
Achivements
Friendship
No God
Author
Word Power
Books
Quick Search .....
Feedback
Links
Pics I Like
Ganesh
Just Be
Technophiles Corner
Pine and VIM Colors
Distinctive Blue
Monsoon Green
Sonic Violet
Kesar Black
Perl
Timeline Script
Due to circumstances beyond your control, you are master of your fate and captain of your soul.

Using this simple perl script you can generate nice text formatted function call tree as per timeline, for use in emails to your colleagues to help them understand the logic of your module :) Save this file tl.pl

Note: not this does not parse code to generate the call trees, you have to do it yourself. This only formats it nicely :)

The script is meant to be used thus :
Create a file, say 'myfile', with 3 columns - 'from' column, 'to' column and the function name. Thus :
1 2 func1
1 3 funcsd2
1 4 fundsc3
2 3 fundc4
2 4 funxc5
3 4 fuc6
1 4 fnc7
2 2 fddfunc8
3 3 fud9

Run the script thus :
cat myfile | tl.pl > outfile

The file 'outfile' should contain the formatted timeline.
t1 |----------func1>|................|................|
t2 |--------funcsd2-|--------------->|................|
t3 |--------fundsc3-|----------------|--------------->|
t4 |................|---------fundc4>|................|
t5 |................|---------funxc5-|--------------->|
t6 |................|................|-----------fuc6>|
t7 |-----------fnc7-|----------------|--------------->|
t8 |................|<=fddfunc8......|................|
t9 |................|................|<=fud9..........|

Just in case you find a little problem in your output, please have it corrected in any text editor ;) (Those dots there are actually spaces in outfile. Ive replaced them with dots here just to go easy on html)

 

 

Counter