Skip to main content

Mermaid to HTML Slides Generator with PySide6 GUI

Project description

HeiBan - Mermaid转HTML幻灯片生成器

English | 中文

Python License PyPI

一款基于PySide6的桌面应用,用于将Markdown文档(含Mermaid图表)转换为reveal.js格式的HTML幻灯片。

特性

  • PySide6 GUI - 现代化图形界面
  • Markdown支持 - 使用---分隔幻灯片
  • Mermaid图表 - 自动识别并渲染流程图、时序图等
  • 代码高亮 - 使用highlight.js
  • 实时预览 - 浏览器预览功能
  • 命令行支持 - 批量转换

安装

从源码安装

pip install -e .

使用预构建包

pip install heiban

使用方法

GUI模式

heiban --gui
# 或直接运行
heiban

命令行模式

# 基本用法
heiban input.md -o output.html

# 指定尺寸和主题
heiban input.md --width 1920 --height 1080 --theme dark

# 查看帮助
heiban --help

Markdown格式

# 第1章 标题

## 第一节

- 列表项1
- 列表项2

int main() { return 0; }


---

## 第二节

```mermaid
flowchart LR
    A --> B

## 目录结构

heiban/ ├── init.py # 包初始化 ├── main.py # 模块入口 ├── cli.py # 命令行接口 ├── converter.py # 转换器核心 ├── gui.py # GUI界面 └── tests/ # 测试 └── test_converter.py


## 开发

```bash
# 安装开发依赖
pip install -e ".[dev]"

# 运行测试
pytest

# 代码格式化
ruff check .
ruff format .

上传到PyPI

# Linux/macOS
./upload_pypi.sh

# Windows
upload_pypi.bat

依赖

  • PySide6 >= 6.5.0

许可证

MIT License

贡献

欢迎提交Issue和Pull Request!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heiban-0.1.4.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heiban-0.1.4-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file heiban-0.1.4.tar.gz.

File metadata

  • Download URL: heiban-0.1.4.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for heiban-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d0508b62d467a84c0e0fa3b550c6c849ee0199185879cdd254533221e39bb067
MD5 46f40214b687f0888c05de5e2e419b77
BLAKE2b-256 4f29f0f691abe7b0caa314850f7a7d157b4b7b11fcfddcfb332b68bf8ab9ceff

See more details on using hashes here.

File details

Details for the file heiban-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: heiban-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for heiban-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf326c00a29ed5e1c0b5ef9d9f7124857b65420bbd96f45beccc188bddc1f42
MD5 6d91b3c3cbdc992cd8dff8ae7faf2007
BLAKE2b-256 219da845971fb1eea0400902b11ecb211728b51e56a778d58a74aca2b81a4c33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page