Skip to content
Snippets Groups Projects
Commit 015c8942 authored by Robert Habermann's avatar Robert Habermann
Browse files

docs cont.

parent eb3a9088
No related branches found
No related tags found
No related merge requests found
...@@ -60,4 +60,4 @@ For a Spinx formatted "Note" or "Warning" use .rst Syntax: ...@@ -60,4 +60,4 @@ For a Spinx formatted "Note" or "Warning" use .rst Syntax:
http://www.sphinx-doc.org/en/stable/markup/para.html http://www.sphinx-doc.org/en/stable/markup/para.html
http://www.sphinx-doc.org/en/stable/rest.html http://www.sphinx-doc.org/en/stable/rest.html
http://docutils.sourceforge.net/docs/user/rst/quickref.html#escaping http://docutils.sourceforge.net/docs/user/rst/quickref.html#escaping
https://gist.github.com/dupuy/1855764
PyOTRS Overview
====== ========
[![build status](https://gitlab.denm.de/robbie/PyOTRS/badges/master/build.svg)](https://gitlab.denm.de/robbie/PyOTRS/commits/master) [![build status](https://gitlab.denm.de/robbie/PyOTRS/badges/master/build.svg)](https://gitlab.denm.de/robbie/PyOTRS/commits/master)
...@@ -58,6 +58,54 @@ True ...@@ -58,6 +58,54 @@ True
[<DynamicField: ProcessManagementActivityID: None>, <DynamicField: ProcessManagementProcessID: None>] [<DynamicField: ProcessManagementActivityID: None>, <DynamicField: ProcessManagementProcessID: None>]
Installation
============
Get
---
Project is not yet hosted on Pypi - so for now get it here::
wget https://sys.denm.de/PyOTRS/dist/PyOTRS-0.3.0.tar.gz
Dependencies
------------
*Dependencies are installed automatically*
* python-requests
* click (for CLI App)
* colorama (for colors in CLI App)
Install
-------
consider using a virtual env::
virtualenv venv
source venv/bin/activate
pip install -U pip
**install**::
pip install PyOTRS-0.3.0.tar.gz
Getting Started
===============
Get Started::
from pyotrs import Client
client = Client("https://otrs.example.com", "GenericTicketConnectorREST", "root@localhost", "x")
client.session_restore_or_set_up_new()
client.ticket_get_by_id(1)
Useful result data Useful result data
------------------ ------------------
- **client.result_list_ticket_get** (*list*) - list of ticket_get results - **client.result_list_ticket_get** (*list*) - list of ticket_get results
...@@ -86,3 +134,41 @@ Source distribution files: https://sys.denm.de/PyOTRS/dist/ ...@@ -86,3 +134,41 @@ Source distribution files: https://sys.denm.de/PyOTRS/dist/
Coverage Coverage
-------- --------
Coverage details: https://sys.denm.de/PyOTRS/htmlcov/ Coverage details: https://sys.denm.de/PyOTRS/htmlcov/
PyOTRS CLI
==========
Bash Completion
---------------
http://click.pocoo.org/5/bashcomplete/
For instance, to enable Bash completion put this into your .bashrc:
eval "$(_FOO_BAR_COMPLETE=source foo-bar)"
Or Built .sh script
Activation Script
The above activation example will always invoke your application on startup. This might be slowing down the shell activation time significantly if you have many applications. Alternatively, you could also ship a file with the contents of that, which is what Git and other systems are doing.
This can be easily accomplished:
_PYOTRS_COMPLETE=source PyOTRS > /path/to/PyOTRS-complete.sh
And then you would put this into your bashrc instead:
source /path/to/PyOTRS-complete.sh
Zsh Completion
--------------
There is no native support for zsh completion, but zsh can use the bash completion script.
Put this into your .zshrc
autoload bashcompinit
bashcompinit
source /path/to/PyOTRS-complete.sh
...@@ -304,7 +304,7 @@ extlinks = { ...@@ -304,7 +304,7 @@ extlinks = {
intersphinx_mapping = {'https://docs.python.org/': None} intersphinx_mapping = {'https://docs.python.org/': None}
# ? # ?
# autosummary_generate = True autosummary_generate = True
# 'groupwise', 'bysource', default: 'alphabetical' # 'groupwise', 'bysource', default: 'alphabetical'
autodoc_member_order = 'groupwise' autodoc_member_order = 'groupwise'
Getting Started
===============
Get Started::
from pyotrs import Client
client = Client("https://otrs.example.com", "GenericTicketConnectorREST", "root@localhost", "x")
client.session_restore_or_set_up_new()
client.ticket_get_by_id(1)
...@@ -3,24 +3,16 @@ PyOTRS documentation ...@@ -3,24 +3,16 @@ PyOTRS documentation
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Introduction :caption: Documentation
readme readme
installation
getting_started
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: PyOTRS CLI :caption: Details
pyotrs_cli
.. toctree::
:maxdepth: 2
:caption: Technical Documentation
pyotrs_public
pyotrs pyotrs
changelog changelog
contributing
todolist todolist
contributing
Installation
============
Get
---
Project is not yet hosted on Pypi - so for now get it here::
wget https://sys.denm.de/PyOTRS/dist/PyOTRS-0.3.0.tar.gz
Dependencies
------------
*Dependencies are installed automatically*
* python-requests
* click (for CLI App)
* colorama (for colors in CLI App)
Install
-------
consider using a virtual env::
virtualenv venv
source venv/bin/activate
pip install -U pip
**install**::
pip install PyOTRS-0.3.0.tar.gz
PyOTRS CLI
==========
Bash Completion
---------------
http://click.pocoo.org/5/bashcomplete/
For instance, to enable Bash completion put this into your .bashrc:
eval "$(_FOO_BAR_COMPLETE=source foo-bar)"
Or Built .sh script
Activation Script
The above activation example will always invoke your application on startup. This might be slowing down the shell activation time significantly if you have many applications. Alternatively, you could also ship a file with the contents of that, which is what Git and other systems are doing.
This can be easily accomplished:
_PYOTRS_COMPLETE=source PyOTRS > /path/to/PyOTRS-complete.sh
And then you would put this into your bashrc instead:
source /path/to/PyOTRS-complete.sh
Zsh Completion
--------------
There is no native support for zsh completion, but zsh can use the bash completion script.
Put this into your .zshrc
autoload bashcompinit
bashcompinit
source /path/to/PyOTRS-complete.sh
PyOTRS Lib (public)
===================
.. currentmodule:: pyotrs
:mod:`pyotrs`
-------------
.. automodule:: pyotrs
:mod:`pyotrs.lib.Article`
-------------------------
.. autoclass:: pyotrs.lib.Article
:members:
:undoc-members:
:show-inheritance:
:noindex:
:mod:`pyotrs.lib.Attachment`
----------------------------
.. autoclass:: pyotrs.lib.Attachment
:members:
:undoc-members:
:show-inheritance:
:noindex:
:mod:`pyotrs.lib.Client`
------------------------
.. autoclass:: pyotrs.lib.Client
:members:
:undoc-members:
:show-inheritance:
:noindex:
:mod:`pyotrs.lib.DynamicField`
------------------------------
.. autoclass:: pyotrs.lib.DynamicField
:members:
:undoc-members:
:show-inheritance:
:noindex:
:mod:`pyotrs.lib.SessionIDStore`
--------------------------------
.. autoclass:: pyotrs.lib.SessionIDStore
:members:
:undoc-members:
:show-inheritance:
:noindex:
:mod:`pyotrs.lib.Ticket`
------------------------
.. autoclass:: pyotrs.lib.Ticket
:members:
:undoc-members:
:show-inheritance:
:noindex:
...@@ -94,5 +94,4 @@ deps = ...@@ -94,5 +94,4 @@ deps =
sphinx_rtd_theme sphinx_rtd_theme
commands = commands =
# sphinx-build -b html {toxinidir}/docs/ {toxinidir}/build/docs/
sphinx-build -b dirhtml {toxinidir}/docs/ {toxinidir}/build/docs/ sphinx-build -b dirhtml {toxinidir}/docs/ {toxinidir}/build/docs/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment