swinton / pdfify

Generates Octocat-friendly PDFs from Markdown
MIT License
3 stars 1 forks source link

Read from stdin when filename not supplied as $1 #5

Closed swinton closed 7 years ago

swinton commented 7 years ago

This PR causes pdfify to read from STDIN when a filename is not provided at the command-line, e.g. via:

pdfify

or, via:

pdfify --student

This allows output from another program to be piped into pdfify, e.g. mustache:

mustache data.yml template.mustache | pdfify

In this case, the PDF will be saved as pdfify.pdf in the present working directory.