diff options
| author | Chris McDonough <chrism@plope.com> | 2013-02-09 19:15:07 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2013-02-09 19:15:07 -0500 |
| commit | acf115391088770ae434d222179fd22a693bfe46 (patch) | |
| tree | 442d33920cd6d20ccb7ce3cff3344fd851448d0d /docs/conf.py | |
| parent | 6313e0dd97e22b8c897293cd8d5f2f145637f49f (diff) | |
| parent | 7fe736bf57696aa62c8b0d84e62ad486d0f88f40 (diff) | |
| download | pyramid-acf115391088770ae434d222179fd22a693bfe46.tar.gz pyramid-acf115391088770ae434d222179fd22a693bfe46.tar.bz2 pyramid-acf115391088770ae434d222179fd22a693bfe46.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/conf.py')
| -rw-r--r-- | docs/conf.py | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/docs/conf.py b/docs/conf.py index 5e17de18a..6eb76af9d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,6 +26,7 @@ from sphinx.writers.latex import LaTeXTranslator from docutils import nodes from docutils import utils + def raw(*arg): raise nodes.SkipNode TextTranslator.visit_raw = raw @@ -75,13 +76,14 @@ master_doc = 'index' # General substitutions. project = 'The Pyramid Web Application Development Framework' -copyright = '%s, Agendaless Consulting' % datetime.datetime.now().year +thisyear = datetime.datetime.now().year +copyright = '2008-%s, Agendaless Consulting' % thisyear # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. -version = '1.4a4' +version = '1.4' # The full version, including alpha/beta/rc tags. release = version @@ -97,7 +99,7 @@ today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ['_themes/README.rst',] +exclude_patterns = ['_themes/README.rst', ] # List of directories, relative to source directories, that shouldn't be searched # for source files. @@ -129,14 +131,12 @@ if book: # ----------------------- # Add and use Pylons theme -if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers +if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers from subprocess import call, Popen, PIPE p = Popen('which git', shell=True, stdout=PIPE) - cwd = os.getcwd() _themes = os.path.join(cwd, '_themes') - p = Popen('which git', shell=True, stdout=PIPE) git = p.stdout.read().strip() if not os.listdir(_themes): call([git, 'submodule', '--init']) @@ -235,6 +235,8 @@ latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). latex_font_size = '10pt' +latex_additional_files = ['_static/latex-note.png', '_static/latex-warning.png'] + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ @@ -371,10 +373,10 @@ _PREAMBLE = r""" latex_elements = { 'preamble': _PREAMBLE, - 'wrapperclass':'book', - 'date':'', - 'releasename':'Version', - 'title':r'The Pyramid Web Application \newline Development Framework', + 'wrapperclass': 'book', + 'date': '', + 'releasename': 'Version', + 'title': r'The Pyramid Web Application \newline Development Framework', # 'pointsize':'12pt', # uncomment for 12pt version } @@ -390,6 +392,7 @@ latex_elements = { #paragraph 4 #subparagraph 5 + def frontmatter(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [nodes.raw( @@ -407,6 +410,7 @@ def frontmatter(name, arguments, options, content, lineno, """, format='latex')] + def mainmatter(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [nodes.raw( @@ -426,11 +430,13 @@ def mainmatter(name, arguments, options, content, lineno, """, format='latex')] + def backmatter(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): return [nodes.raw('', '\\backmatter\n\\setcounter{secnumdepth}{-1}\n', format='latex')] + def app_role(role, rawtext, text, lineno, inliner, options={}, content=[]): """custom role for :app: marker, does nothing in particular except allow :app:`Pyramid` to work (for later search and replace).""" @@ -448,6 +454,7 @@ def setup(app): app.add_directive('backmatter', backmatter, 1, (0, 0, 0)) app.connect('autodoc-process-signature', resig) + def resig(app, what, name, obj, options, signature, return_annotation): """ Allow for preservation of ``@action_method`` decorated methods in configurator """ @@ -474,10 +481,11 @@ def resig(app, what, name, obj, options, signature, return_annotation): # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = 'The Pyramid Web Application Development Framework, Version 1.4' +epub_title = 'The Pyramid Web Application Development Framework, Version %s' \ + % release epub_author = 'Chris McDonough' epub_publisher = 'Agendaless Consulting' -epub_copyright = '2008-2011' +epub_copyright = '2008-%d' % thisyear # The language of the text. It defaults to the language option # or en if the language is not set. @@ -491,8 +499,8 @@ epub_scheme = 'ISBN' epub_identifier = '0615445675' # A unique identification for the text. -epub_uid = 'The Pyramid Web Application Development Framework, Version 1.4' - +epub_uid = 'The Pyramid Web Application Development Framework, Version %s' \ + % release # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. #epub_pre_files = [] @@ -504,7 +512,7 @@ epub_uid = 'The Pyramid Web Application Development Framework, Version 1.4' # A list of files that should not be packed into the epub file. epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js', '_static/jquery.js', '_static/searchtools.js', '_static/underscore.js', - '_static/basic.css', 'search.html'] + '_static/basic.css', 'search.html', '_static/websupport.js'] # The depth of the table of contents in toc.ncx. |
