Skip to main content

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

Project description

mailify-md

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

安装

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

快速开始

# 将 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设置)

作为库使用

你也可以在 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.0.tar.gz (359.2 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.0-py3-none-any.whl (358.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mailify_md-0.1.0.tar.gz
  • Upload date:
  • Size: 359.2 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.0.tar.gz
Algorithm Hash digest
SHA256 a0a6ffc12de9fbedfe88c1b10a7cee0614c83aea512e04ccb3ade7339fc65e35
MD5 4aa837977cb302e41d836805a9af476b
BLAKE2b-256 c659c1e16e43d325f94f67b3148adecf77cc1723d876cb4aba9d5b22d309797a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mailify_md-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: mailify_md-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 358.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 517690cd35e142777babafaeadd0f8212bc867131849f658521ab94daae12e7d
MD5 258fc819cd7232be4eac4de3d4b7289c
BLAKE2b-256 7d621dfc57d9274758b3f6fc91d604581dfce1abb721762cb45948211361a61c

See more details on using hashes here.

Provenance

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