Skip to main content

一个将 Markdown 文件转换为适合电子邮件的 HTML 的工具,并支持自定义 CSS

Project description

mailify-md

简介

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

light_demo dark_demo

安装

# 安装包
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

demo

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

mailify_md-0.1.5.tar.gz (359.3 kB view details)

Uploaded Source

Built Distribution

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

mailify_md-0.1.5-py3-none-any.whl (358.3 kB view details)

Uploaded Python 3

File details

Details for the file mailify_md-0.1.5.tar.gz.

File metadata

  • Download URL: mailify_md-0.1.5.tar.gz
  • Upload date:
  • Size: 359.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mailify_md-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2fc92c1d1d3ed5def765bc0757677feee522c7c6a257525587b714e702528b11
MD5 eaee23b0d2071d888a64f094cafb28fd
BLAKE2b-256 966a9327156c6d634b3de3532fc69b2ee49d587ec01913b83713d147eccbaae2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailify_md-0.1.5.tar.gz:

Publisher: pypi-publish.yml on 2bitbit/mailify-md

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mailify_md-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: mailify_md-0.1.5-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

Hashes for mailify_md-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a8d324fdc30cc3e83262476f4ce1d8cc31a8a7a253f677d0bd23c6455d5a571f
MD5 621bdac712a02e9e589c433cbcf1bdbf
BLAKE2b-256 aa6dfff87697770b000fa659f40665d57c81752a4a56c99813ee7a6d4c1f432e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailify_md-0.1.5-py3-none-any.whl:

Publisher: pypi-publish.yml on 2bitbit/mailify-md

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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