summaryrefslogtreecommitdiff
path: root/sphinx/quickstart.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r--sphinx/quickstart.py50
1 files changed, 33 insertions, 17 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index 17e1d04d8..8f4e0ed52 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -54,6 +54,7 @@ DEFAULT_VALUE = {
'epub': False,
'ext_autodoc': False,
'ext_doctest': False,
+ 'ext_todo': False,
'makefile': True,
'batchfile': True,
}
@@ -106,8 +107,8 @@ extensions = [%(extensions)s]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['%(dot)stemplates']
-# The suffix of source filenames.
-source_suffix = '%(suffix)s'
+# The suffix(es) of source filenames.
+source_suffix = ['%(suffix)s']
# The encoding of source files.
#source_encoding = 'utf-8-sig'
@@ -118,6 +119,7 @@ master_doc = '%(master_str)s'
# General information about the project.
project = u'%(project_str)s'
copyright = u'%(copyright_str)s'
+author = u'%(author_str)s'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -169,12 +171,15 @@ pygments_style = 'sphinx'
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = %(ext_todo)s
+
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -288,7 +293,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
- ('%(master_str)s', '%(project_fn)s.tex', u'%(project_doc_texescaped_str)s',
+ (master_doc, '%(project_fn)s.tex', u'%(project_doc_texescaped_str)s',
u'%(author_texescaped_str)s', 'manual'),
]
@@ -318,8 +323,8 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('%(master_str)s', '%(project_manpage)s', u'%(project_doc_str)s',
- [u'%(author_str)s'], 1)
+ (master_doc, '%(project_manpage)s', u'%(project_doc_str)s',
+ [author], 1)
]
# If true, show URL addresses after external links.
@@ -332,8 +337,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('%(master_str)s', '%(project_fn)s', u'%(project_doc_str)s',
- u'%(author_str)s', '%(project_fn)s', 'One line description of project.',
+ (master_doc, '%(project_fn)s', u'%(project_doc_str)s',
+ author, '%(project_fn)s', 'One line description of project.',
'Miscellaneous'),
]
@@ -355,13 +360,13 @@ EPUB_CONFIG = u'''
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
-epub_title = u'%(project_str)s'
-epub_author = u'%(author_str)s'
-epub_publisher = u'%(author_str)s'
-epub_copyright = u'%(copyright_str)s'
+epub_title = project
+epub_author = author
+epub_publisher = author
+epub_copyright = copyright
# The basename for the epub file. It defaults to the project name.
-#epub_basename = u'%(project_str)s'
+#epub_basename = project
# The HTML theme for the epub output. Since the default themes are not optimized
# for small screen space, using the same theme for HTML and epub output is
@@ -425,7 +430,7 @@ epub_exclude_files = ['search.html']
INTERSPHINX_CONFIG = u'''
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'https://docs.python.org/': None}
'''
MASTER_FILE = u'''\
@@ -953,7 +958,7 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%:
+%%:
\t@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
'''
@@ -1348,16 +1353,23 @@ def generate(d, overwrite=True, silent=False):
masterfile = path.join(srcdir, d['master'] + d['suffix'])
write_file(masterfile, MASTER_FILE % d)
+ if d.get('make_mode') is True:
+ makefile_template = MAKEFILE_NEW
+ batchfile_template = BATCHFILE_NEW
+ else:
+ makefile_template = MAKEFILE
+ batchfile_template = BATCHFILE
+
if d['makefile'] is True:
d['rsrcdir'] = d['sep'] and 'source' or '.'
d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build'
# use binary mode, to avoid writing \r\n on Windows
- write_file(path.join(d['path'], 'Makefile'), MAKEFILE % d, u'\n')
+ write_file(path.join(d['path'], 'Makefile'), makefile_template % d, u'\n')
if d['batchfile'] is True:
d['rsrcdir'] = d['sep'] and 'source' or '.'
d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build'
- write_file(path.join(d['path'], 'make.bat'), BATCHFILE % d, u'\r\n')
+ write_file(path.join(d['path'], 'make.bat'), batchfile_template % d, u'\r\n')
if silent:
return
@@ -1459,6 +1471,10 @@ def main(argv=sys.argv):
group.add_option('--no-batchfile', action='store_true', dest='no_batchfile',
default=False,
help='not create batchfile')
+ group.add_option('-M', '--no-use-make-mode', action='store_false', dest='make_mode',
+ help='not use make-mode for Makefile/make.bat')
+ group.add_option('-m', '--use-make-mode', action='store_true', dest='make_mode',
+ help='use make-mode for Makefile/make.bat')
# parse options
try: