diff --git a/docs/Makefile b/docs/Makefile index f343705..5128596 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,8 +3,7 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = python3.6 -msphinx -SPHINXPROJ = fbchat +SPHINXBUILD = sphinx-build SOURCEDIR = . BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index f2763f1..1faae77 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,21 +1,12 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# fbchat documentation build configuration file, created by -# sphinx-quickstart on Thu May 25 15:43:01 2017. +# Configuration file for the Sphinx documentation builder. # -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# This file does only contain a selection of the most common options. For a +# full list see the documentation: +# http://www.sphinx-doc.org/en/master/config -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. +# -- Path setup -------------------------------------------------------------- import os import sys @@ -23,11 +14,20 @@ import sys sys.path.insert(0, os.path.abspath("..")) import fbchat -import tests -from fbchat import __copyright__, __author__, __version__, __description__ + +# -- Project information ----------------------------------------------------- + +project = fbchat.__name__ +copyright = fbchat.__copyright__ +author = fbchat.__author__ + +# The short X.Y version +version = fbchat.__version__ +# The full version, including alpha/beta/rc tags +release = fbchat.__version__ -# -- General configuration ------------------------------------------------ +# -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # @@ -55,22 +55,6 @@ source_suffix = ".rst" # The master toctree document. master_doc = "index" -# General information about the project. -project = "fbchat" -title = "fbchat Documentation" -copyright = __copyright__ -author = __author__ -description = __description__ - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = __version__ -# The full version, including alpha/beta/rc tags. -release = __version__ - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # @@ -80,43 +64,71 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path +# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +# If true, '()' will be appended to :func: etc. cross-reference text. +# +add_function_parentheses = False + # The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = True +pygments_style = None -# -- Options for HTML output ---------------------------------------------- +# -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # - html_theme = "alabaster" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + "show_powered_by": False, + "github_user": "carpedm20", + "github_repo": project, + "github_banner": True, + "show_related": False, +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# The default sidebars (for documents that don't match any pattern) are +# defined by theme itself. Builtin themes are using these templates by +# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', +# 'searchbox.html']``. +# +html_sidebars = {"**": ["sidebar.html", "searchbox.html"]} -# -- Options for HTMLHelp output ------------------------------------------ +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# +html_show_sphinx = False + +# If true, links to the reST sources are added to the pages. +# +html_show_sourcelink = False + +# A shorter title for the navigation bar. Default is the same as html_title. +# +html_short_title = fbchat.__description__ + + +# -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = project + "doc" -# -- Options for LaTeX output --------------------------------------------- +# -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). @@ -136,43 +148,66 @@ latex_elements = { # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). -latex_documents = [(master_doc, project + ".tex", title, author, "manual")] +latex_documents = [(master_doc, project + ".tex", fbchat.__title__, author, "manual")] -# -- Options for manual page output --------------------------------------- +# -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, project, title, [author], 1)] +man_pages = [ + (master_doc, project, fbchat.__title__, [x.strip() for x in author.split(";")], 1) +] -# -- Options for Texinfo output ------------------------------------------- +# -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, project, title, author, project, description, "Miscellaneous") + ( + master_doc, + project, + fbchat.__title__, + author, + project, + fbchat.__description__, + "Miscellaneous", + ) ] -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/3/": None} +# -- Options for Epub output ------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = project + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +# +# epub_identifier = '' + +# A unique identification for the text. +# +# epub_uid = '' + +# A list of files that should not be packed into the epub file. +epub_exclude_files = ["search.html"] -add_function_parentheses = False +# -- Extension configuration ------------------------------------------------- -html_theme_options = { - "show_powered_by": False, - "github_user": "carpedm20", - "github_repo": project, - "github_banner": True, - "show_related": False, -} +# -- Options for autodoc extension --------------------------------------- -html_sidebars = {"**": ["sidebar.html", "searchbox.html"]} - -html_show_sphinx = False -html_show_sourcelink = False autoclass_content = "both" -html_short_title = description + +# -- Options for intersphinx extension --------------------------------------- + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {"https://docs.python.org/": None} + +# -- Options for todo extension ---------------------------------------------- + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True diff --git a/docs/make.bat b/docs/make.bat index c11e517..27f573b 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -5,21 +5,20 @@ pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=python -msphinx + set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build -set SPHINXPROJ=fbchat if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. - echo.The Sphinx module was not found. Make sure you have Sphinx installed, - echo.then set the SPHINXBUILD environment variable to point to the full - echo.path of the 'sphinx-build' executable. Alternatively you may add the - echo.Sphinx directory to PATH. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/