tessl install tessl/pypi-mdutils@1.8.0A comprehensive Python library for programmatically creating and manipulating Markdown files with support for headers, tables, lists, images, links, and text formatting.
Agent Success
Agent success rate when using this tile
80%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.9x
Baseline
Agent success rate without this tile
42%
Build a report generation system that creates structured reports from templates using placeholder markers.
The system must be able to create a document outline with multiple sections, where specific content locations are marked with placeholders for later insertion.
The system must be able to insert content into previously created placeholder locations after the document structure is defined.
[['Region', 'Q1', 'Q2'], ['North', '100K', '120K'], ['South', '80K', '95K']], insert a formatted table at that placeholder location @testThe system must be able to save the fully populated template to a markdown file.
@generates
class ReportGenerator:
"""
A report generator that creates structured markdown reports using templates.
"""
def __init__(self, title: str, filename: str):
"""
Initialize the report generator.
Args:
title: The title of the report
filename: The output filename (without .md extension)
"""
pass
def create_section(self, level: int, heading: str) -> None:
"""
Create a section header in the report.
Args:
level: Header level (1-6)
heading: The heading text
"""
pass
def create_placeholder(self, name: str) -> None:
"""
Create a placeholder marker in the document for later content insertion.
Args:
name: Unique name for the placeholder
"""
pass
def insert_table(self, placeholder_name: str, data: list[list[str]]) -> None:
"""
Insert a table at the specified placeholder location.
Args:
placeholder_name: Name of the placeholder to replace
data: 2D array where first row is headers, remaining rows are data
"""
pass
def insert_text(self, placeholder_name: str, text: str) -> None:
"""
Insert text content at the specified placeholder location.
Args:
placeholder_name: Name of the placeholder to replace
text: Text content to insert
"""
pass
def generate(self) -> str:
"""
Generate the complete report and save to file.
Returns:
The path to the generated markdown file
"""
passProvides markdown document generation capabilities.