-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update RTD documentation with recent developments
RTD configuration file and a default index.rst is now required and some Sphinx settings have also changed accordingly. Let us also use the opportunity to simplify the API doc generation bash script.
- Loading branch information
Showing
24 changed files
with
191 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
|
||
# Build documentation in the docs/api directory with Sphinx | ||
sphinx: | ||
builder: html | ||
configuration: docs/api/conf.py | ||
fail_on_warning: true | ||
|
||
# Build docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Specify dependencies to enable reproducible builds: | ||
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: packaging/pip_requirements_minimal.txt | ||
- method: pip | ||
path: ./packaging/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
# Run this script when producing new documentation to submit to RTD. | ||
|
||
set -e | ||
|
||
# produce rst files for the modules | ||
sphinx-apidoc -e -f -o . ../../guibot || die "No rst files could be generated" | ||
|
||
# move all rst files to source directory to integrate with RTD | ||
mv README.rst README.rst.bak | ||
rm -fr source README.rst | ||
rm -fr source index.rst | ||
mkdir source || die "No source directory to move rst files to" | ||
mv *.rst source | ||
|
||
# produce HTML documentation from the rst files | ||
make html | ||
|
||
# use README as index page for RTD (needs MD-RST compatibility) | ||
# pandoc ../../README.md --from markdown --to rst -s -o README.rst | ||
mv README.rst.bak README.rst | ||
pandoc ../../README.md --from markdown --to rst -s -o index.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
Guibot |GH Actions| |Documentation Status| |CodeQL| |codecov| | ||
============================================================= | ||
|
||
A tool for GUI automation using a variety of computer vision and display | ||
control backends. | ||
|
||
Introduction and concepts | ||
------------------------- | ||
|
||
In order to do GUI automation you usually need to solve two problems: | ||
first, you need to have a way to control and interact with the interface | ||
and platform you are automating and second, you need to be able to | ||
locate the objects you are interested in on the screen. Guibot helps you | ||
do both. | ||
|
||
To interact with GUIs, Guibot provides the | ||
```controller`` <https://github.com/intra2net/guibot/blob/master/guibot/controller.py>`__ | ||
module which contains a common interface for different display backends, | ||
with methods to move the mouse, take screenshots, type characters and so | ||
on. The backend to use will depend on how your platform is accessible, | ||
with some backends running directly as native binaries or python scripts | ||
on Windows, macOS, and Linux while others connecting through remote VNC | ||
displays. | ||
|
||
To locate an element on the screen, you will need an image representing | ||
the screen, a | ||
```target`` <https://github.com/intra2net/guibot/blob/master/guibot/target.py>`__ | ||
representing the element (an image or a text in the simplest cases) and | ||
a | ||
```finder`` <https://github.com/intra2net/guibot/blob/master/guibot/finder.py>`__ | ||
configured for the target. The finder looks for the target within the | ||
screenshot image and returns the coordinates to the region where that | ||
target appears. Finders, just like display controllers, are wrappers | ||
around different backends supported by Guibot that could vary from a | ||
simplest 1:1 pixel matching by controller backends, to template or | ||
feature matching mix by OpenCV, to OCR and ML solutions by Tesseract and | ||
AI frameworks. | ||
|
||
Finally, to bridge the gap between controlling the GUI and finding | ||
target elements, the | ||
```region`` <https://github.com/intra2net/guibot/blob/master/guibot/region.py>`__ | ||
module is provided. It represents a subregion of a screen and contains | ||
methods to locate targets in this region using a choice of finder and | ||
interact with the graphical interface using a choice of controller. | ||
|
||
Supported backends | ||
------------------ | ||
|
||
Supported Computer Vision (CV) backends are based on | ||
|
||
- `OpenCV <https://github.com/opencv/opencv>`__ | ||
|
||
- Template matching | ||
- Contour matching | ||
- Feature matching | ||
- Haar cascade matching | ||
- Template-feature and mixed matching | ||
|
||
- `Tesseract OCR <https://github.com/tesseract-ocr/tesseract>`__ | ||
|
||
- Text matching through pytesseract, tesserocr, or OpenCV’s bindings | ||
|
||
- `PyTorch <https://github.com/pytorch/pytorch>`__ | ||
|
||
- R-CNN matching through Faster R-CNN or Mask R-CNN | ||
|
||
- `autopy <https://github.com/msanders/autopy>`__ | ||
|
||
- AutoPy matching | ||
|
||
Supported Display Controller (DC) backends are based on | ||
|
||
- `PyAutoGUI <https://github.com/asweigart/pyautogui>`__ | ||
- `AutoPy <https://github.com/msanders/autopy>`__ | ||
- `VNCDoTool <https://github.com/sibson/vncdotool>`__ | ||
- `XDoTool <https://www.semicomplete.com/projects/xdotool>`__ | ||
|
||
Further resources | ||
----------------- | ||
|
||
Homepage: http://guibot.org | ||
|
||
Documentation: http://guibot.readthedocs.io | ||
|
||
Installation: https://github.com/intra2net/guibot/wiki/Packaging | ||
|
||
Issue tracking: https://github.com/intra2net/guibot/issues | ||
|
||
Project wiki: https://github.com/intra2net/guibot/wiki | ||
|
||
.. |GH Actions| image:: https://github.com/intra2net/guibot/actions/workflows/ci.yml/badge.svg | ||
:target: https://github.com/intra2net/guibot/actions/workflows/ci.yml | ||
.. |Documentation Status| image:: https://readthedocs.org/projects/guibot/badge/?version=latest | ||
:target: http://guibot.readthedocs.io/en/latest/?badge=latest | ||
.. |CodeQL| image:: https://github.com/intra2net/guibot/actions/workflows/codeql.yml/badge.svg | ||
:target: https://github.com/intra2net/guibot/actions/workflows/codeql.yml | ||
.. |codecov| image:: https://codecov.io/gh/intra2net/guibot/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/intra2net/guibot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.