Skip to content

Instantly share code, notes, and snippets.

@nikto-b
Created June 16, 2020 13:52
Show Gist options
  • Save nikto-b/0be11d0d001c11b5e89bc03501b66ace to your computer and use it in GitHub Desktop.
Save nikto-b/0be11d0d001c11b5e89bc03501b66ace to your computer and use it in GitHub Desktop.
from rich.console import Console
from rich.markdown import Markdown
if __name__ == "__main__":
if sys.argv[1:]:
console = Console()
with open(sys.argv[1:][0]) as readme:
markdown = Markdown(readme.read())
console.print(markdown)
else:
print("Usage:\n\tmdprint README.md")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment