md_reader

A simple Markdown reader with Mermaid diagram support.

Features

  • Render Markdown to HTML
  • Batch convert Markdown files
  • HTTP server for serving files
  • Mermaid diagram support with SVG export
  • Preview in browser
  • Export to PDF via browser print

Installation

cargo build --release

Usage

Render a single file

md_reader render document.md -o output.html

Batch convert

md_reader batch ./docs/ -o ./html/

Start HTTP server

md_reader server -p 8080 -d ./docs/

Preview in browser

md_reader preview document.md

Export to PDF

# Method 1: Using export command
md_reader export document.md -o output.html

# Method 2: Using render with -p flag
md_reader render document.md -p

Open the exported HTML file in browser, then use File > Print > Save as PDF.

Mermaid Support

md_reader supports rendering Mermaid diagrams in Markdown files.

Usage

Use mermaid code blocks:

```mermaid
graph TD
    A[Start] --> B[End]

### Supported Diagram Types

- Flowchart
- Sequence Diagram
- Class Diagram
- State Diagram
- Gantt Chart
- Pie Chart
- Entity Relationship Diagram

### SVG Export

Hover over any Mermaid diagram and click "Download SVG" to download the vector graphic.

## License

MIT
Description
No description provided
Readme 55 KiB
Languages
Rust 100%