Created
May 5, 2018 04:00
-
-
Save nathanalderson/8f069b0780f0fddc302119315d994a71 to your computer and use it in GitHub Desktop.
Tansform clipboard contents from markdown to HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
xclip -selection clipboard -o | pandoc --from markdown --to html | xclip -selection clipboard -target text/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in an executable file somewhere on your path and set a keyboard shortcut to call it. Then you can copy some markdown, hit your key combo, and paste the text into many applications as richly formatted text. Useful, for example, to compose text in markdown in your favorite text editor and then paste it as formatted text into an email client or word processor.
Depends on
xclip
andpandoc
, both readily available on most Linux distros via the standard repositories.