| | |
| | | from docutils import nodes |
| | | from docutils import utils |
| | | |
| | | |
| | | def raw(*arg): |
| | | raise nodes.SkipNode |
| | | TextTranslator.visit_raw = raw |
| | |
| | | |
| | | # 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. |
| | |
| | | # ----------------------- |
| | | |
| | | # 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']) |
| | |
| | | |
| | | 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 |
| | | } |
| | | |
| | |
| | | #subsubsection 3 |
| | | #paragraph 4 |
| | | #subparagraph 5 |
| | | |
| | | |
| | | def frontmatter(name, arguments, options, content, lineno, |
| | | content_offset, block_text, state, state_machine): |
| | |
| | | \addtocontents{toc}{\protect\thispagestyle{empty}} |
| | | """, |
| | | format='latex')] |
| | | |
| | | |
| | | def mainmatter(name, arguments, options, content, lineno, |
| | | content_offset, block_text, state, state_machine): |
| | |
| | | """, |
| | | 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.add_directive('mainmatter', mainmatter, 1, (0, 0, 0)) |
| | | 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 |
| | |
| | | # -- 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' % datetime.datetime.now().year |
| | | |
| | | # The language of the text. It defaults to the language option |
| | | # or en if the language is not set. |
| | |
| | | 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 = [] |
| | |
| | | # 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. |