Python, DOT and Visualising Legacy Code The Lazy Way
Upcoming SlideShare
Loading in...5
×
 

Python, DOT and Visualising Legacy Code The Lazy Way

on

  • 1,582 views

Visualising a legacy PHP codebase using Python, DOT and GraphViz. A lightning talk for the London Python Code Dojo 2011-06-02.

Visualising a legacy PHP codebase using Python, DOT and GraphViz. A lightning talk for the London Python Code Dojo 2011-06-02.

Statistics

Views

Total Views
1,582
Views on SlideShare
1,581
Embed Views
1

Actions

Likes
1
Downloads
7
Comments
0

1 Embed 1

http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Python, DOT and Visualising Legacy Code The Lazy Way Python, DOT and Visualising Legacy Code The Lazy Way Presentation Transcript

    • Python, DOT and Visualising Legacy Code The Lazy Way (C) John Chandler 2011
    • Legacy PHP Code! Noooooooooooooo!!!!
    • Deep Breaths. Visualise the Code.
    • Laziness Part 1: Use Python to Analyse Dependencies
    • Write a PHP Parser in Python? Or use a regular expression... (include|require)(?:_once)?[ (]["']([^"']+)["']
    • Laziness Part 2: Use Graphviz to Draw The Diagram
    • Graphviz supports DOT. DOT is a graphing mini-language
    • digraph foo { node1 [label=“Node 1”]; node2 [label=”Node 2”]; node1 -> node2; }
    • $ dot -Tpng -O foo.dot
    • WTF. Looks like some refactoring to do
    • Source is available under GPL v3 from: http://www.bitbucket.org/metaljoe/qadpid