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 # The full version, including alpha/beta/rc tags.
28 # List of patterns, relative to source directory, that match files and
29 # directories to ignore when looking for source files.
30 exclude_patterns = ['_build']
32 if os.environ.get('WITH_EMACS') == '1':
33 # Hacky reimplementation of include to workaround limitations of
35 lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source tree
36 rsti_dir = os.environ.get('RSTI_DIR')
37 # the other files are from the build tree
38 for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti'):
39 lines.extend(open(rsti_dir+'/'+file))
40 rst_epilog = ''.join(lines)
43 # If we don't have emacs (or the user configured --without-emacs),
44 # don't build the notmuch-emacs docs, as they need emacs to generate
45 # the docstring include files
46 exclude_patterns.append('notmuch-emacs.rst')
48 # The name of the Pygments (syntax highlighting) style to use.
49 pygments_style = 'sphinx'
51 # -- Options for HTML output ----------------------------------------------
53 # The theme to use for HTML and HTML Help pages. See the documentation for
54 # a list of builtin themes.
55 html_theme = 'default'
58 # Add any paths that contain custom static files (such as style sheets) here,
59 # relative to this directory. They are copied after the builtin static files,
60 # so a file named "default.css" will overwrite the builtin "default.css".
63 # Output file base name for HTML help builder.
64 htmlhelp_basename = 'notmuchdoc'
66 # Disable SmartyPants, as it mangles command lines.
67 # Despite the name, this actually affects manual pages as well.
68 html_use_smartypants = False
70 # -- Options for manual page output ---------------------------------------
72 # One entry per manual page. List of tuples
73 # (source start file, name, description, authors, manual section).
75 notmuch_authors = u'Carl Worth and many others'
78 ('man1/notmuch', 'notmuch',
79 u'thread-based email index, search, and tagging',
80 [notmuch_authors], 1),
82 ('man1/notmuch-address', 'notmuch-address',
83 u'output addresses from matching messages',
84 [notmuch_authors], 1),
86 ('man1/notmuch-compact', 'notmuch-compact',
87 u'compact the notmuch database',
88 [notmuch_authors], 1),
90 ('man1/notmuch-config', 'notmuch-config',
91 u'access notmuch configuration file',
92 [notmuch_authors], 1),
94 ('man1/notmuch-count', 'notmuch-count',
95 u'count messages matching the given search terms',
96 [notmuch_authors], 1),
98 ('man1/notmuch-dump', 'notmuch-dump',
99 u'creates a plain-text dump of the tags of each message',
100 [notmuch_authors], 1),
102 ('man1/notmuch-emacs-mua', 'notmuch-emacs-mua',
103 u'send mail with notmuch and emacs',
104 [notmuch_authors], 1),
106 ('man5/notmuch-hooks', 'notmuch-hooks',
107 u'hooks for notmuch',
108 [notmuch_authors], 5),
110 ('man1/notmuch-insert', 'notmuch-insert',
111 u'add a message to the maildir and notmuch database',
112 [notmuch_authors], 1),
114 ('man1/notmuch-new', 'notmuch-new',
115 u'incorporate new mail into the notmuch database',
116 [notmuch_authors], 1),
118 ('man7/notmuch-properties', 'notmuch-properties',
119 u'notmuch message property conventions and documentation',
120 [notmuch_authors], 7),
122 ('man1/notmuch-reindex', 'notmuch-reindex',
123 u're-index matching messages',
124 [notmuch_authors], 1),
126 ('man1/notmuch-reply', 'notmuch-reply',
127 u'constructs a reply template for a set of messages',
128 [notmuch_authors], 1),
130 ('man1/notmuch-restore', 'notmuch-restore',
131 u'restores the tags from the given file (see notmuch dump)',
132 [notmuch_authors], 1),
134 ('man1/notmuch-search', 'notmuch-search',
135 u'search for messages matching the given search terms',
136 [notmuch_authors], 1),
138 ('man7/notmuch-search-terms', 'notmuch-search-terms',
139 u'syntax for notmuch queries',
140 [notmuch_authors], 7),
142 ('man1/notmuch-show', 'notmuch-show',
143 u'show messages matching the given search terms',
144 [notmuch_authors], 1),
146 ('man1/notmuch-tag', 'notmuch-tag',
147 u'add/remove tags for all messages matching the search terms',
148 [notmuch_authors], 1),
151 # If true, show URL addresses after external links.
152 #man_show_urls = False
154 # -- Options for Texinfo output -------------------------------------------
156 # Grouping the document tree into Texinfo files. List of tuples
157 # (source start file, target name, title, author,
158 # dir menu entry, description, category)
159 # If true, do not generate a @detailmenu in the "Top" node's menu.
160 texinfo_no_detailmenu = True
162 texinfo_documents = [
163 ('notmuch-emacs', 'notmuch-emacs', u'notmuch-emacs documentation',
164 notmuch_authors, 'notmuch-emacs',
165 'emacs based front-end for notmuch', 'Miscellaneous'),
168 # generate texinfo list from man page list
169 texinfo_documents += [
171 x[0], # source start file
173 x[1] + u' documentation', # title
175 x[1], # dir menu entry
177 'Miscellaneous' # category
178 ) for x in man_pages]