]> git.notmuchmail.org Git - notmuch/blob - doc/conf.py
bump date in documentation
[notmuch] / doc / conf.py
1
2 # -*- coding: utf-8 -*-
3
4 import sys
5 import os
6
7 # The suffix of source filenames.
8 source_suffix = '.rst'
9
10 # The master toctree document.
11 master_doc = 'index'
12
13 # General information about the project.
14 project = u'notmuch'
15 copyright = u'2009-2020, Carl Worth and many others'
16
17 location = os.path.dirname(__file__)
18
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','')
24
25 # The full version, including alpha/beta/rc tags.
26 release = version
27
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']
31
32 if os.environ.get('WITH_EMACS') == '1':
33     # Hacky reimplementation of include to workaround limitations of
34     # sphinx-doc
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)
41     del lines
42 else:
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')
47
48 # The name of the Pygments (syntax highlighting) style to use.
49 pygments_style = 'sphinx'
50
51 # -- Options for HTML output ----------------------------------------------
52
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'
56
57
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".
61 html_static_path = []
62
63 # Output file base name for HTML help builder.
64 htmlhelp_basename = 'notmuchdoc'
65
66 # Disable SmartyPants, as it mangles command lines.
67 # Despite the name, this actually affects manual pages as well.
68 html_use_smartypants = False
69
70 # -- Options for manual page output ---------------------------------------
71
72 # One entry per manual page. List of tuples
73 # (source start file, name, description, authors, manual section).
74
75 notmuch_authors = u'Carl Worth and many others'
76
77 man_pages = [
78     ('man1/notmuch', 'notmuch',
79      u'thread-based email index, search, and tagging',
80      [notmuch_authors], 1),
81
82     ('man1/notmuch-address', 'notmuch-address',
83      u'output addresses from matching messages',
84      [notmuch_authors], 1),
85
86     ('man1/notmuch-compact', 'notmuch-compact',
87      u'compact the notmuch database',
88      [notmuch_authors], 1),
89
90     ('man1/notmuch-config', 'notmuch-config',
91      u'access notmuch configuration file',
92      [notmuch_authors], 1),
93
94     ('man1/notmuch-count', 'notmuch-count',
95      u'count messages matching the given search terms',
96      [notmuch_authors], 1),
97
98     ('man1/notmuch-dump', 'notmuch-dump',
99      u'creates a plain-text dump of the tags of each message',
100      [notmuch_authors], 1),
101
102     ('man1/notmuch-emacs-mua', 'notmuch-emacs-mua',
103      u'send mail with notmuch and emacs',
104      [notmuch_authors], 1),
105
106     ('man5/notmuch-hooks', 'notmuch-hooks',
107      u'hooks for notmuch',
108      [notmuch_authors], 5),
109
110     ('man1/notmuch-insert', 'notmuch-insert',
111      u'add a message to the maildir and notmuch database',
112      [notmuch_authors], 1),
113
114     ('man1/notmuch-new', 'notmuch-new',
115      u'incorporate new mail into the notmuch database',
116      [notmuch_authors], 1),
117
118     ('man7/notmuch-properties', 'notmuch-properties',
119      u'notmuch message property conventions and documentation',
120      [notmuch_authors], 7),
121
122     ('man1/notmuch-reindex', 'notmuch-reindex',
123      u're-index matching messages',
124      [notmuch_authors], 1),
125
126     ('man1/notmuch-reply', 'notmuch-reply',
127      u'constructs a reply template for a set of messages',
128      [notmuch_authors], 1),
129
130     ('man1/notmuch-restore', 'notmuch-restore',
131      u'restores the tags from the given file (see notmuch dump)',
132      [notmuch_authors], 1),
133
134     ('man1/notmuch-search', 'notmuch-search',
135      u'search for messages matching the given search terms',
136      [notmuch_authors], 1),
137
138     ('man7/notmuch-search-terms', 'notmuch-search-terms',
139      u'syntax for notmuch queries',
140      [notmuch_authors], 7),
141
142     ('man1/notmuch-show', 'notmuch-show',
143      u'show messages matching the given search terms',
144      [notmuch_authors], 1),
145
146     ('man1/notmuch-tag', 'notmuch-tag',
147      u'add/remove tags for all messages matching the search terms',
148      [notmuch_authors], 1),
149 ]
150
151 # If true, show URL addresses after external links.
152 #man_show_urls = False
153
154 # -- Options for Texinfo output -------------------------------------------
155
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
161
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'),
166 ]
167
168 # generate texinfo list from man page list
169 texinfo_documents += [
170     (
171         x[0],                           # source start file
172         x[1],                           # target name
173         x[1] + u' documentation',       # title
174         x[3][0],                        # author
175         x[1],                           # dir menu entry
176         x[2],                           # description
177         'Miscellaneous'                 # category
178     ) for x in man_pages]