Allow giving no authors.

This commit is contained in:
Georg Brandl 2010-02-25 22:21:41 +01:00
parent 51e8de3446
commit 5c92da1c12
3 changed files with 10 additions and 3 deletions

View File

@ -935,7 +935,9 @@ These options influence manual page output.
well as the name of the manual page (in the NAME section).
* *description*: description of the manual page. This is used in the NAME
section.
* *authors*: A list of strings with authors, or a single string.
* *authors*: A list of strings with authors, or a single string. Can be
an empty string or list if you do not want to automatically generate
an AUTHORS section in the manual page.
* *section*: The manual page section. Used for the output file name as well
as in the manual page header.

View File

@ -58,7 +58,10 @@ class ManualPageBuilder(Builder):
for info in self.config.man_pages:
docname, name, description, authors, section = info
if isinstance(authors, basestring):
if authors:
authors = [authors]
else:
authors = []
targetname = '%s.%s' % (name, section)
self.info(darkgreen(targetname) + ' { ', nonl=True)

View File

@ -53,6 +53,8 @@ class ManualPageTranslator(BaseTranslator):
# docinfo set by man_pages config value
self._docinfo['title'] = self.document.settings.title
self._docinfo['subtitle'] = self.document.settings.subtitle
if self.document.settings.authors:
# don't set it if no author given
self._docinfo['author'] = self.document.settings.authors
self._docinfo['manual_section'] = self.document.settings.section