一个将 Markdown 文件转换为适合电子邮件的 HTML 的工具,并支持自定义 CSS
Project description
mailify-md
简介
轻松将md文件转化为邮箱环境渲染后的html文件
安装
# 安装包
pip install mailify-md
# 安装浏览器依赖:
playwright install --with-deps
快速开始
# 用法一: 在原目录下生成同名 .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设置)
- 示例:
作为库使用
你也可以在 Python 代码中直接调用 mailify_md: from mailify_md import mailify_md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mailify_md-0.1.3.tar.gz.
File metadata
- Download URL: mailify_md-0.1.3.tar.gz
- Upload date:
- Size: 359.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4790ba9a23ebf1c7e2a84bafbdf303e94e70ca8d734ffdf1878dde03d2ca3017
|
|
| MD5 |
da26866ceae4dcb1d79ec0945af10f65
|
|
| BLAKE2b-256 |
cc257223fc5ff9e42d5ba2dfeb52295eefeade43b86387c394771426ddfa9acc
|
Provenance
The following attestation bundles were made for mailify_md-0.1.3.tar.gz:
Publisher:
pypi-publish.yml on 2bitbit/mailify-md
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mailify_md-0.1.3.tar.gz -
Subject digest:
4790ba9a23ebf1c7e2a84bafbdf303e94e70ca8d734ffdf1878dde03d2ca3017 - Sigstore transparency entry: 272483769
- Sigstore integration time:
-
Permalink:
2bitbit/mailify-md@66b947e6d87741f22b53182dd0226f177ced066b -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/2bitbit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@66b947e6d87741f22b53182dd0226f177ced066b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mailify_md-0.1.3-py3-none-any.whl.
File metadata
- Download URL: mailify_md-0.1.3-py3-none-any.whl
- Upload date:
- Size: 358.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367e1cf736fd6f01abb208f867cf81603308d6f824bf7454779a1ed6c77c4a2c
|
|
| MD5 |
6c2b017ea95c97bf7162babc607527bb
|
|
| BLAKE2b-256 |
58064e9d64074deac9907bdb7a5a08f23a77c0722e4d04aa1c03d4d87befe610
|
Provenance
The following attestation bundles were made for mailify_md-0.1.3-py3-none-any.whl:
Publisher:
pypi-publish.yml on 2bitbit/mailify-md
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mailify_md-0.1.3-py3-none-any.whl -
Subject digest:
367e1cf736fd6f01abb208f867cf81603308d6f824bf7454779a1ed6c77c4a2c - Sigstore transparency entry: 272483770
- Sigstore integration time:
-
Permalink:
2bitbit/mailify-md@66b947e6d87741f22b53182dd0226f177ced066b -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/2bitbit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@66b947e6d87741f22b53182dd0226f177ced066b -
Trigger Event:
push
-
Statement type: