Skip to main content

Docs and TOC generator for Robot Framework resources and libs

Project description

Robot Frmework LibTOC

What it does

This tool generates docs using Robot Framework Libdoc for an entire folder with Robot Framework resources/libs and creates a TOC (Table of Content) file for them

Why use it

The Robot Framework Libdoc tool normally generates a HTML file for a single keyword library or a resource file. If you have several keyword libraries, you just get several separate HTML files.

This tool collects separate keyword documentation files in one place and creates a TOC (Table of content) page with links to these files.
The result is a folder with several static HTML pages which can be placed somewhere in the intranet or uploaded as CI artifact - so everybody can easily access the keywords docs.

Here is the example screenshot

How it works

  • The tool goes through the specified folder with RF resources and it's direct subfolders
  • It looks for the config files named .libtoc which contain:
    1. Paths to resource files in glob format which you would like to create docs for
    2. Installed RF libraries (names and necessary import params like described in libdoc user guide)

      Other libdoc CLI options (e.g. version or name of the output file) are not supported

  • Then it gererates the docs using libdoc - both for files paths, resolved from the glob patterns, and for the installed libraries. The created HTML files are places in the libtoc output_dir - keeping the original subfolder structure of resources
  • Finally it generates a TOC (Table of Contents) HTML page with links to all the generated HTML files. The navigation tree structure in the TOC repeats the folder tree structure.

Example of a .libtoc config file

[paths]
# Use glob patterns
**/*.robot
**/*.resource
**/*.py

[libs]
# Use RF library names with params - like for libdoc
SeleniumLibrary
Remote::http://10.0.0.42:8270

How to install it

System requirements

  • Python >=3.9
  • Robot Framework

Installation using pip

pip install robotframework-libtoc

How to use it

  • Create the .libtoc config files in subfolders where you need docs to be created.

    A config file directly in the root of the resources folder is valid, but not mandatory.

  • Run libtoc. The last resources_dir parameter is mandatory, others are optional:

    • -d, --output_dir
    • -c, --config_file
    • -t, --toc_file

    Examples:

    libtoc example_resources
    libtoc --output_dir docs example_resources
    libtoc --output_dir docs --toc_file my_special_docs.html example_resources
    
  • Open the created file, e.g. docs\keyword_docs.html

How to change the TOC and the homepage HTML

The HTML templates are located directly in the python source code - see functions toc and homepage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-libtoc-1.0.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

robotframework_libtoc-1.0.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file robotframework-libtoc-1.0.1.tar.gz.

File metadata

  • Download URL: robotframework-libtoc-1.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.10 Windows/10

File hashes

Hashes for robotframework-libtoc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9138191ef41bfebabd1f820bdd8b075c71d2f98e11a6230202556d42293bd0d7
MD5 8124f5dc825a03df12aae2b8e3e545b0
BLAKE2b-256 d1befa083e9b1bd77fc131ed0f8ff8a6f3e4900960a5b9611b9112b0ceafddef

See more details on using hashes here.

File details

Details for the file robotframework_libtoc-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_libtoc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1f35cb651cfb31121828426ef8017fc8d57e782a7bf7bca3789ce3fc9adb1c8
MD5 35deddd8c281833ef79e7465281094f9
BLAKE2b-256 9c2a09cbf76279ece28485e2138ccbf79be12c2bf88491e6aafcbff4a243fa6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page