Add docs
This commit is contained in:
parent
ba4ebaeea2
commit
add9bfc44b
13
.readthedocs.yml
Normal file
13
.readthedocs.yml
Normal file
@ -0,0 +1,13 @@
|
||||
version: 2
|
||||
|
||||
formats:
|
||||
- epub
|
||||
- htmlzip
|
||||
|
||||
sphinx:
|
||||
configuration: docs/source/conf.py
|
||||
|
||||
python:
|
||||
version: 3.7
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
20
docs/Makefile
Normal file
20
docs/Makefile
Normal file
@ -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 = source
|
||||
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)
|
35
docs/make.bat
Normal file
35
docs/make.bat
Normal file
@ -0,0 +1,35 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=source
|
||||
set BUILDDIR=build
|
||||
|
||||
%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.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
|
||||
:end
|
||||
popd
|
6
docs/requirements.txt
Normal file
6
docs/requirements.txt
Normal file
@ -0,0 +1,6 @@
|
||||
sphinx-autoapi
|
||||
markdown-it-py[linkify,plugins]
|
||||
myst_parser
|
||||
sphinx
|
||||
sphinx_copybutton
|
||||
sphinx_rtd_theme
|
56
docs/source/conf.py
Normal file
56
docs/source/conf.py
Normal file
@ -0,0 +1,56 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = "WeChatFerry"
|
||||
copyright = "2023, Changhua"
|
||||
author = "Changhua"
|
||||
release = "3.7.0.30"
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
templates_path = ["_templates"]
|
||||
exclude_patterns = []
|
||||
|
||||
language = "zh_CN"
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_static_path = ["_static"]
|
||||
source_suffix = {
|
||||
".rst": "restructuredtext",
|
||||
".md": "markdown",
|
||||
}
|
||||
master_doc = "index"
|
||||
|
||||
# -- General configuration
|
||||
extensions = [
|
||||
"myst_parser",
|
||||
"autoapi.extension",
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx_copybutton",
|
||||
]
|
||||
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3/", None),
|
||||
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
|
||||
}
|
||||
intersphinx_disabled_domains = ["std"]
|
||||
|
||||
|
||||
myst_heading_anchors = 3
|
||||
myst_ref_domains = ["std", "py"]
|
||||
myst_enable_extensions = ["linkify", "colon_fence"]
|
||||
|
||||
# Document Python Code
|
||||
autoapi_type = "python"
|
||||
autoapi_dirs = ["../../python/wcferry"]
|
||||
autoapi_member_order = "groupwise"
|
||||
autoapi_options = ["members", "undoc-members", "show-inheritance", "show-module-summary", "imported-members"]
|
21
docs/source/index.rst
Normal file
21
docs/source/index.rst
Normal file
@ -0,0 +1,21 @@
|
||||
.. PackageName documentation master file, created by
|
||||
sphinx-quickstart on Tue Jan 31 12:31:42 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
WeChatFerry
|
||||
=======================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
readme_link
|
||||
autoapi/index
|
||||
|
||||
|
||||
索引及附录
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
5
docs/source/readme_link.rst
Normal file
5
docs/source/readme_link.rst
Normal file
@ -0,0 +1,5 @@
|
||||
README
|
||||
=======
|
||||
|
||||
.. include:: ../../python/README.MD
|
||||
:parser: myst_parser.sphinx_
|
Loading…
Reference in New Issue
Block a user