From cfa56db32beb9e8f9c4fa9b9127b16ec29d12359 Mon Sep 17 00:00:00 2001 From: Alexander Werner Date: Sun, 4 Nov 2018 22:57:20 +0100 Subject: [PATCH] updated documentation --- .gitignore | 1 + Pipfile | 1 + Pipfile.lock | 20 +++++++++++-- doc/conf.py | 3 +- doc/developement.rst | 9 ++++++ doc/index.rst | 2 ++ doc/man.rst | 3 ++ doc/man/carom-client.1 | 66 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 doc/developement.rst create mode 100644 doc/man.rst create mode 100644 doc/man/carom-client.1 diff --git a/.gitignore b/.gitignore index 91a7be2..941a2a8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea/ .python-version doc/_build +doc/man/.doctrees \ No newline at end of file diff --git a/Pipfile b/Pipfile index b7534e0..9473e89 100644 --- a/Pipfile +++ b/Pipfile @@ -23,6 +23,7 @@ tox-pipenv = "*" pytest = "*" sphinx = "*" sphinx-rtd-theme = "*" +sphinx-click = "*" [requires] python_version = "3.5" diff --git a/Pipfile.lock b/Pipfile.lock index 71085d4..66be73f 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "6e6bd3a03740098cebdf88699913665272ba8a628a9c156f86ec804a64d6b168" + "sha256": "75ffb26ae722771c07a3d001c976e6fd7092b4ab928d2c30b80ae3e4573eecd6" }, "pipfile-spec": 6, "requires": { @@ -40,8 +40,7 @@ }, "click-didyoumean": { "hashes": [ - "sha256:112229485c9704ff51362fe34b2d4f0b12fc71cc20f6d2b3afabed4b8bfa6aeb", - "sha256:0b427ca37c9b85d92e75a915db95c1ac0d6efd65e8b89139eed398bbda074bd8" + "sha256:112229485c9704ff51362fe34b2d4f0b12fc71cc20f6d2b3afabed4b8bfa6aeb" ], "index": "pypi", "version": "==0.0.3" @@ -253,6 +252,13 @@ "markers": "python_version < '3.6'", "version": "==2.3.2" }, + "pbr": { + "hashes": [ + "sha256:8fc938b1123902f5610b06756a31b1e6febf0d105ae393695b0c9d4244ed2910", + "sha256:f20ec0abbf132471b68963bb34d9c78e603a5cf9e24473f14358e66551d47475" + ], + "version": "==5.1.0" + }, "pep8-naming": { "hashes": [ "sha256:360308d2c5d2fff8031c1b284820fbdb27a63274c0c1a8ce884d631836da4bdd", @@ -380,6 +386,14 @@ "index": "pypi", "version": "==1.8.1" }, + "sphinx-click": { + "hashes": [ + "sha256:4b12575b51884185f6f3ade34a16e7e111f8495609c73844605ae194da14e7e1", + "sha256:911a83662f611aeeb32d71cf7b7ad0ecacc933ca1992880f3e11c6974854830a" + ], + "index": "pypi", + "version": "==1.4.0" + }, "sphinx-rtd-theme": { "hashes": [ "sha256:02f02a676d6baabb758a20c7a479d58648e0f64f13e07d1b388e9bb2afe86a09", diff --git a/doc/conf.py b/doc/conf.py index 62972f9..70a1b3b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -43,6 +43,7 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.viewcode', + 'sphinx_click.ext' ] # Add any paths that contain templates here, relative to this directory. @@ -142,7 +143,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'caromclient', 'Carom Client Documentation', + ('man', 'carom-client', 'Carom Client Documentation', [author], 1) ] diff --git a/doc/developement.rst b/doc/developement.rst new file mode 100644 index 0000000..06cca88 --- /dev/null +++ b/doc/developement.rst @@ -0,0 +1,9 @@ +Developement +============ + +Update der Manpages +------------------- + +.. code-block:: bash + + pipenv run sphinx-build -b man doc doc/man \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 3557faf..9b02056 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -11,6 +11,8 @@ Welcome to Carom Client's documentation! :caption: Contents: api/index + man + developement diff --git a/doc/man.rst b/doc/man.rst new file mode 100644 index 0000000..e9440d0 --- /dev/null +++ b/doc/man.rst @@ -0,0 +1,3 @@ +.. click:: carom.cli:cli + :prog: carom-client + :show-nested: \ No newline at end of file diff --git a/doc/man/carom-client.1 b/doc/man/carom-client.1 new file mode 100644 index 0000000..74e7b6f --- /dev/null +++ b/doc/man/carom-client.1 @@ -0,0 +1,66 @@ +.\" Man page generated from reStructuredText. +. +.TH "CAROM-CLIENT" "1" "04.11.2018" "" "Carom Client" +.SH NAME +carom-client \- Carom Client Documentation +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +carom\-client [OPTIONS] COMMAND [ARGS]... +.ft P +.fi +.UNINDENT +.UNINDENT +Options.INDENT 0.0 +.TP +.B \-v, \-\-verbosity +Either CRITICAL, ERROR, WARNING, INFO or DEBUG +.UNINDENT +.SH RUN +.sp +This command runs the carom\-client daemon process. +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +carom\-client run [OPTIONS] +.ft P +.fi +.UNINDENT +.UNINDENT +.SH AUTHOR +Robert Einsle +.SH COPYRIGHT +2018, Robert Einsle +.\" Generated by docutils manpage writer. +.