forked from appium/python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocgen.py
More file actions
17 lines (13 loc) · 463 Bytes
/
docgen.py
File metadata and controls
17 lines (13 loc) · 463 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# PyPi expects a reStructuredText (http://docutils.sourceforge.net/rst.html)
# document for its readme. This takes the Github one and makes the requisite
# file. Run when README.md is changed and those changes should be reflected
# on PyPi.
import pandoc
import os
pandoc.core.PANDOC_PATH = os.environ['PANDOC_HOME']
doc = pandoc.Document()
doc.markdown = open('README.md').read()
f = open('README.txt', 'w+')
f.write(doc.rst)
f.close()