2 # -*- coding: utf-8 -*-
7 # The suffix of source filenames.
10 # The master toctree document.
13 # General information about the project.
15 copyright = u'2009-2020, Carl Worth and many others'
17 location = os.path.dirname(__file__)
19 for pathdir in ['.', '..']:
20 version_file = os.path.join(location,pathdir,'version')
21 if os.path.exists(version_file):
22 with open(version_file,'r') as infile:
23 version=infile.read().replace('\n','')
25 # read generated config
26 for pathdir in ['.', '..']:
27 conf_file = os.path.join(location,pathdir,'sphinx.config')
28 if os.path.exists(conf_file):
29 with open(conf_file,'r') as infile:
30 exec(''.join(infile.readlines()))
32 # The full version, including alpha/beta/rc tags.
35 # List of patterns, relative to source directory, that match files and
36 # directories to ignore when looking for source files.
37 exclude_patterns = ['_build']
39 if tags.has('WITH_EMACS'):
40 # Hacky reimplementation of include to workaround limitations of
42 lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source tree
43 for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti'):
44 lines.extend(open(rsti_dir+'/'+file))
45 rst_epilog = ''.join(lines)
48 # If we don't have emacs (or the user configured --without-emacs),
49 # don't build the notmuch-emacs docs, as they need emacs to generate
50 # the docstring include files
51 exclude_patterns.append('notmuch-emacs.rst')
53 # The name of the Pygments (syntax highlighting) style to use.
54 pygments_style = 'sphinx'
56 # -- Options for HTML output ----------------------------------------------
58 # The theme to use for HTML and HTML Help pages. See the documentation for
59 # a list of builtin themes.
60 html_theme = 'default'
63 # Add any paths that contain custom static files (such as style sheets) here,
64 # relative to this directory. They are copied after the builtin static files,
65 # so a file named "default.css" will overwrite the builtin "default.css".
68 # Output file base name for HTML help builder.
69 htmlhelp_basename = 'notmuchdoc'
71 # Disable SmartyPants, as it mangles command lines.
72 # Despite the name, this actually affects manual pages as well.
73 html_use_smartypants = False
75 # -- Options for manual page output ---------------------------------------
77 # One entry per manual page. List of tuples
78 # (source start file, name, description, authors, manual section).
80 notmuch_authors = u'Carl Worth and many others'
83 ('man1/notmuch', 'notmuch',
84 u'thread-based email index, search, and tagging',
85 [notmuch_authors], 1),
87 ('man1/notmuch-address', 'notmuch-address',
88 u'output addresses from matching messages',
89 [notmuch_authors], 1),
91 ('man1/notmuch-compact', 'notmuch-compact',
92 u'compact the notmuch database',
93 [notmuch_authors], 1),
95 ('man1/notmuch-config', 'notmuch-config',
96 u'access notmuch configuration file',
97 [notmuch_authors], 1),
99 ('man1/notmuch-count', 'notmuch-count',
100 u'count messages matching the given search terms',
101 [notmuch_authors], 1),
103 ('man1/notmuch-dump', 'notmuch-dump',
104 u'creates a plain-text dump of the tags of each message',
105 [notmuch_authors], 1),
107 ('man1/notmuch-emacs-mua', 'notmuch-emacs-mua',
108 u'send mail with notmuch and emacs',
109 [notmuch_authors], 1),
111 ('man5/notmuch-hooks', 'notmuch-hooks',
112 u'hooks for notmuch',
113 [notmuch_authors], 5),
115 ('man1/notmuch-insert', 'notmuch-insert',
116 u'add a message to the maildir and notmuch database',
117 [notmuch_authors], 1),
119 ('man1/notmuch-new', 'notmuch-new',
120 u'incorporate new mail into the notmuch database',
121 [notmuch_authors], 1),
123 ('man7/notmuch-properties', 'notmuch-properties',
124 u'notmuch message property conventions and documentation',
125 [notmuch_authors], 7),
127 ('man1/notmuch-reindex', 'notmuch-reindex',
128 u're-index matching messages',
129 [notmuch_authors], 1),
131 ('man1/notmuch-reply', 'notmuch-reply',
132 u'constructs a reply template for a set of messages',
133 [notmuch_authors], 1),
135 ('man1/notmuch-restore', 'notmuch-restore',
136 u'restores the tags from the given file (see notmuch dump)',
137 [notmuch_authors], 1),
139 ('man1/notmuch-search', 'notmuch-search',
140 u'search for messages matching the given search terms',
141 [notmuch_authors], 1),
143 ('man7/notmuch-search-terms', 'notmuch-search-terms',
144 u'syntax for notmuch queries',
145 [notmuch_authors], 7),
147 ('man1/notmuch-show', 'notmuch-show',
148 u'show messages matching the given search terms',
149 [notmuch_authors], 1),
151 ('man1/notmuch-tag', 'notmuch-tag',
152 u'add/remove tags for all messages matching the search terms',
153 [notmuch_authors], 1),
156 # If true, show URL addresses after external links.
157 #man_show_urls = False
159 # -- Options for Texinfo output -------------------------------------------
161 # Grouping the document tree into Texinfo files. List of tuples
162 # (source start file, target name, title, author,
163 # dir menu entry, description, category)
164 # If true, do not generate a @detailmenu in the "Top" node's menu.
165 texinfo_no_detailmenu = True
167 texinfo_documents = [
168 ('notmuch-emacs', 'notmuch-emacs', u'notmuch-emacs documentation',
169 notmuch_authors, 'notmuch-emacs',
170 'emacs based front-end for notmuch', 'Miscellaneous'),
173 # generate texinfo list from man page list
174 texinfo_documents += [
176 x[0], # source start file
178 x[1] + u' documentation', # title
180 x[1], # dir menu entry
182 'Miscellaneous' # category
183 ) for x in man_pages]