Exemplo n.º 1
0
def finish_fw_apidocs(ctx, group_menu):
    classmap = build_classmap(ctx.tagfile)

    entries = [{'href': '../../index.html', 'text': 'KDE API Reference'}]
    if ctx.fwinfo.part_of_group:
        entries[0]['href'] = '../' + entries[0]['href']
        entries.append({
            'href': '../../index.html',
            'text': ctx.fwinfo.product.fancyname
        })
    entries.append({'href': 'index.html', 'text': ctx.fancyname})

    template_mapping = {
        'breadcrumbs': {
            'entries': entries
        },
    }
    copyright = '1996-' + str(
        datetime.date.today().year) + ' The KDE developers'
    mapping = {
        'qch': ctx.qhp,
        'doxygencss': 'doxygen.css',
        'resources': ctx.resourcedir,
        'title': ctx.title,
        'fwinfo': ctx.fwinfo,
        'copyright': copyright,
        'doxygen_menu': {
            'entries': menu_items(ctx.htmldir, ctx.modulename)
        },
        'class_map': {
            'classes': classmap
        },
        'kapidox_version': utils.get_kapidox_version(),
    }
    if template_mapping:
        mapping.update(template_mapping)
    logging.info('Postprocessing')

    tmpl = create_jinja_environment(
        ctx.doxdatadir).get_template('library.html')
    postprocess_internal(ctx.htmldir, tmpl, mapping)

    tmpl2 = create_jinja_environment(
        ctx.doxdatadir).get_template('search.html')
    search_output = ctx.fwinfo.outputdir + "/html/search.html"
    with codecs.open(search_output, 'w', 'utf-8') as outf:
        outf.write(tmpl2.render(mapping))
Exemplo n.º 2
0
def finish_fw_apidocs(ctx, group_menu):
    classmap = build_classmap(ctx.tagfile)
    #write_mapping_to_php(classmap, os.path.join(ctx.outputdir, 'classmap.inc'))

    entries = [{
        'href': '../../index.html',
        'text': 'KDE API Reference'
        }]
    if  ctx.fwinfo.part_of_group:
        entries[0]['href'] = '../' + entries[0]['href']
        entries.append({
            'href': '../../index.html',
            'text': ctx.fwinfo.product.fancyname
            })
    entries.append({
        'href': 'index.html',
        'text': ctx.fancyname
        })

    template_mapping = {
                'breadcrumbs': {
                    'entries': entries
                    },
                }
    copyright = '1996-' + str(datetime.date.today().year) + ' The KDE developers'
    mapping = {
            'doxygencss': 'doxygen.css',
            'resources': ctx.resourcedir,
            'title': ctx.title,
            'fwinfo': ctx.fwinfo,
            'copyright': copyright,
            'api_searchbox': ctx.api_searchbox,
            'doxygen_menu': {'entries': menu_items(ctx.htmldir, ctx.modulename)},
            'class_map': {'classes': classmap},
            'kapidox_version': utils.get_kapidox_version(),
        }
    if template_mapping:
        mapping.update(template_mapping)
    logging.info('Postprocessing')

    tmpl = create_jinja_environment(ctx.doxdatadir).get_template('library.html')
    postprocess_internal(ctx.htmldir, tmpl, mapping)

    tmpl2 = create_jinja_environment(ctx.doxdatadir).get_template('search.html')
    search_output = ctx.fwinfo.outputdir + "/html/search.html"
    with codecs.open(search_output, 'w', 'utf-8') as outf:
        outf.write(tmpl2.render(mapping))
Exemplo n.º 3
0
def postprocess(ctx, classmap, template_mapping=None):
    mapping = {
            'doxygencss': 'doxygen.css',
            'resources': ctx.resourcedir,
            'title': ctx.title,
            'fwinfo': ctx.fwinfo,
            'copyright': ctx.copyright,
            'api_searchbox': ctx.api_searchbox,
            'doxygen_menu': {'entries': menu_items(ctx.htmldir, ctx.modulename)},
            'class_map': {'classes': classmap},
            'kapidox_version': utils.get_kapidox_version(),
        }
    if template_mapping:
        mapping.update(template_mapping)
    logging.info('Postprocessing')

    tmpl = create_jinja_environment(ctx.doxdatadir).get_template('doxygen.html')
    postprocess_internal(ctx.htmldir, tmpl, mapping)
Exemplo n.º 4
0
def postprocess(ctx, classmap, template_mapping=None):
    mapping = {
        'doxygencss': 'doxygen.css',
        'resources': ctx.resourcedir,
        'title': ctx.title,
        'fwinfo': ctx.fwinfo,
        'copyright': ctx.copyright,
        'doxygen_menu': {
            'entries': menu_items(ctx.htmldir, ctx.modulename)
        },
        'class_map': {
            'classes': classmap
        },
        'kapidox_version': utils.get_kapidox_version(),
    }
    if template_mapping:
        mapping.update(template_mapping)
    logging.info('Postprocessing')

    tmpl = create_jinja_environment(
        ctx.doxdatadir).get_template('doxygen.html')
    postprocess_internal(ctx.htmldir, tmpl, mapping)