https://github.com/augustohp/shell-preview-markdown
Quickly preview your markdown with sensible defaults
https://github.com/augustohp/shell-preview-markdown
markdown posix-compliant shell
Last synced: 6 months ago
JSON representation
Quickly preview your markdown with sensible defaults
- Host: GitHub
- URL: https://github.com/augustohp/shell-preview-markdown
- Owner: augustohp
- License: mit
- Created: 2019-07-03T20:07:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-03T20:24:11.000Z (over 6 years ago)
- Last Synced: 2025-02-13T05:32:14.542Z (8 months ago)
- Topics: markdown, posix-compliant, shell
- Language: Shell
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Preview Markdown files from the Shell
How is your markdown file going to be rendered? This receives a file and opens
it in a browser for you.$ preview-markdown --from README.md
/tmp/markdown-preview_README.html
$ preview-markdown --output email.rtf --from email.md
email.rtfThe output of the program is always the file generated for preview. By default,
a browser is opened - if [Lynx][] is present we prefer it. HTML is preferred as
well, but any format supported by [Pandoc][] can be used as output - use file
extensions to denote them.Usage: preview-markdown [options]
preview-markdown --from README.md
preview-markdown --from letter.md --output letter.pdfWill generate an HTML preview of a markfown and open it inside a
browser (Lynx if existing).Options:
-f , --from The markdown file to generate a preview from.
Default: README.md
-o , --output The output file which will hold the preview.
-b, --browser Prefer a real browser (e.g: Firefox) instead of
Lynx (if it is available).
-j, --just-preview Avoids opening the browser, just generates the
preview file as HTML.
-v, --version Prints version of the program.
-h, --help This help message.
Environment variables:
PM_CSS_URL The CSS file to be used for the rendered mardown.
Default: GitHub markdown style
PM_MARKDOWN_EXTENSION File extension to remove from the generated
preview file.
Default: md
PM_DEFAULT_INPUT If no options are passed, which file should be
used as input?
Default: README.mdReport issues on https://github.com/augustohp/preview-markdown.
Contact me over augusto.hp [at] gmail [dot] com.## Installation
You can put the single file `preview-markdown` inside your *BIN* directories or
declare a new `PATH` to where it is. If you want this easy, you can also use the
line below:sh <(curl -sSL http://git.io/sinister) -u https://github.com/augustohp/shell-preview-markdown/raw/master/preview-markdown
When you execute this, [Pandoc][] may be installed in the first execution.
command - only supported on OSX.## LICENSE
MIT
[Lynx]: http://lynx.browser.org/ "Lynx text browser"
[Pandoc]: http://pandoc.org/ "A universal document converter"