()
Convert HTML sources to manfile.
Convert HTML sources to manfile.
Convert HTML sources to manfile .
def makeman():
    """Convert HTML sources to manfile."""
    title_html = '<h1>pcbasic</h1><p>%s</p>\n' % SETUP_DATA['description']
    desc_html = '<h3>Description</h2><p>%s</p>\n' % SETUP_DATA['long_description']
    options_html = open(OPTIONS_HTML).read()
    examples_html = open(EXAMPLE_HTML).read()
    more_html = open(MORE_HTML).read()
    man_html = ''.join((title_html, desc_html, options_html, examples_html, more_html))
    try:
        os.mkdir(DOC_PATH)
    except EnvironmentError:
        # already there, ignore
        pass
    # output manfile
    with gzip.open(MAN_FILE, 'w') as manfile:
        manfile.write(_html_to_man(man_html).encode('utf-8'))
def makeman ( ) : title_html = '<h1>pcbasic</h1><p>%s</p>\n' % SETUP_DATA [ 'description' ] desc_html = '<h3>Description</h2><p>%s</p>\n' % SETUP_DATA [ 'long_description' ] options_html = open ( OPTIONS_HTML ) . read ( ) examples_html = open ( EXAMPLE_HTML ) . read ( ) more_html = open ( MORE_HTML ) . read ( ) man_html = '' . join ( ( title_html , desc_html , options_html , examples_html , more_html ) ) try : os . mkdir ( DOC_PATH ) except EnvironmentError : # already there, ignore pass # output manfile with gzip . open ( MAN_FILE , 'w' ) as manfile : manfile . write ( _html_to_man ( man_html ) . encode ( 'utf-8' ) )