Skip to content
/ mdconv Public

A CLI markdown converter written in Go, that does not depend on LaTeX.

License

Notifications You must be signed in to change notification settings

Palexer/mdconv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mdconv

About

Mdconv is a Markdown converter written in Go. The goal of this project is to create a Markdown to PDF converter, that doesn't need big dependencies like headless Chromium or LaTeX and is written in a compiled language, so that NodeJS is not necessary. It is able to create PDF and HTML files from Markdown without using LaTeX or any other big dependency. Instead, mdconv uses the goldmark Markdown processor and relies on wkhtmltopdf (go-wkhtmltopdf) to convert the HTML to PDF.

Installation

Download

  1. Install wkhtmltopdf for PDF conversions.
  2. Download mdconv from the releases section.

Compile from source

  1. Clone this repository to your local machine
  2. Install the dependencies: go, wkhtmltopdf
  3. Run sudo make install

Note: Run can also sudo make uninstall to remove the program

Usage

General Usage

Convert a Markdown document to HTML:

mdconv path/to/markdowndocument.md

Convert a Markdown document to PDF:

mdconv -o output.pdf path/to/markdowndocument.md

Note: The output file type is defined by the file extension of the output file specified with -o. Consequently you'll always have to use the -o flag to output to PDF

For all available options see mdconv -h

Features

  • HTML and PDF output
  • standard Markdown features like headings, images, lists, code blocks, embedded HTML, tables, etc.
  • custom CSS stylesheet for output files
  • configurable via command line flags

ToDo

  • write more tests and test pagesize and orientation
  • PDF emoji support
  • more options as flags with new converter lib
  • correct display of checkboxes

Contributing

Contributions of all kinds are very welcome.

License

MIT License

About

A CLI markdown converter written in Go, that does not depend on LaTeX.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published