4

I'm using Sphinx to document a Python module.

I have a module that has author and copyright defined.

__author__ = "John Doe <johndoe@example.com>"
__copyright__ = "Copyright 2015-2016 Dummy Corp All Rights Reserved."

I tried adding the :special-members: tag to the automodule directive.

.. automodule:: PyFabric
   :special-members: 

This documents the author, but copyright isn't picked up. Is there anyway to get Sphinx to recognize and add the copyright?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
BretD
  • 348
  • 3
  • 12

2 Answers2

2

In your conf.py, set copyright = "© 2042 The Ravenous Bugblatter Beast of Traal".

See sphinx-doc documentation.

At least for the html_theme = "sphinx_rtd_theme" that I use, this will add the copyright notice in the footer of every HTML page.

This does not add the copyright notice to latex (and PDF) generated documentation; there is a open feature request at the time of writing. I have asked how this might be done nevertheless, see How to add copyright notice to sphinx-generated latex documentation?.

gerrit
  • 24,025
  • 17
  • 97
  • 170
0

Sphinx doesn't use those, does it? https://pythonhosted.org/an_example_pypi_project/sphinx.html

moduleauthor:: John Doe <johndoe@example.com>

Anyway, sphinx doesn't have that as far as I've seen.

More python formating examples : What is the common header format of Python files?

Community
  • 1
  • 1
LawfulEvil
  • 2,267
  • 24
  • 46