added feedback
[docutils.git] / sandbox / py-rest-doc / convert.py
blob3654a1fca903492c1908a90c4e9f41564ce94375
1 # -*- coding: utf-8 -*-
2 """
3 Convert the Python documentation to Sphinx
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 :copyright: 2007 by Georg Brandl.
7 :license: Python license.
8 """
10 import sys
11 import os
13 from converter import convert_dir
15 if __name__ == '__main__':
16 try:
17 rootdir = sys.argv[1]
18 destdir = os.path.abspath(sys.argv[2])
19 except IndexError:
20 print "usage: convert.py docrootdir destdir"
21 sys.exit()
23 assert os.path.isdir(os.path.join(rootdir, 'texinputs'))
24 os.chdir(rootdir)
25 convert_dir(destdir, *sys.argv[3:])