-
-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
220 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_build/ | ||
*.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
#A part of NonVisual Desktop Access (NVDA) | ||
#Copyright (C) 2019 NV Access Limited, Leonard de RUijter | ||
#This file is covered by the GNU General Public License. | ||
#See the file COPYING for more details. | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('../source')) | ||
import sourceEnv | ||
|
||
# Initialize languageHandler so that sphinx is able to deal with translatable strings. | ||
import languageHandler | ||
languageHandler.setLanguage("en") | ||
|
||
# Initialize globalvars.appArgs to something sensible. | ||
import globalVars | ||
class AppArgs: | ||
# Set an empty comnfig path | ||
# This is never used as we don't initialize config, but some modules expect this to be set. | ||
configPath = "" | ||
secure = False | ||
disableAddons = True | ||
launcher = False | ||
globalVars.appArgs = AppArgs() | ||
|
||
# Import NVDA's versionInfo module. | ||
import versionInfo | ||
# Set a suitable updateVersionType for the updateCheck module to be imported | ||
versionInfo.updateVersionType = "stable" | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = versionInfo.name | ||
copyright = versionInfo.copyright | ||
author = versionInfo.publisher | ||
|
||
# The major project version | ||
version = versionInfo.formatVersionForGUI(versionInfo.version_year, versionInfo.version_major, versionInfo.version_minor) | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = versionInfo.version | ||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
default_role = 'py:obj' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [ | ||
"_build" | ||
] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. | ||
|
||
html_theme = 'alabaster' | ||
|
||
# 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'] | ||
|
||
# -- Extension configuration ------------------------------------------------- | ||
|
||
# sphinx.ext.autodoc configuration | ||
|
||
autoclass_content = "both" # Both the class’ and the __init__ method’s docstring are concatenated and inserted. | ||
autodoc_member_order = 'bysource' | ||
autodoc_mock_imports = [ | ||
"config", | ||
"louis", | ||
] | ||
|
||
# SUpport for auto generation of API docs | ||
# Based on code published in https://github.com/readthedocs/readthedocs.org/issues/1139#issuecomment-398083449 | ||
|
||
def run_apidoc(_): | ||
ignore_paths = [ | ||
'_buildVersion.py', | ||
'comInterfaces', | ||
'images', | ||
'lib', | ||
'lib64', | ||
'libArm64', | ||
'locale', | ||
'louis', # Not our project | ||
'typelibs', | ||
'waves', | ||
"mathType.py", # Fails when not installed | ||
'oleTypes.py', # Not our code | ||
'setup.py', # Py2exe | ||
'sourceEnv.py', # Only available when running from source | ||
] | ||
argv = [ | ||
"--force", # overwrite existing files | ||
"-P", # Include private modules | ||
"--module-first", # put module documentation before submodule documentation | ||
"--output-dir", ".", | ||
sys.path[0] # Module sources | ||
] + [os.path.join(sys.path[0], path) for path in ignore_paths] | ||
|
||
from sphinx.ext import apidoc | ||
apidoc.main(argv) | ||
|
||
def setup(app): | ||
app.connect('builder-inited', run_apidoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. NVDA documentation master file, created by | ||
sphinx-quickstart on Sat Jul 20 08:52:09 2019. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to NVDA's documentation! | ||
================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
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/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters