diff options
Diffstat (limited to 'newlib/doc/chapter-texi2docbook.py')
-rwxr-xr-x | newlib/doc/chapter-texi2docbook.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/newlib/doc/chapter-texi2docbook.py b/newlib/doc/chapter-texi2docbook.py index 70ab3c04f..e9904ad00 100755 --- a/newlib/doc/chapter-texi2docbook.py +++ b/newlib/doc/chapter-texi2docbook.py @@ -16,8 +16,8 @@ def main(): first_node = True prev_sect = False - print ('<?xml version="1.0" encoding="UTF-8"?>') - print ('<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">') + print('<?xml version="1.0" encoding="UTF-8"?>') + print('<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">') for l in sys.stdin.readlines(): l = l.rstrip() @@ -29,27 +29,27 @@ def main(): l = l.replace("@node", "", 1) l = l.strip() if first_node: - print ('<chapter id="%s_chapter" xmlns:xi="http://www.w3.org/2001/XInclude">' % l.lower().replace(' ', '_')) + print('<chapter id="%s_chapter" xmlns:xi="http://www.w3.org/2001/XInclude">' % l.lower().replace(' ', '_')) first_node = False else: if prev_sect: - print ('</section>') - print ('<section id="%s">' % l) + print('</section>') + print('<section id="%s">' % l) prev_sect = True elif l.startswith("@chapter "): l = l.replace("@chapter ", "", 1) - print ('<title>%s</title>' % l) + print('<title>%s</title>' % l) elif l.startswith("@section "): l = l.replace("@section ", "", 1) - print ('<title>%s</title>' % l) + print('<title>%s</title>' % l) elif l.startswith("@include "): l = l.replace("@include ", "", 1) l = l.replace(".def", ".xml", 1) - print ('<xi:include href="%s"/>' % l.strip()) + print('<xi:include href="%s"/>' % l.strip()) if prev_sect: - print ('</section>') - print ('</chapter>') + print('</section>') + print('</chapter>') -if __name__ == "__main__" : +if __name__ == "__main__": main() |