Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit e7478b6

Browse files
committed
Added basic documentation.
1 parent 29f71bc commit e7478b6

File tree

9 files changed

+246
-0
lines changed

9 files changed

+246
-0
lines changed

.readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#formats:
2+
# - pdf
3+
requirements_file: doc/requirements.txt
4+
python:
5+
version: 3

doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/conf.py

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
#sys.path.insert(0, os.path.abspath('.'))
16+
sys.path.insert(0, os.path.abspath('..'))
17+
#sys.path.insert(0, os.path.abspath('../pyCallBy'))
18+
#sys.path.insert(0, os.path.abspath('_extensions'))
19+
#sys.path.insert(0, os.path.abspath('_themes/sphinx_rtd_theme'))
20+
21+
22+
# -- Project information -----------------------------------------------------
23+
24+
project = 'pyTerminalUI'
25+
copyright = '2007-2019, Patrick Lehmann'
26+
author = 'Patrick Lehmann'
27+
28+
# The full version, including alpha/beta/rc tags
29+
release = 'v1.0'
30+
31+
32+
# -- General configuration ---------------------------------------------------
33+
34+
# Add any Sphinx extension module names here, as strings. They can be
35+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36+
# ones.
37+
extensions = [
38+
# Sphinx theme
39+
"sphinx_rtd_theme",
40+
# Standard Sphinx extensions
41+
"sphinx.ext.autodoc",
42+
'sphinx.ext.extlinks',
43+
'sphinx.ext.intersphinx',
44+
'sphinx.ext.inheritance_diagram',
45+
'sphinx.ext.todo',
46+
'sphinx.ext.graphviz',
47+
'sphinx.ext.mathjax',
48+
'sphinx.ext.ifconfig',
49+
'sphinx.ext.viewcode',
50+
# SphinxContrib extensions
51+
52+
# Other extensions
53+
# 'DocumentMember',
54+
# local extensions (patched)
55+
56+
# local extensions
57+
]
58+
59+
# Add any paths that contain templates here, relative to this directory.
60+
templates_path = ['_templates']
61+
62+
# List of patterns, relative to source directory, that match files and
63+
# directories to ignore when looking for source files.
64+
# This pattern also affects html_static_path and html_extra_path.
65+
exclude_patterns = [
66+
"_build",
67+
"Thumbs.db",
68+
".DS_Store"
69+
]
70+
71+
72+
# -- Options for HTML output -------------------------------------------------
73+
74+
# The theme to use for HTML and HTML Help pages. See the documentation for
75+
# a list of builtin themes.
76+
#
77+
# html_theme = 'alabaster'
78+
html_theme = 'sphinx_rtd_theme'
79+
80+
# Add any paths that contain custom static files (such as style sheets) here,
81+
# relative to this directory. They are copied after the builtin static files,
82+
# so a file named "default.css" will overwrite the builtin "default.css".
83+
html_static_path = ['_static']
84+
85+
# ==============================================================================
86+
# Sphinx.Ext.InterSphinx
87+
# ==============================================================================
88+
intersphinx_mapping = {
89+
'python': ('https://docs.python.org/3', None),
90+
}
91+
92+
93+
# ==============================================================================
94+
# Sphinx.Ext.ExtLinks
95+
# ==============================================================================
96+
extlinks = {
97+
'issue': ('https://github.com/Paebbels/pyTerminalUI/issues/%s', 'issue #'),
98+
'pull': ('https://github.com/Paebbels/pyTerminalUI/pull/%s', 'pull request #'),
99+
'src': ('https://github.com/Paebbels/pyTerminalUI/blob/master/pyTerminalUI/%s?ts=2', None),
100+
# 'test': ('https://github.com/Paebbels/pyCallBy/blob/master/test/%s?ts=2', None)
101+
}
102+
103+
104+
# ==============================================================================
105+
# Sphinx.Ext.Graphviz
106+
# ==============================================================================
107+
graphviz_output_format = "svg"

doc/genindex.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. This file is a placeholder and will be replaced
2+
3+
Index
4+
#####

doc/index.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
pyTerminalUI Documentation
2+
##########################
3+
4+
A set of helpers to implement a text user interface (TUI) in a terminal.
5+
6+
7+
Installation/Updates
8+
********************
9+
10+
Installation using PIP
11+
======================
12+
13+
.. code-block:: bash
14+
15+
pip3 install pyTerminalUI
16+
17+
18+
Updating using PIP
19+
==================
20+
21+
.. code-block:: bash
22+
23+
pip3 install -U pyTerminalUI
24+
25+
------------------------------------
26+
27+
.. |docdate| date:: %b %d, %Y - %H:%M
28+
29+
.. only:: html
30+
31+
This document was generated on |docdate|.
32+
33+
.. #
34+
toctree::
35+
:caption: Domain Specific Paths
36+
:hidden:
37+
38+
39+
.. toctree::
40+
:caption: CallBy Classes
41+
:hidden:
42+
43+
pyCallBy
44+
45+
46+
.. toctree::
47+
:caption: Appendix
48+
:hidden:
49+
50+
genindex
51+
py-modindex

doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

doc/py-modindex.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. This file is a placeholder and will be replaced
2+
3+
Python Module Index
4+
###################

doc/pyTerminalUI.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pyTerminalUI
2+
############
3+
4+
Terminal
5+
********
6+
7+
.. autoclass:: pyTerminalUI.Terminal
8+
:members:
9+
:private-members:
10+
11+
12+
LineTerminal
13+
************
14+
15+
.. autoclass:: pyTerminalUI.LineTerminal
16+
:members:
17+
:private-members:

doc/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r ../requirements.txt
2+
sphinx>=2.2
3+
sphinx-rtd-theme

0 commit comments

Comments
 (0)