CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-mdutils

A comprehensive Python library for programmatically creating and manipulating Markdown files with support for headers, tables, lists, images, links, and text formatting.

80

1.90x
Overview
Eval results
Files

task.mdevals/scenario-1/

Dynamic Report Generator

Build a Python program that generates a structured Markdown report where content sections can be filled in non-sequentially. The report should have a predefined structure with placeholders that get populated with data computed at different stages.

Capabilities

Creates document structure with placeholders

The program should create a document with a level-1 header "Monthly Analytics Report" followed by three sections (level-2 headers): "Summary", "Data", and "Conclusion". Each section should contain a placeholder that will be filled later.

  • The generated document has header "Monthly Analytics Report" and three section headers "Summary", "Data", "Conclusion" in that order @test

Populates content using placeholders

After creating the structure, populate the three section placeholders in reverse order (Conclusion, then Data, then Summary).

  • The Summary section is populated with text "Q4 showed 15% growth." @test
  • The Data section is populated with a table having headers "Metric" and "Value", and two rows: "Sales"|"$50000" and "Growth"|"15%" @test
  • The Conclusion section is populated with text "Goals exceeded." @test
  • All three sections appear in the correct positions in the final document @test

Implementation

@generates

API

def generate_report(output_filename: str) -> str:
    """
    Generates a monthly analytics report with non-sequential content filling.

    Creates a structured Markdown document with predefined sections,
    then populates them in a non-linear fashion using placeholder mechanisms.

    Args:
        output_filename: Name of the output Markdown file (without .md extension)

    Returns:
        The complete Markdown content as a string
    """
    pass

Dependencies { .dependencies }

mdutils { .dependency }

Provides Markdown generation capabilities with support for non-linear document construction.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-mdutils

tile.json