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-4/

Product Showcase Report Generator

A Python utility that generates a formatted Markdown report showcasing product images with various display configurations.

Capabilities

Generate product showcase with image gallery

Create a report that displays product images with different sizing and alignment options to create an attractive product showcase layout.

  • Given a list of products with image paths and display specifications, generate a report with a "Product Showcase" title header @test
  • Images should be displayed with specified width-only dimensions (e.g., 300px width) when only width is provided @test
  • Images should be displayed with specified height-only dimensions (e.g., 250px height) when only height is provided @test
  • Images should be displayed with both width and height dimensions (e.g., 400x300px) when both are provided @test
  • Images should be aligned to the left when alignment is set to 'left' @test
  • Images should be centered when alignment is set to 'center' @test
  • Images should be aligned to the right when alignment is set to 'right' @test
  • Multiple product images with different configurations should all be displayed correctly in the same report @test

Implementation

@generates

API

def generate_product_showcase(products, output_file):
    """
    Generates a Markdown report showcasing products with images.

    Args:
        products: List of dicts, each containing:
            - 'name': Product name (str)
            - 'image_path': Path to product image (str)
            - 'width': Optional width in pixels (int or None)
            - 'height': Optional height in pixels (int or None)
            - 'align': Alignment ('left', 'center', or 'right')
        output_file: Path where the Markdown file should be created (str)

    Returns:
        None - Creates the Markdown file at the specified path
    """
    pass

Dependencies { .dependencies }

mdutils { .dependency }

Provides Markdown generation support with HTML image capabilities.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-mdutils

tile.json