kapidox::generator

kapidox.generator Namespace Reference

Classes

class  Context
 

Functions

def build_classmap (tagfile)
 
def create_dirs (ctx)
 
def create_fw_context (args, lib, tagfiles, copyright='')
 
def create_fw_tagfile_tuple (lib)
 
def create_global_index (products)
 
def create_jinja_environment (doxdatadir)
 
def create_product_index (product)
 
def create_qch (products, tagfiles)
 
def find_tagfiles (docdir, doclink=None, flattenlinks=False, exclude=None, _depth=0)
 
def finish_fw_apidocs
 
def finish_fw_apidocs_doxygen
 
def finish_fw_apidocs_qdoc
 
def gen_fw_apidocs (ctx, tmp_base_dir)
 
def gen_template_environment
 
def generate_apidocs
 
def generate_apidocs_qdoc
 
def generate_dependencies_page (tmp_dir, doxdatadir, modulename, dependency_diagram)
 
def generate_diagram (png_path, fancyname, dot_files, tmp_dir)
 
def indexer (lib)
 
def load_template (path)
 
def menu_items (htmldir, modulename)
 
def parse_dox_html (stream)
 
def postprocess_internal (htmldir, tmpl, mapping)
 
def postprocess_internal_qdoc
 
def process_subgroup_html_files (outputfile, doxdatadir, groups, available_platforms, title, qch_enabled=False)
 
def process_toplevel_html_file (outputfile, doxdatadir, products, title, qch_enabled=False)
 
def search_for_tagfiles (suggestion=None, doclink=None, flattenlinks=False, searchpaths=[], exclude=None)
 

Variables

bool DEPDIAGRAM_AVAILABLE = True
 
string HTML_SUBDIR = 'html'
 
string WARN_LOGFILE = 'doxygen-warnings.log'
 

Detailed Description

The generator.

Function Documentation

def kapidox.generator.build_classmap (   tagfile)

Parses a tagfile to get a map from classes to files.

Parameters
tagfilethe Doxygen-generated tagfile to parse.
Returns
A list of maps (keys: classname and filename).

Definition at line 501 of file generator.py.

def kapidox.generator.find_tagfiles (   docdir,
  doclink = None,
  flattenlinks = False,
  exclude = None,
  _depth = 0 
)

Find Doxygen-generated tag files in a directory.

The tag files must have the extension .tags, and must be in the listed directory, a subdirectory or a subdirectory named html of a subdirectory.

Parameters
docdir(string) the directory to search.
doclink(string) the path or URL to use when creating the documentation links; if None, this will default to docdir. (optional, default None)
flattenlinks(bool) if True, generated links will assume all the html files are directly under doclink; else the html files are assumed to be at the same relative location to doclink as the tag file is to docdir; ignored if doclink is not set. (optional, default False)
Returns
A list of pairs of (tag_file,link_path).

Definition at line 238 of file generator.py.

def kapidox.generator.generate_apidocs (   ctx)

Generate the API documentation for a single directory.

Definition at line 540 of file generator.py.

def kapidox.generator.generate_dependencies_page (   tmp_dir,
  doxdatadir,
  modulename,
  dependency_diagram 
)

Create modulename-dependencies.md in tmp_dir

Definition at line 517 of file generator.py.

def kapidox.generator.generate_diagram (   png_path,
  fancyname,
  dot_files,
  tmp_dir 
)

Generate a dependency diagram for a framework.

Definition at line 642 of file generator.py.

def kapidox.generator.indexer (   lib)

Create json index from xml <add> <doc> <field name="type">source</field> <field name="name">kcmodule.cpp</field> <field name="url">kcmodule_8cpp_source.html::l00001</field> <field name="keywords"></field> <field name="text"></field> </doc> </add.

Definition at line 805 of file generator.py.

def kapidox.generator.menu_items (   htmldir,
  modulename 
)

Menu items for standard Doxygen files.

Looks for a set of standard Doxygen files (like namespaces.html) and provides menu text for those it finds in htmldir.

Parameters
htmldir(string) the directory the HTML files are contained in.
modulname(string) the name of the library
Returns
A list of maps with 'text' and 'href' keys.

Definition at line 339 of file generator.py.

def kapidox.generator.parse_dox_html (   stream)

Parse the HTML files produced by Doxygen, extract the key/value block we add through header.html and return a dict ready for the Jinja template.

The HTML files produced by Doxygen with our custom header and footer files look like this:

1 <!--
2 key1 value1
3 key2 value2
4 ...
5 -->
6 <html>
7 <head>
8 ...
9 </head>
10 <body>
11 ...
12 </body>
13 </html>

The parser fills the dict from the top key/value block, and add the content of the body to the dict using the "content" key.

We do not use an XML parser because the HTML file might not be well-formed, for example if the documentation contains raw HTML.

The key/value block is kept in a comment so that it does not appear in Qt Compressed Help output, which is not postprocessed by ourself.

Definition at line 392 of file generator.py.

def kapidox.generator.postprocess_internal (   htmldir,
  tmpl,
  mapping 
)

Substitute text in HTML files.

Performs text substitutions on each line in each .html file in a directory.

Parameters
htmldir(string) the directory containing the .html files.
mapping(dict) a dict of mappings.

Definition at line 463 of file generator.py.

def kapidox.generator.postprocess_internal_qdoc (   htmldir)

Substitute text in HTML files.

Performs text substitutions on each line in each .html file in a directory.

Parameters
htmldir(string) the directory containing the .html files.
mapping(dict) a dict of mappings.

Definition at line 434 of file generator.py.

def kapidox.generator.search_for_tagfiles (   suggestion = None,
  doclink = None,
  flattenlinks = False,
  searchpaths = [],
  exclude = None 
)

Find Doxygen-generated tag files.

See the find_tagfiles documentation for how the search is carried out in each directory; this just allows a list of directories to be searched.

At least one of docdir or searchpaths must be given for it to find anything.

Parameters
suggestionthe first place to look (will complain if there are no documentation tag files there)
doclinkthe path or URL to use when creating the documentation links; if None, this will default to docdir
flattenlinksif this is True, generated links will assume all the html files are directly under doclink; if False (the default), the html files are assumed to be at the same relative location to doclink as the tag file is to docdir; ignored if doclink is not set
searchpathsother places to look for documentation tag files
Returns
A list of pairs of (tag_file,link_path)

Definition at line 305 of file generator.py.

This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:55:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.