Compare commits

..

71 commits

Author SHA1 Message Date
Joel Klimont
8cee0ec6f5 Update documentation 2023-02-10 11:37:24 +01:00
Joel Klimont
e8ac3e810a Update documentation 2023-02-10 11:23:22 +01:00
Joel Klimont
75185f19b6 Update documentation 2022-11-18 16:46:58 +01:00
Konstantin Lampalzer
64ff14b9b1 Update documentation 2022-11-18 15:47:59 +01:00
Konstantin Lampalzer
0a3c69a058 Update documentation 2022-11-13 02:54:42 +01:00
Joel Klimont
b469515f18 Update documentation 2022-11-11 17:05:15 +01:00
Joel Klimont
2dd401da6b Update documentation 2022-11-09 03:21:06 +01:00
Joel Klimont
41ffbe6d07 Update documentation 2022-11-09 03:13:02 +01:00
Joel Klimont
0ef5670247 Update documentation 2022-11-09 02:41:02 +01:00
Joel Klimont
4cef171e99 Update documentation 2022-11-09 02:35:50 +01:00
Joel Klimont
581cfd394a Update documentation 2022-11-09 02:29:32 +01:00
Joel Klimont
e289671c82 Update documentation 2022-11-09 02:27:47 +01:00
Joel Klimont
7cd41068fc Update documentation 2022-11-09 02:14:00 +01:00
Joel Klimont
a4839b8121 Update documentation 2022-11-09 02:13:43 +01:00
Joel Klimont
cab339c556 Update documentation 2022-11-09 01:45:42 +01:00
Joel Klimont
7d275fb9a2 Update documentation 2022-11-09 01:42:50 +01:00
Joel Klimont
f8433c1b23 Update documentation 2022-11-09 00:22:10 +01:00
Konstantin Lampalzer
bcaeff1a1c Update documentation 2022-11-01 23:06:23 +01:00
Konstantin Lampalzer
5bea85af12 Update documentation 2022-10-28 11:49:12 +02:00
Konstantin Lampalzer
3173308b54 Update documentation 2022-10-20 19:55:14 +02:00
Konstantin Lampalzer
49c4040072 Update documentation 2022-10-14 00:36:09 +02:00
Konstantin Lampalzer
6b092c1eea Update documentation 2022-10-14 00:10:22 +02:00
Konstantin Lampalzer
cb6d561c53 Update documentation 2022-10-13 00:56:19 +02:00
Konstantin Lampalzer
a2dfbf29fa Update documentation 2022-10-13 00:31:59 +02:00
Konstantin Lampalzer
79a4998058 Update documentation 2022-10-13 00:03:04 +02:00
Joel Klimont
4a62019556 quick static fix 2022-02-16 13:45:36 +01:00
Konstantin Lampalzer
30a5567a6c Update documentation 2022-01-28 19:51:52 +01:00
Konstantin Lampalzer
ccb72b1108 Update documentation 2022-01-28 19:51:27 +01:00
Konstantin Lampalzer
16a3609f9f Update documentation 2022-01-09 18:41:17 +01:00
Konstantin Lampalzer
e9d663963d Update documentation 2021-10-16 16:35:59 +02:00
Konstantin Lampalzer
e855429a8f Update documentation 2021-10-14 15:17:49 +02:00
itssme
0dc9e8e161 Update documentation 2021-10-05 23:21:25 +01:00
itssme
f658b27f7f Update documentation 2021-10-01 01:51:53 +01:00
itssme
8c9ea41bc5 Update documentation 2021-10-01 01:42:04 +01:00
itssme
99e3a06d39 Update documentation 2021-10-01 01:08:50 +01:00
Joel Klimont
d2498e8a04 Update documentation 2021-10-01 01:46:42 +02:00
Konstantin Lampalzer
72afd224e3 Update documentation 2021-10-01 01:12:44 +02:00
Konstantin Lampalzer
43ec20e38a Update documentation 2021-09-14 18:35:05 +02:00
Konstantin Lampalzer
739b86c1f2 Create CNAME 2021-09-14 18:29:41 +02:00
Konstantin Lampalzer
7053edae14 Delete CNAME 2021-09-14 18:26:52 +02:00
Konstantin Lampalzer
e7e884d439 Update CNAME 2021-09-13 19:33:33 +02:00
Konstantin Lampalzer
fbf455c5b7 Update documentation 2021-09-13 19:14:30 +02:00
Konstantin Lampalzer
4c1cfa6735 Update documentation 2021-09-13 18:47:18 +02:00
Konstantin Lampalzer
ccd46ee8a7 Update documentation 2021-09-12 13:46:58 +02:00
Konstantin Lampalzer
527965ac0f
Update documentation 2021-04-05 21:55:42 +02:00
Konstantin Lampalzer
bd062da539
Update documentation 2021-03-28 21:42:59 +02:00
Konstantin Lampalzer
9a42d3b9bf
Update documentation 2021-03-28 16:37:43 +02:00
Konstantin Lampalzer
44783b827c
Update documentation 2021-03-19 15:23:02 +01:00
Konstantin Lampalzer
cf7d60f002
Update documentation 2021-03-19 15:22:50 +01:00
Konstantin Lampalzer
dbe08c033a
Update documentation 2021-03-19 15:21:45 +01:00
Joel
fac9a142a9
Update documentation 2021-03-05 15:45:02 +01:00
Joel
f517ae1b42
Update documentation 2021-02-10 22:41:35 +01:00
Joel
0c9976565c
Update documentation 2021-02-10 18:53:09 +01:00
Joel
c2b67e70c5
Update documentation 2021-02-10 17:55:24 +01:00
Joel
0f4f2438cb
Update documentation 2021-01-26 20:40:55 +01:00
Konstantin Lampalzer
a7f5dd13c4
Update documentation 2021-01-23 13:37:07 +01:00
Joel
f72550146d
Update documentation 2021-01-21 21:51:10 +01:00
Konstantin Lampalzer
afdfd3b85e
Update documentation 2021-01-18 20:00:42 +01:00
Konstantin Lampalzer
11e5a9dd8f
Update documentation 2021-01-17 15:07:32 +01:00
Joel
e5c9f277b6
Fixed documentation build script 2021-01-17 04:48:55 +01:00
Joel
aa6fb2fc8b
Update documentation 2021-01-17 04:35:51 +01:00
Joel
0dbfc5fe6b
Update documentation 2021-01-16 23:43:56 +01:00
Konstantin Lampalzer
81875a2cc5
Update documentation 2021-01-16 23:39:41 +01:00
Konstantin Lampalzer
f7a7dd37ed
Update documentation 2021-01-16 02:12:23 +01:00
Konstantin Lampalzer
d555d55b2c
Update documentation 2021-01-16 01:55:10 +01:00
Konstantin Lampalzer
d39ad4b112
Update documentation 2021-01-16 01:29:28 +01:00
Konstantin Lampalzer
8dd2c9485e
Update documentation 2021-01-16 01:26:51 +01:00
Konstantin Lampalzer
c76abf967c
Merge branch 'gh-pages' of github.com:F-WuTS/compLIB into gh-pages 2021-01-16 01:20:35 +01:00
Konstantin Lampalzer
aee44d32f0
Adds a .nojekyll file for docs builds 2021-01-16 01:20:22 +01:00
Konstantin Lampalzer
3a997404a9 Create CNAME 2021-01-16 01:16:50 +01:00
Konstantin Lampalzer
10e78bb41c
Add gh pages 2021-01-16 01:14:26 +01:00
227 changed files with 58215 additions and 4139 deletions

4
.buildinfo Normal file
View file

@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5fb11da93cdb0f49bc97733fbb9cadaf
tags: 645f666f9bcd5a90fca523b33c5a78b7

View file

@ -1,32 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: HerrNamenlos123, itssme, Kola50011
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behaviour:
1. import compLib '...'
2. run this code '....'
3. See error
**Expected behaviour**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Device**
- Raspberry Pie: [e.g. 3b+]
- OS: [e.g. debian buster]
- Version [e.g. 0.0.3]
**Additional context**
Add any other context about the problem here.

View file

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: HerrNamenlos123, itssme, Kola50011
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View file

@ -1,60 +0,0 @@
name: Build comlib.deb package
on:
push:
branches:
- master
jobs:
build-complib-deb:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bump version number
uses: paulhatch/semantic-version@v4.0.2
id: next_semantic_version
with:
branch: "master"
tag_prefix: ""
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
format: "${major}.${minor}.${patch}-${increment}"
bump_each_commit: true
- name: Print Version Numbers
run: |
echo ${{join(steps.next_semantic_version.outputs.*, ' - ')}}
echo "Next version: ${{steps.next_semantic_version.outputs.version}}"
echo "Next version tag: ${{steps.next_semantic_version.outputs.version_tag}}"
- name: Tag Commit
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{steps.next_semantic_version.outputs.version}}',
sha: context.sha
})
- name: Install fpm
run: sudo apt install ruby -y && sudo gem install fpm
- name: Build complib deb Package
env:
VERSION: ${{steps.next_semantic_version.outputs.version}}
run: bash ./build.sh # creates packages in "output" directory
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'output'
target-directory: 'debs/complib/'
destination-github-username: 'F-WuTS'
destination-repository-name: 'compREP'
user-email: joel.klimont@comp-air.at
target-branch: master

