Metadata-Version: 2.4
Name: mailify-md
Version: 0.1.0
Summary: 一个将 Markdown 文件转换为适合电子邮件的 HTML 的工具，并支持自定义 CSS 
Author: 2bitbit
License: MIT License
        
        Copyright (c) 2025 2bitbit
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/2bitbit/mailify-md
Project-URL: Bug Tracker, https://github.com/2bitbit/mailify-md/issues
Keywords: markdown,email,html,converter,katex
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cairosvg
Requires-Dist: requests
Requires-Dist: premailer
Requires-Dist: Pygments
Requires-Dist: typer[all]
Requires-Dist: markdown-it-py[linkify,plugins]
Requires-Dist: beautifulsoup4
Requires-Dist: playwright
Dynamic: license-file

# mailify-md

轻松将md文件转化为邮箱环境渲染后的html文件

## 安装
```bash
# 安装包
pip install mailify-md
# 安装浏览器依赖:
playwright install --with-deps
```

## 快速开始
```bash
# 将 test.md 转换为 test.html
mailify-md test.md

# 指定输出目录, 默认在输入文件同目录下生成同名 .html 文件
mailify-md test.md ./output/

# 指定输出文件名
mailify-md test.md ./output/email.html
```

## 功能特色
- 结果美观:
  - 支持自定义 css 美化
  - 支持latex
  - 支持代码块(支持代码高亮)
  - 针对电脑和手机显示做了优化
- 简单易用:
  - 一行命令得到可直接在email使用的html文件
  - 内置一些精美样式
- 支持全面:
  - 自动处理远程和本地图片
  - 支持svg, gif, png等各种图片格式自动内嵌(无需修改你的md文件中的路径)

## 命令行用法

`mailify-md [OPTIONS] INPUT_PATH [OUTPUT_PATH]`

**参数:**
- `INPUT_PATH`:  必须项，你的 Markdown 文件路径。
- `OUTPUT_PATH`: 可选项，可以是输出目录或完整的文件路径。
  - 如果是目录，则输出文件名与输入文件相同。
  - 如果省略，则输出在输入文件旁边。

**可选项:**
- `-t, --theme TEXT`:  设置主题。可以是 `light`, `dark`, 或一个自定义 CSS 文件的路径。
  - 示例: `mailify-md test.md -t dark`
  - 示例: `mailify-md test.md -t ./my-style.css`
  - (tip：可参考[内置主题css](./src/mailify_md/data/dark_style_bak.css)设置)

## 作为库使用

你也可以在 Python 代码中直接调用 `mailify_md`: `from mailify_md import mailify_md`




<!-- 
<p align="center" style="font-size: 1em; font-style: italic; background: linear-gradient(270deg, #ff8a00, #e52e71, #4a90e2, #43e97b); color: transparent; background-clip: text; font-weight: bold; margin: 4em 0;">
听说你要心仪的老登写邮件？<br>
还不快用 <span style="text-shadow: 0 0 1px rgb(250, 171, 0), 0 0 0px rgb(254, 51, 0);">mailify-md</span> 炫染你的E妹儿，多种花样送给亲。
</p> -->

<p align="center">
    <img src="./rsc/demo.svg" alt="demo" style="max-height: 50px;">
</p>
