Skip to content

Instantly share code, notes, and snippets.

@chergert
Created October 9, 2013 06:05
Show Gist options
  • Select an option

  • Save chergert/6896889 to your computer and use it in GitHub Desktop.

Select an option

Save chergert/6896889 to your computer and use it in GitHub Desktop.
a little helper program for working with markdown.
#!/usr/bin/env python
from markdown2 import markdown
import sys
if sys.argv[1:]:
for f in sys.argv[1:]:
print markdown(file(f).read())
else:
print markdown(sys.stdin.read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment