summaryrefslogtreecommitdiff
path: root/sphinx/quickstart.py
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-07-18 22:55:36 +0000
committergeorg.brandl <devnull@localhost>2008-07-18 22:55:36 +0000
commit31075afed9f8fa008a3ed2a9ff0d7ed024ff8564 (patch)
tree1dc24530c825039c6e2c0cfe649847b274241a56 /sphinx/quickstart.py
parent7ab43cdfa391f4d647228378a8b2a252529697d2 (diff)
downloadsphinx-31075afed9f8fa008a3ed2a9ff0d7ed024ff8564.tar.gz
Merged revisions 64808,65013,65076,65100-65101,65119,65121-65123 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x ........ r64808 | georg.brandl | 2008-07-08 21:39:33 +0200 (Tue, 08 Jul 2008) | 2 lines Allow relocation of source and doctree dir. ........ r65013 | georg.brandl | 2008-07-16 15:25:30 +0200 (Wed, 16 Jul 2008) | 2 lines Remove curious quote. ........ r65076 | georg.brandl | 2008-07-17 22:43:01 +0200 (Thu, 17 Jul 2008) | 2 lines Add a test for sphinx.quickstart. ........ r65100 | georg.brandl | 2008-07-18 14:41:54 +0200 (Fri, 18 Jul 2008) | 2 lines Fix phony targets. ........ r65101 | georg.brandl | 2008-07-18 14:55:03 +0200 (Fri, 18 Jul 2008) | 2 lines Fix problems in "make check". ........ r65119 | georg.brandl | 2008-07-18 23:06:42 +0200 (Fri, 18 Jul 2008) | 2 lines Emit a more precise error message in autodoc. ........ r65121 | georg.brandl | 2008-07-18 23:41:35 +0200 (Fri, 18 Jul 2008) | 2 lines Warn if a toctree-included document doesn't contain a title. ........ r65122 | georg.brandl | 2008-07-18 23:51:28 +0200 (Fri, 18 Jul 2008) | 2 lines Don't use \samp{} for code with whitespaces, only for :samp:`code`. ........ r65123 | georg.brandl | 2008-07-19 00:49:46 +0200 (Sat, 19 Jul 2008) | 2 lines Put inheritance info always on its own line. ........
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r--sphinx/quickstart.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index f452e212..d5781a68 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -16,6 +16,8 @@ from sphinx.util import make_filename
from sphinx.util.console import purple, bold, red, nocolor
+PROMPT_PREFIX = '> '
+
QUICKSTART_CONF = '''\
# -*- coding: utf-8 -*-
#
@@ -176,7 +178,8 @@ htmlhelp_basename = '%(project_fn)sdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('%(master)s', '%(project_fn)s.tex', '%(project)s Documentation', '%(author)s', 'manual'),
+ ('%(master)s', '%(project_fn)s.tex', '%(project)s Documentation',
+ '%(author)s', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -231,7 +234,8 @@ PAPER =
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) %(rsrcdir)s
+ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees $(PAPEROPT_$(PAPER)) \
+$(SPHINXOPTS) %(rsrcdir)s
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
@@ -333,9 +337,9 @@ def ok(x):
def do_prompt(d, key, text, default=None, validator=nonempty):
while True:
if default:
- prompt = purple('> %s [%s]: ' % (text, default))
+ prompt = purple(PROMPT_PREFIX + '%s [%s]: ' % (text, default))
else:
- prompt = purple('> ' + text + ': ')
+ prompt = purple(PROMPT_PREFIX + text + ': ')
x = raw_input(prompt)
if default and not x:
x = default
@@ -364,7 +368,7 @@ Enter the root path for documentation.'''
You have two options for placing the build directory for Sphinx output.
Either, you use a directory ".build" within the root path, or you separate
"source" and "build" directories within the root path.'''
- do_prompt(d, 'sep', 'Separate source and build directories (y/n)', 'n',
+ do_prompt(d, 'sep', 'Separate source and build directories (y/N)', 'n',
boolean)
print '''
Inside the root directory, two more directories will be created; ".templates"
@@ -399,14 +403,14 @@ document is a custom template, you can also set this to another filename.'''
print '''
Please indicate if you want to use one of the following Sphinx extensions:'''
do_prompt(d, 'ext_autodoc', 'autodoc: automatically insert docstrings '
- 'from modules (y/n)', 'n', boolean)
+ 'from modules (y/N)', 'n', boolean)
do_prompt(d, 'ext_doctest', 'doctest: automatically test code snippets '
- 'in doctest blocks (y/n)', 'n', boolean)
+ 'in doctest blocks (y/N)', 'n', boolean)
print '''
If you are under Unix, a Makefile can be generated for you so that you
only have to run e.g. `make html' instead of invoking sphinx-build
directly.'''
- do_prompt(d, 'makefile', 'Create Makefile? (y/n)',
+ do_prompt(d, 'makefile', 'Create Makefile? (Y/n)',
os.name == 'posix' and 'y' or 'n', boolean)
d['project_fn'] = make_filename(d['project'])