Skip to content

Instantly share code, notes, and snippets.

@RDCH106
Created April 15, 2019 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RDCH106/bac494c14254e68d457a7185a09d9cac to your computer and use it in GitHub Desktop.
Save RDCH106/bac494c14254e68d457a7185a09d9cac to your computer and use it in GitHub Desktop.
Script to convert Markdown (.md) to ReStructuredText (.rst)
# -*- coding: utf-8 -*-
try:
import pypandoc
except ImportError:
print("pypandoc not available!!")
exit("First install pypandoc. Ex: \"pip install pypandoc\"")
long_description = pypandoc.convert('README.md', 'rst', outputfile='README.md2rst')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment