Markdown to HTML & PDF Converter for Openclaw

A local processing tool for seamless conversion between Markdown, HTML, and PDF formats.

jisuapi
v1.0.5
Apr 3, 2026
9
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install md2html

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install md2html using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Markdown to HTML & PDF Converter?

This conversion skill provides a robust local environment for document transformation without requiring external API keys. It enables AI agents to generate styled HTML pages, export professional PDF documents via base64 encoding, and reverse-engineer HTML snippets back into editable Markdown. By integrating these capabilities, Openclaw Skills can automate document preparation and report generation workflows with high efficiency and privacy.

Markdown to HTML & PDF Converter Use Cases

  • Converting Markdown documentation into standalone HTML pages with embedded styling.
  • Generating downloadable PDF reports from dynamically created agent responses or Markdown content.
  • Scraping or receiving web content as HTML and converting it into editable Markdown for further analysis.
  • Formatting structured data retrieved from third-party APIs into professional-grade document formats.

How Markdown to HTML & PDF Converter Works

  1. The user provides either a local file path or raw string content in Markdown or HTML format.
  2. The skill identifies the target conversion type (html, pdf, or html2md).
  3. For Markdown to HTML, the engine processes the text and wraps it in a standard HTML5 template with CSS.
  4. For PDF generation, the tool renders the HTML content and encodes the resulting document into a base64 string.
  5. For HTML to Markdown, the utility parses the HTML tags to extract clean, readable Markdown syntax.
  6. The processed result is returned as a JSON object, allowing Openclaw Skills to either display the text or save the file to disk.

Markdown to HTML & PDF Converter Setup

Ensure you have python3 installed on your system, then install the required Python libraries using the following command:

pip install markdown xhtml2pdf html2text

The core logic is contained within the skills/md2html/md2html.py script, which can be called directly via the command line.

Markdown to HTML & PDF Converter Data Schema & Taxonomy

The skill utilizes a structured JSON input to define the source and parameters of the conversion:

Parameter Type Required Description
path string Optional* The local file system path to the source file.
content string Optional* The raw string content to be converted.
title string No Sets the document title for HTML and PDF headers.

*Note: At least one of 'path' or 'content' must be provided. If both are present, 'path' takes priority. Output is returned as a JSON object containing keys like html, pdf_base64, or markdown depending on the operation.

Markdown to HTML & PDF Converter Advanced Features

  • Local execution ensures data privacy as no document content is sent to external conversion APIs.
  • Base64 encoded PDF outputs allow for easy programmatic handling and cross-platform file saving within Openclaw Skills.
  • Seamless integration with data-fetching agents (e.g., JisuAPI) to automate the creation of styled financial, weather, or news reports.
  • Support for bidirectional conversion between HTML and Markdown, making it a perfect tool for web content migration and documentation management.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*