( xmldir=None, output=None, id=None, title=None, index=False )
| 826 | |
| 827 | |
| 828 | def main( xmldir=None, output=None, id=None, title=None, index=False ): |
| 829 | #~ print '--- main: xmldir = %s, output = %s' % (xmldir,output) |
| 830 | |
| 831 | input = glob.glob( os.path.abspath( os.path.join( xmldir, "*.xml" ) ) ) |
| 832 | input.sort |
| 833 | translator = Doxygen2BoostBook(id=id, title=title, index=index) |
| 834 | #~ Feed in the namespaces first to build up the set of namespaces |
| 835 | #~ and definitions so that lookup is unambiguous when reading in the definitions. |
| 836 | namespace_files = filter( |
| 837 | lambda x: |
| 838 | os.path.basename(x).startswith('namespace'), |
| 839 | input) |
| 840 | decl_files = filter( |
| 841 | lambda x: |
| 842 | not os.path.basename(x).startswith('namespace') and not os.path.basename(x).startswith('_'), |
| 843 | input) |
| 844 | for dox in namespace_files: |
| 845 | #~ print '--|',os.path.basename(dox) |
| 846 | translator.addDox(xml.dom.minidom.parse(dox)) |
| 847 | for dox in decl_files: |
| 848 | #~ print '--|',os.path.basename(dox) |
| 849 | translator.addDox(xml.dom.minidom.parse(dox)) |
| 850 | |
| 851 | if output: |
| 852 | output = open(output,'w') |
| 853 | else: |
| 854 | output = sys.stdout |
| 855 | if output: |
| 856 | output.write(translator.tostring()) |
| 857 | |
| 858 | |
| 859 | main( **get_args() ) |
no test coverage detected