diff options
author | Thomas Touhey <thomas@touhey.fr> | 2019-07-30 17:09:08 +0200 |
---|---|---|
committer | Thomas Touhey <thomas@touhey.fr> | 2019-07-30 17:09:08 +0200 |
commit | 07e73a7d0a24338dc03df3e77e2b920dd7610bee (patch) | |
tree | c0cef76d443a703ebf442e976deacda4fdd6c2b3 /docs |
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Makefile | 38 | ||||
-rw-r--r-- | docs/_static/.gitkeep | 0 | ||||
-rw-r--r-- | docs/_templates/.gitkeep | 0 | ||||
-rw-r--r-- | docs/conf.py | 69 | ||||
-rw-r--r-- | docs/index.rst | 26 | ||||
-rw-r--r-- | docs/make.bat | 35 |
6 files changed, 168 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..4b5507b --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,38 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. + +PE = pipenv run +SPHINXOPTS = +SPHINXBUILD = $(PE) sphinx-build +SPHINXWATCH = $(PE) sphinx-autobuild +SOURCEDIR = . +BUILDDIR = _build +WEBROOT = thembed.touhey.pro:thembed_doc + +# 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) + +# Livehtml build. +livehtml: + $(SPHINXWATCH) -b html -z ../thembed $(SPHINXOPTS) . $(BUILDDIR)/html + +.PHONY: livehtml + +# Send the website content (Linux-only). +show: html + find _build/html -type f -exec chmod 644 {} \; + rsync -Prlt --delete _build/html/ "$(WEBROOT)" + +.PHONY: show + +# End of file. diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/docs/_static/.gitkeep diff --git a/docs/_templates/.gitkeep b/docs/_templates/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/docs/_templates/.gitkeep diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..a5c8dca --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,69 @@ +# 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: +# http://www.sphinx-doc.org/en/master/config + +# -- 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. + +def _add_paths(): + import os + import sys + + sys.path.insert(0, os.path.abspath('..')) + +_add_paths() + +# -- Project information ----------------------------------------------------- + +project = 'thembed' +copyright = '2019, Thomas Touhey' +author = 'Thomas Touhey' + +# The full version, including alpha/beta/rc tags + +def _get_release(): + from os.path import dirname, join, normpath + from pkg_resources import Environment as _Environment + + module_path = normpath(join(dirname(__file__), '..')) + env = _Environment(module_path) + env.scan() + mod = env['thembed'][0] + return mod.version + +release = _get_release() + +# -- 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.autodoc' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = [] + +# 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', '.goutput*'] + + +# -- 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 = 'sphinx_rtd_theme' + +# 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 = [] diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..ffc6afa --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,26 @@ +Welcome to thembed's documentation! +=================================== + +This module's role is to gather information about objects embedded in a +link, like videos, pictures, etc. It is made by `Thomas Touhey`_ (``th`` +is for ``touhey``) for the `textoutpc`_ project, a BBCode to HTML +translation module. + +To install the module, use pip: + +.. code-block:: bash + + $ pip install thembed + +For more information and links, consult `the official website`_. + +Table of contents +----------------- + +.. toctree:: + :maxdepth: 2 + + +.. _Thomas Touhey: https://thomas.touhey.fr/ +.. _textoutpc: https://textout.touhey.pro/ +.. _the official website: https://thembed.touhey.pro/ diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..27f573b --- /dev/null +++ b/docs/make.bat @@ -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%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
+
+:end
+popd
|