Skip to content

liunnn1994/auto-md2pdf

Repository files navigation

Only support *inux,windows user can use WSL to dev. 仅支持*inux系统,windows可以使用wsl进行开发。

auto-md2pdf

A markdown to online and pdf program. Support download and send email.
Markdown转在线和pdf的网站,支持下载和邮件发送。

截图1

config.json

  • title - Website title, also output pdf file name. 网站标题同时也是pdf的文件名称,例如xxx的个人简历
  • subject - Email title. 邮件的标题。
  • text - Email content text. 邮件的正文。
  • html - Email content html format. 邮件的正文,html格式。
  • SMTP - Your smtp server. e.g. smtp.example.com. smtp地址。
  • port - Program port. 程序运行的端口。
  • SMTPPort - smtp port. smtp的端口。
  • username - Usually email address. 用户名,通常是邮箱地址。
  • password - Password. 密码。
  • font - font. 字体。
  • i18n - i18n
  • language - Language. 语言,和i18n中的对应。

You can use fc-list to search which font has been used on your os.

e.g. fc-list :lang=zh

DEV

  1. Create your own config.json.

  2. Run go mod vendor

  3. Use texlive-xetex to convert md to pdf. So you should installtexlive-xetexfirst.

    sudo apt install texlive-xetex
  4. Then you can use ./run.sh width dev mod.

    ./run.sh

Build

  1. Create your own config.json.

  2. Run go mod vendor

  3. And then:

    ./run.sh build

Program will build in build folder.

Use

  1. Download lastest release

  2. install texlive-xetex on your server.

    sudo apt install texlive-xetex
  3. Build config.json in program root folder and edit it.

  4. Run:

    ./main

Change assets/input.md and refresh browser. It can auto build input file without restart.