GithubHelp home page GithubHelp logo

palexer / mdconv Goto Github PK

View Code? Open in Web Editor NEW
43.0 1.0 2.0 75 KB

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

License: MIT License

Makefile 19.66% Go 61.08% CSS 19.25%
markdown markdown-to-html markdown-to-pdf wkhtmltopdf

mdconv's Introduction

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

mdconv's People

Contributors

palexer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

isgasho kj-sh604

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.