Announcing robotframework-libdocgen v1.0.0
Hello Robot Framework community!
I’m excited to introduce robotframework-libdocgen - a powerful documentation generator that creates professional HTML and Markdown documentation for your Robot Framework libraries.
What is it?
robotframework-libdocgen automatically extracts keywords, arguments, and docstrings from your Python library files and generates beautiful, interactive documentation with:
- Professional HTML output with search, navigation
- Markdown export for GitHub/GitLab README files
- Full Markdown support - tables, images, code blocks, and more
- Advanced syntax highlighting - custom Robot Framework syntax with distinct colors for keywords, variables, comments, etc.
- Type hints support - automatically displays argument types
- Responsive design - works great on desktop, tablet, and mobile
Quick Start
Installation:
pip install robotframework-libdocgen
Usage:
# Generate HTML documentation (default)
robotframework-libdocgen my_library.py -o docs.html -c config.json
# Generate Markdown documentation
robotframework-libdocgen my_library.py -f markdown -o README.md
# Or use the shorter alias
docgen my_library.py -c config.json
Key Features
Automatic Keyword Extraction
- Automatically extracts keywords from
@keyworddecorated methods - Supports both
@keywordand@keyword("Custom Name")syntax - Converts function names to title case automatically
Professional Syntax Highlighting
- Robot Framework keywords (automatically detected)
- Variables:
${variable},@{list},&{dict} - Keyword arguments:
arg=value - Comments (inline and full-line)
- Reserved control keywords:
IF,FOR,TRY,WHILE, etc. - Settings keywords:
Library,Resource,Documentation, etc.
Rich Documentation Features
- Full Markdown support in docstrings
- Tables with professional styling
- Images support
- Code blocks with syntax highlighting (Robot Framework, Python, JavaScript, and 100+ languages)
- Type hints display
- Example code blocks
Interactive HTML Documentation
- Real-time keyword search
- Responsive sidebar navigation
- Light/dark theme toggle
- Mobile-friendly hamburger menu
- Dynamic metadata display
Example
from robot.api.deco import keyword
class MyLibrary:
@keyword("Process Data")
def process_data(self, data: dict, options: list = None) -> dict:
"""
Process data with optional configuration.
**Arguments:**
- `data`: Dictionary containing data to process
- `options`: Optional list of processing options
**Example:**
```robot
*** Settings ***
Library MyLibrary
*** Test Cases ***
Process Example
${data}= Create Dictionary name=John age=30
${result}= Process Data ${data}
```
"""
# Implementation
return {}
Live Example
See the generated documentation in action:
View Sample Documentation
Links
Use Cases
- Generate professional documentation for your Robot Framework libraries
- Create interactive HTML documentation for sharing with teams
- Export documentation to Markdown for GitHub/GitLab
- Document custom keywords with type hints and examples
- Create beautiful documentation sites for your libraries
Requirements
- Python 3.8+
- Robot Framework >= 5.0.1
All other dependencies (markdown, pygments, rich) are automatically installed.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the GitHub repository.
License
Apache License 2.0
I hope this tool helps the Robot Framework community create better documentation for their libraries. Feedback and suggestions are always welcome!
Happy documenting! ![]()