diff options
author | Chris Johns <chrisj@rtems.org> | 2013-03-03 15:16:43 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-03-03 15:16:43 +1100 |
commit | d6638aae6c52f9d1b51fbdb06cca74d02fb8687a (patch) | |
tree | da579cd9acdd44944e9dc26a9c8f05e54114556c | |
parent | Fix the asciidoc import. Add the missing config files. (diff) | |
download | rtems-source-builder-d6638aae6c52f9d1b51fbdb06cca74d02fb8687a.tar.bz2 |
Add html as a format and now asciidoc gives you the asciidoc text.
-rw-r--r-- | source-builder/sb/reports.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source-builder/sb/reports.py b/source-builder/sb/reports.py index 3581260..a67b603 100644 --- a/source-builder/sb/reports.py +++ b/source-builder/sb/reports.py @@ -82,10 +82,10 @@ class report: return self.format == 'text' def is_asciidoc(self): - return self.format == 'asciidoc' + return self.format == 'asciidoc' or self.format == 'html' def setup(self): - if self.is_asciidoc(): + if self.format == 'html': try: import asciidocapi except: @@ -292,7 +292,7 @@ class report: self.config(name) def generate(self, name): - if self.is_asciidoc(): + if self.format == 'html': if self.asciidoc is None: raise error.general('asciidoc not initialised') import StringIO @@ -320,7 +320,7 @@ def run(args): try: optargs = { '--list-bsets': 'List available build sets', '--list-configs': 'List available configurations', - '--format': 'Output format (text, asciidoc)', + '--format': 'Output format (text, html, asciidoc)', '--output': 'File name to output the report' } opts, _defaults = defaults.load(args, optargs) log.default = log.log(opts.logfiles()) @@ -344,6 +344,9 @@ def run(args): pass elif format_opt[1] == 'asciidoc': format = 'asciidoc' + ext = '.txt' + elif format_opt[1] == 'html': + format = 'html' ext = '.html' else: raise error.general('invalid format: %s' % (format_opt[1])) |