diff --git a/ChangeLog b/ChangeLog index aa63338ce..6cef9c6cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-02-21 Alexandre Duret-Lutz + * wrap/python/cgi/ltl2tgba.in: Process ltl2tgba.opt if it exists. + * wrap/python/cgi/ltl2tgba.in: Color translators and their options. 2004-02-20 Alexandre Duret-Lutz diff --git a/wrap/python/cgi/ltl2tgba.in b/wrap/python/cgi/ltl2tgba.in index abad66ec1..7ee0eccee 100644 --- a/wrap/python/cgi/ltl2tgba.in +++ b/wrap/python/cgi/ltl2tgba.in @@ -42,14 +42,26 @@ imgdir = 'spotimg' extra_header = '' # extra_header = '' -import spot -import buddy +# Extra notice to display after the Send button. +extra_form_notice = '' + +# Location of the dot command +dot = 'dot' # in PATH. +# dot = '/usr/local/bin/dot' def print_footer(): print '
' print 'ltl2tgba.py @PACKAGE_VERSION@; Spot', spot.version() print '' +try: + execfile('ltl2tgba.opt') +except IOError: + pass + +import spot +import buddy + # We want the script to kill itself whenever it run for more than 30 # seconds. `dot' can be very long at drawing huge graphs, and may # bring a web server to its knees. Doing so also protects us from any @@ -85,7 +97,7 @@ reset_alarm() # Cleanup stale files from our image directory. -os.system('find ' + imgdir + ' -type f -amin +10 -print | xargs rm -f') +os.system('find ' + imgdir + ' -type f -amin +15 -print | xargs rm -f') myself = os.environ['SCRIPT_NAME']; form = cgi.FieldStorage() @@ -141,7 +153,7 @@ def print_stats(automaton): return False def render_dot(basename): - os.spawnlp(os.P_WAIT, 'dot', 'dot', '-Tpng', '-Gsize=14,14', '-o', + os.spawnlp(os.P_WAIT, dot, dot, '-Tpng', '-Gsize=14,14', '-o', basename + '.png', basename + '.txt') reset_alarm() b = cgi.escape(basename) @@ -330,7 +342,7 @@ for d in range(depth): print '' print '' -print '' +print '%s' % extra_form_notice if not filled: print_footer()