libbe.command.html

class libbe.command.html.HTML(*args, **kwargs)

Generate a static HTML dump of the current repository status

>>> import sys
>>> import libbe.bugdir
>>> bd = libbe.bugdir.SimpleBugDir(memory=False)
>>> io = libbe.command.StringInputOutput()
>>> io.stdout = sys.stdout
>>> ui = libbe.command.UserInterface(io=io)
>>> ui.storage_callbacks.set_storage(bd.storage)
>>> cmd = HTML(ui=ui)
>>> ret = ui.run(cmd, {'output':os.path.join(bd.storage.repo, 'html_export')})
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export'))
True
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'index.html'))
True
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'index_inactive.html'))
True
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs'))
True
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs', 'a', 'index.html'))
True
>>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs', 'b', 'index.html'))
True
>>> ui.cleanup()
>>> bd.cleanup()

Methods

cleanup()
complete([argument, fragment])
help(*args)
run([options, args])
usage()
name = 'html'
class libbe.command.html.HTMLGen(bd, template=None, title='Site Title', index_header='Index Header', min_id_length=-1, verbose=False, encoding=None, stdout=None)

Methods

run(out_dir)
write_default_template(out_dir)
run(out_dir)
write_default_template(out_dir)
libbe.command.html.Html

alias of HTML

This Page