mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Add html as a format and now asciidoc gives you the asciidoc text.
This commit is contained in:
parent
6ee25e54de
commit
d6638aae6c
@ -82,10 +82,10 @@ class report:
|
|||||||
return self.format == 'text'
|
return self.format == 'text'
|
||||||
|
|
||||||
def is_asciidoc(self):
|
def is_asciidoc(self):
|
||||||
return self.format == 'asciidoc'
|
return self.format == 'asciidoc' or self.format == 'html'
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
if self.is_asciidoc():
|
if self.format == 'html':
|
||||||
try:
|
try:
|
||||||
import asciidocapi
|
import asciidocapi
|
||||||
except:
|
except:
|
||||||
@ -292,7 +292,7 @@ class report:
|
|||||||
self.config(name)
|
self.config(name)
|
||||||
|
|
||||||
def generate(self, name):
|
def generate(self, name):
|
||||||
if self.is_asciidoc():
|
if self.format == 'html':
|
||||||
if self.asciidoc is None:
|
if self.asciidoc is None:
|
||||||
raise error.general('asciidoc not initialised')
|
raise error.general('asciidoc not initialised')
|
||||||
import StringIO
|
import StringIO
|
||||||
@ -320,7 +320,7 @@ def run(args):
|
|||||||
try:
|
try:
|
||||||
optargs = { '--list-bsets': 'List available build sets',
|
optargs = { '--list-bsets': 'List available build sets',
|
||||||
'--list-configs': 'List available configurations',
|
'--list-configs': 'List available configurations',
|
||||||
'--format': 'Output format (text, asciidoc)',
|
'--format': 'Output format (text, html, asciidoc)',
|
||||||
'--output': 'File name to output the report' }
|
'--output': 'File name to output the report' }
|
||||||
opts, _defaults = defaults.load(args, optargs)
|
opts, _defaults = defaults.load(args, optargs)
|
||||||
log.default = log.log(opts.logfiles())
|
log.default = log.log(opts.logfiles())
|
||||||
@ -344,6 +344,9 @@ def run(args):
|
|||||||
pass
|
pass
|
||||||
elif format_opt[1] == 'asciidoc':
|
elif format_opt[1] == 'asciidoc':
|
||||||
format = 'asciidoc'
|
format = 'asciidoc'
|
||||||
|
ext = '.txt'
|
||||||
|
elif format_opt[1] == 'html':
|
||||||
|
format = 'html'
|
||||||
ext = '.html'
|
ext = '.html'
|
||||||
else:
|
else:
|
||||||
raise error.general('invalid format: %s' % (format_opt[1]))
|
raise error.general('invalid format: %s' % (format_opt[1]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user