Created
October 26, 2017 20:22
-
-
Save hjacobs/9ac697bc71b8c7705c2b2442bd5a09c3 to your computer and use it in GitHub Desktop.
Convert bash script to syntax highlighted HTML
This file contains hidden or 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 python3 | |
import sys | |
from pygments import highlight | |
from pygments.lexers import BashLexer | |
from pygments.formatters import HtmlFormatter | |
print(highlight(sys.stdin.read(), BashLexer(), HtmlFormatter(full=True))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment