From 25a3e7fa00d050d98d2b01634313d70d2d066fb6 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Mon, 22 Feb 2021 08:07:00 +0300 Subject: [PATCH] Add readthedocs --- .readthedocs.yml | 20 +++++++++++ .../Robot/{Robot.rst => 01_Robot.rst} | 0 Sources/GuideSphinx/Robot/02_Defs.rst | 34 +++++++++++++++++++ Sources/pyOpenRPA/Robot/UIDesktop.py | 8 +++++ 4 files changed, 62 insertions(+) create mode 100644 .readthedocs.yml rename Sources/GuideSphinx/Robot/{Robot.rst => 01_Robot.rst} (100%) create mode 100644 Sources/GuideSphinx/Robot/02_Defs.rst diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..86206418 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,20 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: Sources/GuideSphinx/conf.py + +# Optionally build your docs in additional formats such as PDF +formats: + - pdf + +# Optionally set the version of Python and requirements required to build your docs +python: + version: 3.7 + install: +# - requirements: docs/requirements.txt \ No newline at end of file diff --git a/Sources/GuideSphinx/Robot/Robot.rst b/Sources/GuideSphinx/Robot/01_Robot.rst similarity index 100% rename from Sources/GuideSphinx/Robot/Robot.rst rename to Sources/GuideSphinx/Robot/01_Robot.rst diff --git a/Sources/GuideSphinx/Robot/02_Defs.rst b/Sources/GuideSphinx/Robot/02_Defs.rst new file mode 100644 index 00000000..533d2155 --- /dev/null +++ b/Sources/GuideSphinx/Robot/02_Defs.rst @@ -0,0 +1,34 @@ +#################################### +2. Defs +#################################### + +************************************************** +pyOpenRPA.Robot.UIDesktop +************************************************** + +.. code-block:: python + + # EXAMPLE 1 + from pyOpenRPA.Robot import UIDesktop + + UIDesktop.UIOSelector_Get_UIO( + inSpecificationList=[ + {"title":"notepad.exe"},{"title":"OK"}], + inElement=None, + inFlagRaiseException=True) + + + +.. automodule:: pyOpenRPA.Robot.UIDesktop + :members: + :autosummary: + + +********** +References +********** + +`reStructuredText`_ + +.. target-notes:: +.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html diff --git a/Sources/pyOpenRPA/Robot/UIDesktop.py b/Sources/pyOpenRPA/Robot/UIDesktop.py index 3a003c5d..55c3042e 100644 --- a/Sources/pyOpenRPA/Robot/UIDesktop.py +++ b/Sources/pyOpenRPA/Robot/UIDesktop.py @@ -103,6 +103,14 @@ mDefaultPywinautoBackend="win32" #inFlagRaiseException - Флаг True - выкинуть ошибку в случае обнаружении пустого списка #old name - PywinautoExtElementsGet def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseException=True): + ''' + Get the UIO list by the selector + + :param inSpecificationList: UIO Selector + :param inElement: Входной элемент - показатель, что не требуется выполнять коннект к процессу + :param inFlagRaiseException: Флаг True - выкинуть ошибку в случае обнаружении пустого списка + :return: + ''' #Создать копию входного листа, чтобы не менять массив в других верхнеуровневых функциях inSpecificationList=copy.deepcopy(inSpecificationList) lResultList=[]