Changeset 10682 in genesis


Ignore:
Timestamp:
May 6, 2012, 2:04:44 PM (13 years ago)
Author:
rick
Message:

Prettyfy output to allow better debugging...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10681 r10682  
    231231  """ Main overview page """
    232232  items = {'root' : "." }
     233  def fl(spaces, line):
     234    return (' ' * spaces) + line + '\n'
     235
    233236  output = """
    234237<html>
     
    249252    </form>
    250253    <table>
    251      <caption><h3>Wireless Leiden Configurator</h3></caption>
     254      <caption><h3>Wireless Leiden Configurator</h3></caption>
    252255  """ % items
    253256
    254257  for node in nodelist:
    255258    items['node'] = node
    256     output += '<tr><td><a href="%(root)s/%(node)s">%(node)s</a></td>' % items
     259    output += fl(5, '<tr>') + fl(7,'<td><a href="%(root)s/%(node)s">%(node)s</a></td>' % items)
    257260    for config in files:
    258261      items['config'] = config
    259       output += '<td><a href="%(root)s/%(node)s/%(config)s">%(config)s</a></td>' % items
    260     output += "</tr>"
     262      output += fl(7,'<td><a href="%(root)s/%(node)s/%(config)s">%(config)s</a></td>' % items)
     263    output += fl(5, "</tr>")
    261264  output += """
    262265    </table>
Note: See TracChangeset for help on using the changeset viewer.