Python API

builder module

class crl.doc.crldocbuilder.CRLDocBuilder(args)[source]

CRLDocBuilder generates Sphinx documentation source from Robot Framework test libraries as default. Document type can be filtered with argument if not all the 3 types (builtin, api, crl) needed

Example usage:

  • CRLDockBuilder().create_doc()
  • CRLDockBuilder().create_doc([‘crl’, ‘builtin’])

Note

This tool does not generated the final documentation. The Spinx configuration files (e.g. conf.py and index.rst) must be strored either before or after the generation into sphinxdocs directory prior Sphinx build.

exception crl.doc.crldocbuilder.InvalidRobotdocsconfType[source]
class crl.doc.crldocbuilder.NamespacePath[source]

utils module

class crl.doc.crldocutils.RobotToRstConverter[source]
change_robot_table_to_rst_table(file_path)[source]

Opens file with xml, searches doc nodes, changes Robot XML tables to rst tables and saves it as the same xml.

Note

if the doc is already in ReST format, then no conversion is made.

Parameters:file_path (String) – XML file path
exception crl.doc.crldocutils.RobotXmlFileNotFound[source]
crl.doc.crldocutils.crl_convert_xml_to_rst(src_file, dst_file, template_file, author, maintainer, version=None)[source]

Converts xml file to rst template

crl.doc.crldocutils.generate_builtin_doc(builtin_lib_name, templates, xml_dir, rst_dir)[source]

Function generate builtin documentation

crl.doc.crldocutils.generate_rflibrary_doc(lib_path, templates, xml_dir, rst_dir)[source]

Generate Rst file for the provided RobotFramework Library file.

Parameters:
  • lib_path – The absolute path to the library file
  • templates – The template to be used for rst file generation
  • rst_dir – The path to the rst files’ folder
  • xml_dir – The path to the xml files’ folder
crl.doc.crldocutils.generate_xml_doc(dst_file)[source]

generates xml file from resource or library

tablecreator module

class crl.doc.rsttablecreator.RstTableCreator[source]

Based on the principles of xml, creates table in rst format. Creates table in rst format basing on xml tables

change_robot_table_to_rst_table(file_path)[source]

Summary line.

Opens file with xml, searches doc nodes, changes Robot XML tables to rst tables and saves it as the same xml.

Args:
file_path (str): File path to the Robot XML tables
Returns:
Nothing