1
0

Added sphinx

This commit is contained in:
Rokas Puzonas 2020-08-09 20:36:08 +03:00
parent a4c62f0e14
commit f18868d6b3
10 changed files with 190 additions and 0 deletions

View File

@ -1,4 +1,5 @@
{ {
"autoDocstring.docstringFormat": "sphinx", "autoDocstring.docstringFormat": "sphinx",
"restructuredtext.confPath": "${workspaceFolder}/docs",
"python.pythonPath": "${workspaceFolder}/venv/bin/python3" "python.pythonPath": "${workspaceFolder}/venv/bin/python3"
} }

View File

@ -2,24 +2,33 @@ alabaster==0.7.12
Babel==2.8.0 Babel==2.8.0
bcrypt==3.1.7 bcrypt==3.1.7
beautifulsoup4==4.9.1 beautifulsoup4==4.9.1
bleach==3.1.5
certifi==2020.6.20 certifi==2020.6.20
cffi==1.14.1 cffi==1.14.1
chardet==3.0.4 chardet==3.0.4
colorama==0.4.3
cryptography==3.0 cryptography==3.0
docutils==0.16 docutils==0.16
idna==2.10 idna==2.10
imagesize==1.2.0 imagesize==1.2.0
jeepney==0.4.3
Jinja2==2.11.2 Jinja2==2.11.2
keyring==21.2.1
lxml==4.5.2 lxml==4.5.2
MarkupSafe==1.1.1 MarkupSafe==1.1.1
packaging==20.4 packaging==20.4
paramiko==2.7.1 paramiko==2.7.1
pkginfo==1.5.0.1
pycparser==2.20 pycparser==2.20
Pygments==2.6.1 Pygments==2.6.1
PyNaCl==1.4.0 PyNaCl==1.4.0
pyparsing==2.4.7 pyparsing==2.4.7
pytz==2020.1 pytz==2020.1
readme-renderer==26.0
requests==2.24.0 requests==2.24.0
requests-toolbelt==0.9.1
rfc3986==1.4.0
SecretStorage==3.1.2
six==1.15.0 six==1.15.0
snowballstemmer==2.0.0 snowballstemmer==2.0.0
soupsieve==2.0.1 soupsieve==2.0.1
@ -31,4 +40,7 @@ sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1 sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3 sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4 sphinxcontrib-serializinghtml==1.1.4
tqdm==4.48.0
twine==3.2.0
urllib3==1.25.10 urllib3==1.25.10
webencodings==0.5.1

20
sphinx/Makefile Normal file
View 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 ?= -d _doctrees -b dirhtml
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)

Binary file not shown.

Binary file not shown.

Binary file not shown.

43
sphinx/api.rst Normal file
View File

@ -0,0 +1,43 @@
API Reference
=============
Session
-------
.. autoclass:: minehost.Session
:members:
:special-members:
Account
-------
.. autoclass:: minehost.Account
:members:
:special-members:
MCServer
--------
.. autoclass:: minehost.MCServer
:members:
:special-members:
CommandSender
-------------
.. autoclass:: minehost.server.CommandSender
:members:
:private-members:
Exceptions
----------
.. autoclass:: minehost.server.InvalidDomainException
:members:
.. autoclass:: minehost.session.IncorrectLoginException
:members:
.. autoclass:: minehost.session.InvalidSessionException
:members:

64
sphinx/conf.py Normal file
View File

@ -0,0 +1,64 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# 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.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
project = 'MineHost Interface'
copyright = '2020, Rokas Puzonas'
author = 'Rokas Puzonas'
# The full version, including alpha/beta/rc tags
release = '1.0.0'
# -- General configuration ---------------------------------------------------
# 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.todo',
'sphinx.ext.githubpages',
'sphinx.ext.autodoc',
'sphinx.ext.viewcode'
]
source_suffix = '.rst'
master_doc = 'index'
# 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', 'Thumbs.db', '.DS_Store', "_doctrees"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
# 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']

15
sphinx/index.rst Normal file
View File

@ -0,0 +1,15 @@
Welcome to the MineHost Interface documentation!
================================================
This is a small personal project so only the api is documented.
Additional pages will only be added if there is a significant number of people that want it.
If you want to contribute, just make a push request to the repository on github.
API
---
.. toctree::
:maxdepth: 2
api

35
sphinx/make.bat Normal file
View File

@ -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