Home
About Me
Books
Music
Raga Information
Midis for Mobiles
Technophiles
Python
SERA
WERD
YaMA
Handhelds
Almanac
Pine and VIM
Colors
URL Viewer
Perl
Timeline Script
Finance
Readers Favorite EMI Calculator
Food for Thought
Me Says
Bonded Labour ?
On the WWW
Contemplative Life's precious !
Ekatech
Contemplative Seeta Mai
Musical Interview
From the Collective
Pune Flood Fotos
Contemplative Career Tips
More ...
Pics I Like
Ganesh
Just Be
Readers Favorite Ganesh Symbolism
Contemplative Lotus Pond
Etcetra
Word Power
Links


Mail Me

Visit my blogs :

Neckties strangle clear thinking. -Lin Yutang

Perl Timeline Script


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)

Google
Web
my site

www.atulnene.com ©1998-2007 Atul Nene
>-x))>