Skip to content

A CLI-Tool to convert Markdown documents into a PDF format.

Notifications You must be signed in to change notification settings

snts-collective/snts-mdpdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snts-mdpdf

A CLI-tool that converts Markdown documents into a PDF format.
Courtesy of the snts'collective.



Installation

NB: Assumes NodeJS is installed on your machine.

Install from source:

git clone https://github.com/snts-collective/snts-mdpdf
cd snts-mdpdf
npm run build
npm i -g

Usage:

snts-mdpdf <options>

Options

: Required
?: Optional
  • -s or --src: The source path of the Markdown file

  • -d or --dest?: The destination file of the PDF file. If a destination path isn't provided; the PDF will be saved in the same path as --src, with the file extension ".pdf" instead of ".md"

  • -f or --format?: The format of the PDF being generated. If none is provided, the default A4 will be used. The available options are:

    1. A3

    2. A4

    3. A5

    4. Legal

    5. Letter

    6. Tabloid

  • -l or --logoType?: The size and position of the snts'collective logo being prepended. If no argument is provided; the PDF generator will convert the document without any logo attached at all. The available options are:

    1. LargeCenter

    2. SmallCenter

    3. LargeLeft

    4. SmallLeft

    5. LargeRight

    6. SmallRight

    7. BottomLargeCenter

    8. BottomSmallCenter

    9. BottomLargeLeft

    10. BottomSmallLeft

    11. BottomLargeRight

    12. BottomSmallRight


Example:

snts-mdpdf -s ./doc.md -d ./doc.pdf -f A4

Running the snts-mdpdf command will convert the entered Markdown and generate a PDF document in the destination path with the snts'collective logo optionally prepended.



Author

👤 Sihle (snts'abode) Masebuku snts.abode@gmail.com


Show your support

Give a ⭐️ if this project helped you!


About

A CLI-Tool to convert Markdown documents into a PDF format.

Topics

Resources

Stars

Watchers

Forks