source: specdomain/src/specdomain/doc/starter.py @ 924

Last change on this file since 924 was 924, checked in by jemian, 11 years ago

add docstring

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 767 bytes
Line 
1#!/usr/bin/env python
2
3# $Id: starter.py 924 2012-06-13 17:42:55Z jemian $
4
5'''
6Builds Sphinx documentation
7(and provides a way to use the source-code debugger for the process)
8'''
9
10import os
11import sphinx
12import sys
13
14
15def force_rebuild_all():
16    '''
17    Delete the *doctrees* subdirectory.
18    '''
19    if os.path.exists('_build/doctrees'):
20        garbage_list = [
21            '_build/doctrees/environment.pickle',
22            '_build/doctrees/index.doctree',
23            '_build/doctrees/test_doc.doctree',
24        ]
25        for item in garbage_list:
26            if os.path.exists(item):
27                os.remove(item)
28        os.rmdir('_build/doctrees')
29
30
31if __name__ == '__main__':
32    force_rebuild_all()
33    args = [sys.argv[0]] + "-b html -d _build/doctrees . _build/html".split()
34    sphinx.main(args)
Note: See TracBrowser for help on using the repository browser.