Exemple #1
0
 def on_help_menu_item_activate(self, widget):
     temp_dir = self.journal.dirs.temp_dir
     utils.write_file(info.help_text, os.path.join(temp_dir, 'source.txt'))
     headers = [_('RedNotebook Documentation'), info.version, '']
     options = {'toc': 1,}
     html = markup.convert(info.help_text, 'xhtml', headers, options)
     utils.show_html_in_browser(html, os.path.join(temp_dir, 'help.html'))
Exemple #2
0
def write_documentation(dir):
    '''
    Write the documenation as html to a directory
    Include the original markup as "source.txt"
    '''
    from rednotebook.util import utils
    from rednotebook.util import markup

    utils.write_file(help_text, os.path.join(dir, 'source.txt'))
    headers = [_('RedNotebook Documentation'), version, '']
    options = {'toc': 1,}
    html = markup.convert(help_text, 'xhtml', headers, options)
    utils.write_file(html, os.path.join(dir, 'help.html'))