-
-
Save deepak/9655828 to your computer and use it in GitHub Desktop.
script to create RTF for code snippets to paste in keynote presentations using pygments
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
#!/bin/bash | |
# /usr/local/bin/pygmentize -f rtf -O "style=friendly,fontface=Courier Bold" "$1" | pbcopy | |
# /usr/local/bin/pygmentize -l ruby -f rtf -P style=presentation -P fontface="Source Code Pro" "$1" | pbcopy | |
/usr/local/bin/pygmentize -l ruby -f rtf -O "style=friendly,fontface=Source Code Pro" "$1" | | |
# Set the font size to 36pt (that's the \fs72 - RTF font sizes work in doubles) | |
sed "s/\\\\f0/\\\\f0\\\\fs72/g" | | |
# And copy. Enjoy! | |
pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks to
https://gist.github.com/cormacrelf/2282280
http://emptysqua.re/blog/syntax-highlighting-with-pycharm-pygments-and-keynote/
https://github.com/kytrinyx/talkode