312
.gitignore vendored
View file

@ -1,312 +0,0 @@
# Created by https://www.toptal.com/developers/gitignore/api/macos,python,pycharm
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,python,pycharm
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### PyCharm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# End of https://www.toptal.com/developers/gitignore/api/macos,python,pycharm

1
CNAME Normal file
View file

@ -0,0 +1 @@
lib.comp-air.at

View file

@ -1 +0,0 @@
include readme.md

View file

@ -1,50 +0,0 @@
# compLIB
Rewrite for ROS is the live packaged version since 18.07.2023.
# Dependencies
TODO: document
## Building documentation
```
pip install sphinx-rtd-theme
```
* [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html)
# Writing docs
[Inline documentation example](https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example)
[reStructured Text](https://pythonhosted.org/an_example_pypi_project/sphinx.html#restructured-text-rest-resources)
# ENV Variables
+ `DEBUG`, default="0", If set to != "0" (default), debug prints will be enabled
+ `API_URL`, default="http://localhost:5000/"
+ `API_FORCE`, default="", if set to !="" (default), it will replace the API_URL env variable
+ `FORCE_SEED`, default="-1", if set to !="-1" (default), the seeding seed supplied by the user will be ignored and this seed will be used instead
# Stream Video
```
sudo raspivid -t 0 -b 10000000 -w 1920 -h 1080 -fps 30 -n -o - | gst-launch-1.0 fdsrc ! video/x-h264,width=1280,height=720,framerate=30/1,noise-reduction=1,profile=high,stream-format=byte-stream ! h264parse ! queue ! flvmux streamable=true ! rtmpsink location=\"rtmp://10.1.1.68/live/stream\"```
```
## Stream video from generic USB camera
with gst, very cpu heavy
```
gst-launch-1.0 v4l2src ! image/jpeg,width=640,height=480,framerate=30/1 ! jpegdec ! x264enc ! flvmux streamable=true ! rtmpsink location="rtmp://10.20.86.88/live/stream"
```
with ffmpeg, cpu friendly
```
ffmpeg -f v4l2 -framerate 30 -video_size 640x480 -i /dev/video0 -b:v 2M -f flv rtmp://10.20.86.88/live/stream
```
# Bullseye now only supports libcamera
https://www.raspberrypi.com/news/bullseye-camera-system/
(This can still be mitigated by enabling "old camera support" in the raspi-config settings. (This is done automatically in the postinstallscript)

View file

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 356 KiB

Before After
Before After

107
_sources/lib/Api.rst.txt Normal file
View file

@ -0,0 +1,107 @@
.. _lib_api:
Api
****
Seeding
========
.. autoclass:: compLib.Api.Seeding
:members:
Double Elimination
===================
.. autoclass:: compLib.Api.DoubleElim
:members:
Position
========
.. autoclass:: compLib.Api.Position
:members:
Examples
========
Calling Seeding API
---------------------
.. code-block:: python
from compLib.Api import Seeding
zones, code = Seeding.get_delivery()
if code == 403:
print(f"I am not in the correct zone to make that request!")
else:
print(f"First we need to go to zone {zone[0]}")
# put code here to follow line and drive to the zone
print(f"Now we need to go to zone {zone[1]}")
# put code here to follow line and drive to the next zone
print(f"Now we need to go to zone {zone[2]}")
# put code here to follow line and drive to the last zone
print(f"We delivered all packages, hopefully we scored some points!")
.. code-block:: python
from compLib.Api import Seeding
package, code = Seeding.get_cargo("yellow")
if code == 403:
print(f"I am not in the correct zone to make that request!")
elif code == 404:
print(f"I am in the correct zone, but there is no yellow package here.")
elif code == 413:
print(f"I am in the correct zone, but I already have two packages loaded.")
else code == 200:
print(f"The {package['color']} has been picked up!")
Calling Double Elimination API
----------------------------------
.. code-block:: python
from compLib.Api import DoubleElim
position, status = DoubleElim.get_position()
print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
goal, status = DoubleElim.get_goal()
print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
.. code-block:: python
from compLib.Api import DoubleElim
import time
# function which waits for the game to be started (you should include this in your double elimination program)
def wait_for_start():
_, status = DoubleElim.get_position()
while status == 503:
time.sleep(0.1)
_, status = DoubleElim.get_position()
wait_for_start()
print(f"Game has started, lets score some points!!")
position, status = DoubleElim.get_position()
print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
opponent_position, status = DoubleElim.get_opponent()
print(f"Position of the opponents robot is: x={opponent_position.x}, y={opponent_position.y} and rotation is: {opponent_position.degrees}, the server responded with status code: {status}")
goal, status = DoubleElim.get_goal()
print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
items, status = DoubleElim.get_items()
print(f"There are currently {len(items)} on the gameboard: {items}, the server responded with status code: {status}")
score, status = DoubleElim.get_score()
print(f"The current score of the game is {score}, the server responded with status code: {status}")
meteoroids, status = DoubleElim.get_meteoroids()
print(f"The current meteoroids in the game are {meteoroids}, the server responded with status code: {status}")
In this second example we wait until the game is started by the judges and then make all possible requests once. You should use the wait_for_start function in your double elimination program. If your robot starts too soon your run will not count!

View file

@ -0,0 +1,83 @@
.. _lib_vision:
Aruco
*******
Examples
=========
Recognizing ArUco tags
-------------------------
.. code-block:: python
import time
import cv2
from cv2 import aruco
from compLib import Vision
ARUCO_DICT = cv2.aruco.Dictionary_get(aruco.DICT_6X6_250)
ARUCO_PARAMETERS = aruco.DetectorParameters_create()
def getTagCenterFromFrame(id, frame):
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
corners, ids, rejectedImgPoints = aruco.detectMarkers(gray, ARUCO_DICT, parameters = ARUCO_PARAMETERS)
frame = aruco.drawDetectedMarkers(frame.copy(), corners, ids)
if ids is None:
return frame, None, None
for tag_id, corner in zip(ids, corners):
if (tag_id[0] == id):
x, y = 0, 0
for i in range(4):
x += corner[0][i][0] * 0.25
y += corner[0][i][1] * 0.25
return frame, x, y
return frame, None, None
# Get the center from the aruco tag with the specified id
# in pixel coordinates (0-640, 0-480)
def getTagPosition(id):
frame = Vision.Streaming.get_frame()
frame, x, y = getTagCenterFromFrame(id, frame)
Vision.Streaming.publish_frame(frame)
return x, y
# Get the normalized center coordinates from the aruco tag
# with the specified id
# left is -1, right +1
# bottom is -1, top +1
def getNormalizedTagPosition(id):
frame = Vision.Streaming.get_frame()
frame, x, y = getTagCenterFromFrame(id, frame)
Vision.Streaming.publish_frame(frame)
if x is None or y is None:
return None, None
height, width = frame.shape[:2]
x = x / width * 2.0 - 1.0
y = -(y / height * 2.0 - 1.0)
return x, y
if __name__ == '__main__':
desiredID = 11
while True:
x, y = getNormalizedTagPosition(desiredID)
if x is not None:
print("X Coordinate: ", x)
else:
print("Tag not found")
This example shows how to recognize ArUco tags based on their id and position.
You can specify an ID of the tag you want to use and if it's found, the coordinates of the center are returned.
With the normalized function this is very easy: The x-coordinate is -1 on the left, 1 on the right and 0 in the center of the screen, same for y.
This way it is quite simple to act on the position of the tag.

View file

@ -0,0 +1,23 @@
.. _lib_battery:
Battery
********
Class Documentation
====================
.. autoclass:: compLib.Battery.Battery
:members:
Examples
=========
Printing percentage
--------------------
.. code-block:: python
from compLib.Battery import Battery
print(Battery.percent())

View file

@ -0,0 +1,25 @@
.. _lib_buzzer:
Buzzer
*******
Class Documentation
====================
.. autoclass:: compLib.Buzzer.Buzzer
:members:
Examples
=========
Turning buzzer on and off
--------------------------
.. code-block:: python
import time
from compLib.Buzzer import Buzzer
Buzzer.set(True)
time.sleep(1)
Buzzer.set(False)

View file

@ -0,0 +1,23 @@
.. _lib_display:
Display
*******
Class Documentation
====================
.. autoclass:: compLib.Display.Display
:members:
Examples
=========
Write a line to the display
---------------------------
.. code-block:: python
import time
from compLib.Display import Display
Display.write(1, "Hello World!")

View file

@ -0,0 +1,10 @@
.. _lib_encoder:
Encoder
*******
Class Documentation
====================
.. autoclass:: compLib.Encoder.Encoder
:members:

View file

@ -0,0 +1,20 @@
.. _lib_irsensor:
Infrared Sensor
****************
.. autoclass:: compLib.IRSensor.IRSensor
:members:
Examples
=========
Testing analog sensors
-------------------------
.. code-block:: python
from compLib import IRSensor
while True:
print ("left: {} middle: {} right: {}".format(IRSensor.read(1), IRSensor.read(3), IRSensor.read(5)))

View file

@ -0,0 +1,22 @@
.. _lib_irwrapper:
Infrared Wrapper
****************
.. autoclass:: compLib.IRWrapper.IRWrapper
:members:
Examples
=========
Calibrating analog sensors
--------------------------
.. code-block:: python
from compLib import IRWrapper
ir = IRWrapper.IRWrapper()
ir.calibrate()
print("left {} middle {} right {}".format(ir.bottom_left_calibrated(), ir.bottom_middle_calibrated(), ir.bottom_right_calibrated()))

View file

@ -0,0 +1,79 @@
.. _lib_Linefollower:
Linefollower Examples
*********************
Simple Linefollower
-------------------------
.. code-block:: python
from compLib.Motor import Motor
from compLib.Display import Display
from compLib.IRSensor import IRSensor
from compLib.Encoder import Encoder
import time
IRSensor.set(1, True)
IRSensor.set(2, True)
IRSensor.set(3, True)
IRSensor.set(4, True)
IRSensor.set(5, True)
DRIVE_SPEED = 75
COLOR_BREAK = 900
KP = 10.0
KD = 0.0
def drive(leftSpeed, rightSpeed):
rightSpeed *= -0.906
Motor.power(1, min(max(-100, rightSpeed), 100))
Motor.power(4, min(max(-100, leftSpeed), 100))
def follow(sleepTime = 0.1):
lastError = 0
sensorsBlack = 0
while sensorsBlack < 3:
sensorsBlack = 0
for i in range(1, 6):
if IRSensor.read(i) > COLOR_BREAK:
sensorsBlack += 1
error = lastError
if IRSensor.read(3) > COLOR_BREAK:
error = 0
elif IRSensor.read(1) > COLOR_BREAK:
error = -1.5
elif IRSensor.read(5) > COLOR_BREAK:
error = 1.5
elif IRSensor.read(2) > COLOR_BREAK:
error = -1
elif IRSensor.read(4) > COLOR_BREAK:
error = 1
elif error == 1.5:
error = 3
elif error == -1.5:
error = -3
lastError = error
adjustment = KP * error + KD * (error - lastError)
leftSpeed = DRIVE_SPEED + adjustment
rightSpeed = DRIVE_SPEED - adjustment
print(f"{leftSpeed} {rightSpeed} {adjustment} {error}")
drive(leftSpeed, rightSpeed)
drive(0, 0)
time.sleep(sleepTime)
def main():
follow()
follow()
follow()
follow()
follow(0.2)
main()

View file

@ -0,0 +1,22 @@
.. _lib_logging:
Logging
*******
Class Documentation
====================
.. autoclass:: compLib.LogstashLogging.Logging
:members:
Examples
=========
Turn up the logging
--------------------
.. code-block:: python
from compLib.LogstashLogging import Logging
Logging.set_debug()

View file

@ -0,0 +1,23 @@
.. _lib_motor:
Motor
******
Class Documentation
====================
.. autoclass:: compLib.Motor.Motor
:members:
Examples
=========
Driving straight (maybe)
-------------------------
.. code-block:: python
from compLib.Motor import Motor
Motor.power(1, -50)
Motor.power(4, 50)

50
_sources/lib/Odom.rst.txt Normal file
View file

@ -0,0 +1,50 @@
.. _lib_odom:
Odometry
********
Class Documentation
====================
.. autoclass:: compLib.Odom.Odometry
:members:
.. autoclass:: compLib.Odom.Odom
:members:
Examples
=========
Getting actual distance driven
------------------------------
.. code-block:: python
import time
import math
from compLib.Motor import Motor
from compLib.Encoder import Encoder
from compLib.Odom import Odom, Odometry
# distance in meters
# speed in % of max speed
def drive_example(distance, speed):
Odom.update()
odom = Odom.get_odom()
while abs(odom.get_x()) < distance:
Odom.update()
odom = Odom.get_odom()
Motor.power(4, speed)
Motor.power(1, -speed)
print(f" Forward: {odom.get_x()} m")
print(f" Right: {odom.get_y()} m")
print(f" Turned: {math.degrees(odom.get_orientation())} degrees")
Motor.active_break(1)
Motor.active_break(4)
time.sleep(0.1)
Encoder.clear_all()
Odom.clear()

71
_sources/lib/QC.rst.txt Normal file
View file

@ -0,0 +1,71 @@
.. _lib_qc:
Quality Control
###############
Infrared Test
-------------------------
.. code-block:: python
from compLib.IRSensor import IRSensor
import time
IRSensor.set(1, True)
IRSensor.set(2, True)
IRSensor.set(3, True)
IRSensor.set(4, True)
IRSensor.set(5, True)
while True:
t = time.time()
for i in range(1, 6):
print(f"{i}: {IRSensor.read(i)}")
print("")
time.sleep(0.2)
Motor Test
-------------------------
.. code-block:: python
from compLib.Motor import Motor
from compLib.Encoder import Encoder
import time
Motor.power(1, -50)
Motor.power(4, 50)
while True:
print(f"L:{Encoder.read(4)} R:{Encoder.read(1)}")
time.sleep(0.1)
Servo Test
-------------------------
.. code-block:: python
from compLib.Servo import Servo
import time
for i in range(1, 8 + 1):
Servo.set_position(i, 45)
print(f"{i}")
time.sleep(1)
Servo.setup_position()
time.sleep(10)
Vision Test
-------------------------
.. code-block:: python
import cv2
from compLib import Vision
from compLib.Servo import Servo
while True:
frame = Vision.Streaming.get_frame()
Vision.Streaming.publish_frame(frame)
Servo.set_position(3, -45)

View file

@ -0,0 +1,11 @@
.. _lib_robot:
Robot
******
Class Documentation
====================
.. autoclass:: compLib.Robot.Robot
:members:
:private-members:

View file

@ -0,0 +1,7 @@
.. _lib_servo:
Servo
******
.. autoclass:: compLib.Servo.Servo
:members:

104
_sources/lib/Vision.rst.txt Normal file
View file

@ -0,0 +1,104 @@
.. _lib_vision:
Vision
*******
This module provides an interface for grabbing an rtmp stream and using the images to do some processing in opencv.
How do I use this module?
1. Get frames from the raspberry pi camera
2. -- here comes your own processing --
3. Publish the processed frames on an http server
4. You can view the http stream of your processed images in a web browser
Opencv Stream
==============
Because of the rtmp stream needing to buffer some frames and waiting for P-Frames, importing this module might take up
to 5 Seconds.
.. autoclass:: compLib.Vision.__Streaming
:members:
Examples
=========
Using the Vision Module
-------------------------
.. code-block:: python
import cv2
from compLib import Vision
while True:
# get newest opencv frame from camera
frame = Vision.Streaming.get_frame()
# do some processing with the frame.....
# publish frame to streaming server
Vision.Streaming.publish_frame(frame)
Connect the raspberry pi to your internet and view the stream at: "http://your_raspi_ip:9898/". This should display
your raspberry pi camera. Note: the stream will lag a little bit BUT the processing of the image will be done in
realtime.
The output on the website should show whatever your raspberry pi cam records:
.. image:: images/opencv_http_stream.png
:width: 680
:alt: Processed frames from opencv
Chessboard Detection
------------------------------------------
In this example we process the captured stream of images and want to detect chessboards. Run this example and
point your raspberry pi camera to a chessboard and it should be detected.
For testing you can point it at this image:
.. image:: images/chessboard.jpg
:width: 680
:alt: Chessboard for opencv processing
.. code-block:: python
import cv2
from compLib import Vision
while True:
# get newest opencv frame from camera
frame = Vision.Streaming.get_frame()
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
# convert image to grayscale image
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# find the chessboard corners
ret, corners = cv2.findChessboardCorners(gray, (6, 9), None)
# draw detected chessboard position onto the image
cv2.drawChessboardCorners(frame, (6, 9), corners, ret)
# publish frame to streaming server
Vision.Streaming.publish_frame(frame)
Connect the raspberry pi to your internet and view the stream at: "http://your_raspi_ip:9898/".
The output image should look like this:
.. image:: images/chessboard_detected.jpg
:width: 680
:alt: Processed frames from opencv
Here is a screenshot of the stream website while viewing the chessboard in this documentation.
.. image:: images/opencv_processed.png
:width: 680
:alt: Processed frames from opencv

View file

@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}

2506
_static/_stemmer.js Normal file

File diff suppressed because it is too large Load diff

294
_static/base-stemmer.js Normal file
View file

@ -0,0 +1,294 @@
/**@constructor*/
BaseStemmer = function() {
this.setCurrent = function(value) {
this.current = value;
this.cursor = 0;
this.limit = this.current.length;
this.limit_backward = 0;
this.bra = this.cursor;
this.ket = this.limit;
};
this.getCurrent = function() {
return this.current;
};
this.copy_from = function(other) {
this.current = other.current;
this.cursor = other.cursor;
this.limit = other.limit;
this.limit_backward = other.limit_backward;
this.bra = other.bra;
this.ket = other.ket;
};
this.in_grouping = function(s, min, max) {
if (this.cursor >= this.limit) return false;
var ch = this.current.charCodeAt(this.cursor);
if (ch > max || ch < min) return false;
ch -= min;
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false;
this.cursor++;
return true;
};
this.in_grouping_b = function(s, min, max) {
if (this.cursor <= this.limit_backward) return false;
var ch = this.current.charCodeAt(this.cursor - 1);
if (ch > max || ch < min) return false;
ch -= min;
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false;
this.cursor--;
return true;
};
this.out_grouping = function(s, min, max) {
if (this.cursor >= this.limit) return false;
var ch = this.current.charCodeAt(this.cursor);
if (ch > max || ch < min) {
this.cursor++;
return true;
}
ch -= min;
if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) {
this.cursor++;
return true;
}
return false;
};
this.out_grouping_b = function(s, min, max) {
if (this.cursor <= this.limit_backward) return false;
var ch = this.current.charCodeAt(this.cursor - 1);
if (ch > max || ch < min) {
this.cursor--;
return true;
}
ch -= min;
if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) {
this.cursor--;
return true;
}
return false;
};
this.eq_s = function(s)
{
if (this.limit - this.cursor < s.length) return false;
if (this.current.slice(this.cursor, this.cursor + s.length) != s)
{
return false;
}
this.cursor += s.length;
return true;
};
this.eq_s_b = function(s)
{
if (this.cursor - this.limit_backward < s.length) return false;
if (this.current.slice(this.cursor - s.length, this.cursor) != s)
{
return false;
}
this.cursor -= s.length;
return true;
};
/** @return {number} */ this.find_among = function(v)
{
var i = 0;
var j = v.length;
var c = this.cursor;
var l = this.limit;
var common_i = 0;
var common_j = 0;
var first_key_inspected = false;
while (true)
{
var k = i + ((j - i) >>> 1);
var diff = 0;
var common = common_i < common_j ? common_i : common_j; // smaller
// w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional)
var w = v[k];
var i2;
for (i2 = common; i2 < w[0].length; i2++)
{
if (c + common == l)
{
diff = -1;
break;
}
diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2);
if (diff != 0) break;
common++;
}
if (diff < 0)
{
j = k;
common_j = common;
}
else
{
i = k;
common_i = common;
}
if (j - i <= 1)
{
if (i > 0) break; // v->s has been inspected
if (j == i) break; // only one item in v
// - but now we need to go round once more to get
// v->s inspected. This looks messy, but is actually
// the optimal approach.
if (first_key_inspected) break;
first_key_inspected = true;
}
}
do {
var w = v[i];
if (common_i >= w[0].length)
{
this.cursor = c + w[0].length;
if (w.length < 4) return w[2];
var res = w[3](this);
this.cursor = c + w[0].length;
if (res) return w[2];
}
i = w[1];
} while (i >= 0);
return 0;
};
// find_among_b is for backwards processing. Same comments apply
this.find_among_b = function(v)
{
var i = 0;
var j = v.length
var c = this.cursor;
var lb = this.limit_backward;
var common_i = 0;
var common_j = 0;
var first_key_inspected = false;
while (true)
{
var k = i + ((j - i) >> 1);
var diff = 0;
var common = common_i < common_j ? common_i : common_j;
var w = v[k];
var i2;
for (i2 = w[0].length - 1 - common; i2 >= 0; i2--)
{
if (c - common == lb)
{
diff = -1;
break;
}
diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2);
if (diff != 0) break;
common++;
}
if (diff < 0)
{
j = k;
common_j = common;
}
else
{
i = k;
common_i = common;
}
if (j - i <= 1)
{
if (i > 0) break;
if (j == i) break;
if (first_key_inspected) break;
first_key_inspected = true;
}
}
do {
var w = v[i];
if (common_i >= w[0].length)
{
this.cursor = c - w[0].length;
if (w.length < 4) return w[2];
var res = w[3](this);
this.cursor = c - w[0].length;
if (res) return w[2];
}
i = w[1];
} while (i >= 0);
return 0;
};
/* to replace chars between c_bra and c_ket in this.current by the
* chars in s.
*/
this.replace_s = function(c_bra, c_ket, s)
{
var adjustment = s.length - (c_ket - c_bra);
this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket);
this.limit += adjustment;
if (this.cursor >= c_ket) this.cursor += adjustment;
else if (this.cursor > c_bra) this.cursor = c_bra;
return adjustment;
};
this.slice_check = function()
{
if (this.bra < 0 ||
this.bra > this.ket ||
this.ket > this.limit ||
this.limit > this.current.length)
{
return false;
}
return true;
};
this.slice_from = function(s)
{
var result = false;
if (this.slice_check())
{
this.replace_s(this.bra, this.ket, s);
result = true;
}
return result;
};
this.slice_del = function()
{
return this.slice_from("");
};
this.insert = function(c_bra, c_ket, s)
{
var adjustment = this.replace_s(c_bra, c_ket, s);
if (c_bra <= this.bra) this.bra += adjustment;
if (c_bra <= this.ket) this.ket += adjustment;
};
this.slice_to = function()
{
var result = '';
if (this.slice_check())
{
result = this.current.slice(this.bra, this.ket);
}
return result;
};
this.assign_to = function()
{
return this.current.slice(0, this.limit);
};
};

856
_static/basic.css Normal file
View file

@ -0,0 +1,856 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd > :first-child {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
span.eqno a.headerlink {
position: absolute;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 188 KiB

View file

@ -0,0 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
_static/css/theme.css Normal file

File diff suppressed because one or more lines are too long

316
_static/doctools.js Normal file
View file

@ -0,0 +1,316 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box, textarea, dropdown or button
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
&& !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
}
}
});
}
};
// quick alias for translations
_ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});

View file

@ -0,0 +1,12 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.2.3',
LANGUAGE: 'de',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
};

BIN
_static/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more