diff options
author | Ben McGinnes <[email protected]> | 2018-12-24 13:18:10 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-12-24 13:18:10 +0000 |
commit | ef9355c2fe8f81ccd73e0ed45ce33e925928f8e1 (patch) | |
tree | d2623568c999fd76ddac88d36c99c1f8dd40b582 /lang/python/doc/rst/conf.py | |
parent | python: docs (diff) | |
download | gpgme-ef9355c2fe8f81ccd73e0ed45ce33e925928f8e1.tar.gz gpgme-ef9355c2fe8f81ccd73e0ed45ce33e925928f8e1.zip |
python: docs processing
* Added some EPUB specific config options to the Sphinx config file
which might help reduce some of Sphinx's more stupid default errors
with EPUB validation.
* Added lang/python/post_installer.py script for automating the
generation of .texi and .rst "source" files from the real source
files written in Org mode. Includes recreating the Sphinx Makefile
which is excluded due to the m4 toolchain in parent directories, it
also handles the rewriting of the reST index file properly and
rewrites the .texi files so they don't impale themselves on Unicode.
Tested-by: Ben McGinnes <[email protected]>
Signed-off-by: Ben McGinnes <[email protected]>
Diffstat (limited to 'lang/python/doc/rst/conf.py')
-rw-r--r-- | lang/python/doc/rst/conf.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lang/python/doc/rst/conf.py b/lang/python/doc/rst/conf.py index 73ecc37d..279669d0 100644 --- a/lang/python/doc/rst/conf.py +++ b/lang/python/doc/rst/conf.py @@ -15,6 +15,8 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) +import hashlib +import time # -- Project information ----------------------------------------------------- @@ -101,7 +103,7 @@ html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'GPGMEPythonBindingsdoc' +htmlhelp_basename = 'GPGMEPythonBindings' # -- Options for LaTeX output ------------------------------------------------ @@ -114,6 +116,7 @@ latex_elements = { # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', + 'pointsize': '12pt' # Additional stuff for the LaTeX preamble. # @@ -128,7 +131,8 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'GPGMEPythonBindings.tex', 'GPGME Python Bindings Documentation', + (master_doc, 'GPGMEPythonBindings.tex', + 'GPGME Python Bindings Documentation', 'The GnuPG Hackers', 'manual'), ] @@ -150,8 +154,8 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'GPGMEPythonBindings', 'GPGME Python Bindings Documentation', - author, 'GPGMEPythonBindings', 'One line description of project.', - 'Miscellaneous'), + author, 'GPGMEPythonBindings', + 'Python Bindings to the GNU Privacy Guard API.', 'Miscellaneous'), ] @@ -160,14 +164,21 @@ texinfo_documents = [ # Bibliographic Dublin Core info. epub_title = project -# The unique identifier of the text. This can be a ISBN number +# The unique identifier of the text. This can be an ISBN number # or the project homepage. # # epub_identifier = '' +epub_identifier = 'org.gnupg.gpgme.python' # A unique identification for the text. # # epub_uid = '' +stt = str(time.time()) +epub_seed = "{0} {1}".format(epub_identifier, tt) +# SHA1 would be more than fine for this, but since the dimmest always panic +# about any use of SHA1 with GnuPG, we'll use SHA256. +epub_hash = hashlib.sha256(epub_seed).hexdigest() +epub_uid = 'sha256:{0}'.format(epub_hash) # A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html']
\ No newline at end of file +epub_exclude_files = ['search.html'] |