Revision 034471b153189fb8cc7c7a7986470aa35c196419 authored by Andrea Tacchetti on 18 April 2016, 17:14:22 UTC, committed by Andrea Tacchetti on 18 April 2016, 17:14:22 UTC
prepare.py
import sys
def apply_rules(s):
s = s.replace('!FEATURE!', 'style="filled"; fillcolor="lightyellow3";')
node='shape=ellipse, style=filled, '
s = s.replace('!NODE:missing!', node + 'fillcolor=red')
s = s.replace('!NODE:development!', node + 'fillcolor=pink')
s = s.replace('!NODE:designed!', node + 'fillcolor=orange')
s = s.replace('!NODE:compiled!', node + 'fillcolor=yellow')
s = s.replace('!NODE:documented!', node + 'fillcolor=green')
s = s.replace('!NODE:tested!', node + 'fillcolor=white')
s = s.replace('!CONFIG!', 'shape=note, style=filled, fillcolor=grey')
s = s.replace('!TOPIC!', 'shape=box, style=filled, fillcolor=white')
warn = \
"""
// DO NOT EDIT THIS FILE. IT IS NOW AUTOGENERATED FROM Duckietown_ROS_Diagram.dot.in
//
//
// Any changes that you do will be erased.
//
//
"""
return warn + s
if __name__ == '__main__':
s = sys.stdin.read()
s = apply_rules(s)
print(s)
Computing file changes ...