From: Philipp Spitzer Date: Tue, 26 Feb 2019 19:43:06 +0000 (+0100) Subject: Change configuration so that API doc is generated now by e.g. "SEEPARKINI=seewasser... X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/commitdiff_plain/6dfdb20e9470161dac16156156a851f3d7d9f6e1 Change configuration so that API doc is generated now by e.g. "SEEPARKINI=seewasser.ini make html" --- diff --git a/conf.py b/conf.py index 47b1d78..0a169aa 100644 --- a/conf.py +++ b/conf.py @@ -17,9 +17,9 @@ # 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('.')) +import os +import sys +sys.path.insert(0, os.path.abspath('web')) # -- General configuration ------------------------------------------------ @@ -30,7 +30,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['sphinxcontrib.autohttp.flask'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/index.rst b/index.rst index a382697..b584bcc 100644 --- a/index.rst +++ b/index.rst @@ -3,20 +3,15 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to seepark's documentation! -=================================== - -Contents: - -.. toctree:: - :maxdepth: 2 +Seepark API documentation +========================= +.. autoflask:: seepark_web:app + :undoc-static: Indices and tables ================== -* :ref:`genindex` -* :ref:`modindex` * :ref:`search` diff --git a/web/seepark_web.py b/web/seepark_web.py index 70b0d4b..4123029 100644 --- a/web/seepark_web.py +++ b/web/seepark_web.py @@ -358,6 +358,8 @@ def currentwater(version): @app.route('/report/-') def report(year, month): + """Report for given year and month + """ paper_size = (29.7 / 2.54, 21. / 2.54) # A4 begin = datetime.datetime(year, month, 1)