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.3.tar.gz (359.4 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.3-py3-none-any.whl (358.3 kB view details)

Uploaded Python 3

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

Hashes for mailify_md-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4790ba9a23ebf1c7e2a84bafbdf303e94e70ca8d734ffdf1878dde03d2ca3017
MD5 da26866ceae4dcb1d79ec0945af10f65
BLAKE2b-256 cc257223fc5ff9e42d5ba2dfeb52295eefeade43b86387c394771426ddfa9acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailify_md-0.1.3.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.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

Hashes for mailify_md-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 367e1cf736fd6f01abb208f867cf81603308d6f824bf7454779a1ed6c77c4a2c
MD5 6c2b017ea95c97bf7162babc607527bb
BLAKE2b-256 58064e9d64074deac9907bdb7a5a08f23a77c0722e4d04aa1c03d4d87befe610

See more details on using hashes here.

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

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