This commit is contained in:
Sven Riwoldt
2025-02-09 10:32:49 +01:00
commit 13d5229c3b
31 changed files with 8533 additions and 0 deletions

31
.github/ISSUE_TEMPLATE/bug_report.md vendored Executable file
View File

@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop/Laptop (please complete the following information):**
- OS: [e.g. Windows]
- Version [e.g. 1.0]
**Additional context**
Add any other context about the problem here.

3
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

10
.idea/PyRex-master.iml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,589 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="576">
<item index="0" class="java.lang.String" itemvalue="numba" />
<item index="1" class="java.lang.String" itemvalue="jupyterlab_widgets" />
<item index="2" class="java.lang.String" itemvalue="greenlet" />
<item index="3" class="java.lang.String" itemvalue="Babel" />
<item index="4" class="java.lang.String" itemvalue="PyQt5-sip" />
<item index="5" class="java.lang.String" itemvalue="executing" />
<item index="6" class="java.lang.String" itemvalue="jupyter-server-mathjax" />
<item index="7" class="java.lang.String" itemvalue="python-slugify" />
<item index="8" class="java.lang.String" itemvalue="affine" />
<item index="9" class="java.lang.String" itemvalue="torchvision" />
<item index="10" class="java.lang.String" itemvalue="pyct" />
<item index="11" class="java.lang.String" itemvalue="patsy" />
<item index="12" class="java.lang.String" itemvalue="asteval" />
<item index="13" class="java.lang.String" itemvalue="ipython-genutils" />
<item index="14" class="java.lang.String" itemvalue="trio" />
<item index="15" class="java.lang.String" itemvalue="PyNaCl" />
<item index="16" class="java.lang.String" itemvalue="langchain" />
<item index="17" class="java.lang.String" itemvalue="mccabe" />
<item index="18" class="java.lang.String" itemvalue="pycryptodomex" />
<item index="19" class="java.lang.String" itemvalue="bleach" />
<item index="20" class="java.lang.String" itemvalue="binaryornot" />
<item index="21" class="java.lang.String" itemvalue="jupyter_server_terminals" />
<item index="22" class="java.lang.String" itemvalue="lxml" />
<item index="23" class="java.lang.String" itemvalue="soupsieve" />
<item index="24" class="java.lang.String" itemvalue="jupyter_packaging" />
<item index="25" class="java.lang.String" itemvalue="torchaudio" />
<item index="26" class="java.lang.String" itemvalue="jsonschema" />
<item index="27" class="java.lang.String" itemvalue="readme-renderer" />
<item index="28" class="java.lang.String" itemvalue="scs" />
<item index="29" class="java.lang.String" itemvalue="Werkzeug" />
<item index="30" class="java.lang.String" itemvalue="mergedeep" />
<item index="31" class="java.lang.String" itemvalue="proglog" />
<item index="32" class="java.lang.String" itemvalue="traittypes" />
<item index="33" class="java.lang.String" itemvalue="asciitree" />
<item index="34" class="java.lang.String" itemvalue="gpytorch" />
<item index="35" class="java.lang.String" itemvalue="wordcloud" />
<item index="36" class="java.lang.String" itemvalue="pypdf" />
<item index="37" class="java.lang.String" itemvalue="click" />
<item index="38" class="java.lang.String" itemvalue="openai" />
<item index="39" class="java.lang.String" itemvalue="pydantic_core" />
<item index="40" class="java.lang.String" itemvalue="branca" />
<item index="41" class="java.lang.String" itemvalue="dash-core-components" />
<item index="42" class="java.lang.String" itemvalue="ipympl" />
<item index="43" class="java.lang.String" itemvalue="pythonnet" />
<item index="44" class="java.lang.String" itemvalue="jsonpatch" />
<item index="45" class="java.lang.String" itemvalue="httpcore" />
<item index="46" class="java.lang.String" itemvalue="idna" />
<item index="47" class="java.lang.String" itemvalue="pyepsg" />
<item index="48" class="java.lang.String" itemvalue="flit" />
<item index="49" class="java.lang.String" itemvalue="PlotPy" />
<item index="50" class="java.lang.String" itemvalue="cffi" />
<item index="51" class="java.lang.String" itemvalue="xyzservices" />
<item index="52" class="java.lang.String" itemvalue="jupyter-events" />
<item index="53" class="java.lang.String" itemvalue="holoviews" />
<item index="54" class="java.lang.String" itemvalue="azure-identity" />
<item index="55" class="java.lang.String" itemvalue="alabaster" />
<item index="56" class="java.lang.String" itemvalue="Deprecated" />
<item index="57" class="java.lang.String" itemvalue="panel" />
<item index="58" class="java.lang.String" itemvalue="deap" />
<item index="59" class="java.lang.String" itemvalue="PyOpenGL" />
<item index="60" class="java.lang.String" itemvalue="annotated-types" />
<item index="61" class="java.lang.String" itemvalue="msal" />
<item index="62" class="java.lang.String" itemvalue="waitress" />
<item index="63" class="java.lang.String" itemvalue="lz4" />
<item index="64" class="java.lang.String" itemvalue="requests-ntlm" />
<item index="65" class="java.lang.String" itemvalue="aiofiles" />
<item index="66" class="java.lang.String" itemvalue="jsonpointer" />
<item index="67" class="java.lang.String" itemvalue="imagesize" />
<item index="68" class="java.lang.String" itemvalue="pyserial" />
<item index="69" class="java.lang.String" itemvalue="et-xmlfile" />
<item index="70" class="java.lang.String" itemvalue="dash-table" />
<item index="71" class="java.lang.String" itemvalue="vega-datasets" />
<item index="72" class="java.lang.String" itemvalue="pylint" />
<item index="73" class="java.lang.String" itemvalue="debugpy" />
<item index="74" class="java.lang.String" itemvalue="statsmodels" />
<item index="75" class="java.lang.String" itemvalue="argon2-cffi" />
<item index="76" class="java.lang.String" itemvalue="multidict" />
<item index="77" class="java.lang.String" itemvalue="qpsolvers" />
<item index="78" class="java.lang.String" itemvalue="isort" />
<item index="79" class="java.lang.String" itemvalue="requests-toolbelt" />
<item index="80" class="java.lang.String" itemvalue="ujson" />
<item index="81" class="java.lang.String" itemvalue="pygame" />
<item index="82" class="java.lang.String" itemvalue="pywinpty" />
<item index="83" class="java.lang.String" itemvalue="opt-einsum" />
<item index="84" class="java.lang.String" itemvalue="mypy" />
<item index="85" class="java.lang.String" itemvalue="nltk" />
<item index="86" class="java.lang.String" itemvalue="h11" />
<item index="87" class="java.lang.String" itemvalue="partd" />
<item index="88" class="java.lang.String" itemvalue="colorcet" />
<item index="89" class="java.lang.String" itemvalue="filelock" />
<item index="90" class="java.lang.String" itemvalue="astropy" />
<item index="91" class="java.lang.String" itemvalue="pyparsing" />
<item index="92" class="java.lang.String" itemvalue="hyperlink" />
<item index="93" class="java.lang.String" itemvalue="isoduration" />
<item index="94" class="java.lang.String" itemvalue="tifffile" />
<item index="95" class="java.lang.String" itemvalue="iniconfig" />
<item index="96" class="java.lang.String" itemvalue="pynndescent" />
<item index="97" class="java.lang.String" itemvalue="cryptography" />
<item index="98" class="java.lang.String" itemvalue="altair" />
<item index="99" class="java.lang.String" itemvalue="whatthepatch" />
<item index="100" class="java.lang.String" itemvalue="pytorch-lightning" />
<item index="101" class="java.lang.String" itemvalue="marshmallow-enum" />
<item index="102" class="java.lang.String" itemvalue="argon2-cffi-bindings" />
<item index="103" class="java.lang.String" itemvalue="distlib" />
<item index="104" class="java.lang.String" itemvalue="langsmith" />
<item index="105" class="java.lang.String" itemvalue="shellingham" />
<item index="106" class="java.lang.String" itemvalue="geopy" />
<item index="107" class="java.lang.String" itemvalue="pathspec" />
<item index="108" class="java.lang.String" itemvalue="matplotlib-inline" />
<item index="109" class="java.lang.String" itemvalue="qrcode" />
<item index="110" class="java.lang.String" itemvalue="rope" />
<item index="111" class="java.lang.String" itemvalue="mypy-extensions" />
<item index="112" class="java.lang.String" itemvalue="wcwidth" />
<item index="113" class="java.lang.String" itemvalue="h2" />
<item index="114" class="java.lang.String" itemvalue="jupyter_core" />
<item index="115" class="java.lang.String" itemvalue="clarabel" />
<item index="116" class="java.lang.String" itemvalue="Jinja2" />
<item index="117" class="java.lang.String" itemvalue="rfc3986-validator" />
<item index="118" class="java.lang.String" itemvalue="typeguard" />
<item index="119" class="java.lang.String" itemvalue="mysql-connector-python" />
<item index="120" class="java.lang.String" itemvalue="tomlkit" />
<item index="121" class="java.lang.String" itemvalue="lmfit" />
<item index="122" class="java.lang.String" itemvalue="db.py" />
<item index="123" class="java.lang.String" itemvalue="hypercorn" />
<item index="124" class="java.lang.String" itemvalue="ntlm-auth" />
<item index="125" class="java.lang.String" itemvalue="pywin32-ctypes" />
<item index="126" class="java.lang.String" itemvalue="jupyter-bokeh" />
<item index="127" class="java.lang.String" itemvalue="tomli" />
<item index="128" class="java.lang.String" itemvalue="python-lsp-black" />
<item index="129" class="java.lang.String" itemvalue="msvc_runtime" />
<item index="130" class="java.lang.String" itemvalue="six" />
<item index="131" class="java.lang.String" itemvalue="pyflakes" />
<item index="132" class="java.lang.String" itemvalue="array_api_compat" />
<item index="133" class="java.lang.String" itemvalue="parso" />
<item index="134" class="java.lang.String" itemvalue="text-unidecode" />
<item index="135" class="java.lang.String" itemvalue="twine" />
<item index="136" class="java.lang.String" itemvalue="rich" />
<item index="137" class="java.lang.String" itemvalue="sqlite-bro" />
<item index="138" class="java.lang.String" itemvalue="dill" />
<item index="139" class="java.lang.String" itemvalue="packaging" />
<item index="140" class="java.lang.String" itemvalue="msal-extensions" />
<item index="141" class="java.lang.String" itemvalue="pdfrw" />
<item index="142" class="java.lang.String" itemvalue="chardet" />
<item index="143" class="java.lang.String" itemvalue="janus" />
<item index="144" class="java.lang.String" itemvalue="sphinxcontrib-jsmath" />
<item index="145" class="java.lang.String" itemvalue="psygnal" />
<item index="146" class="java.lang.String" itemvalue="click-plugins" />
<item index="147" class="java.lang.String" itemvalue="PyMeta3" />
<item index="148" class="java.lang.String" itemvalue="pmdarima" />
<item index="149" class="java.lang.String" itemvalue="httpx" />
<item index="150" class="java.lang.String" itemvalue="PySimpleGUI" />
<item index="151" class="java.lang.String" itemvalue="tabulate" />
<item index="152" class="java.lang.String" itemvalue="pickleshare" />
<item index="153" class="java.lang.String" itemvalue="defusedxml" />
<item index="154" class="java.lang.String" itemvalue="pycparser" />
<item index="155" class="java.lang.String" itemvalue="qstylizer" />
<item index="156" class="java.lang.String" itemvalue="cookiecutter" />
<item index="157" class="java.lang.String" itemvalue="docutils" />
<item index="158" class="java.lang.String" itemvalue="PyAudio" />
<item index="159" class="java.lang.String" itemvalue="pyproj" />
<item index="160" class="java.lang.String" itemvalue="uvicorn" />
<item index="161" class="java.lang.String" itemvalue="fuzzywuzzy" />
<item index="162" class="java.lang.String" itemvalue="qtconsole" />
<item index="163" class="java.lang.String" itemvalue="terminado" />
<item index="164" class="java.lang.String" itemvalue="GitPython" />
<item index="165" class="java.lang.String" itemvalue="portalocker" />
<item index="166" class="java.lang.String" itemvalue="pydantic" />
<item index="167" class="java.lang.String" itemvalue="mutagen" />
<item index="168" class="java.lang.String" itemvalue="hupper" />
<item index="169" class="java.lang.String" itemvalue="distributed" />
<item index="170" class="java.lang.String" itemvalue="reportlab" />
<item index="171" class="java.lang.String" itemvalue="ortools" />
<item index="172" class="java.lang.String" itemvalue="pydub" />
<item index="173" class="java.lang.String" itemvalue="QDarkStyle" />
<item index="174" class="java.lang.String" itemvalue="jupyterlab-pygments" />
<item index="175" class="java.lang.String" itemvalue="Flask-SQLAlchemy" />
<item index="176" class="java.lang.String" itemvalue="ipykernel" />
<item index="177" class="java.lang.String" itemvalue="wsproto" />
<item index="178" class="java.lang.String" itemvalue="attrs" />
<item index="179" class="java.lang.String" itemvalue="psutil" />
<item index="180" class="java.lang.String" itemvalue="PyQtWebEngine" />
<item index="181" class="java.lang.String" itemvalue="Quart" />
<item index="182" class="java.lang.String" itemvalue="platformdirs" />
<item index="183" class="java.lang.String" itemvalue="portpicker" />
<item index="184" class="java.lang.String" itemvalue="linear-operator" />
<item index="185" class="java.lang.String" itemvalue="scikit-optimize" />
<item index="186" class="java.lang.String" itemvalue="cma" />
<item index="187" class="java.lang.String" itemvalue="cytoolz" />
<item index="188" class="java.lang.String" itemvalue="pypandoc" />
<item index="189" class="java.lang.String" itemvalue="msgpack" />
<item index="190" class="java.lang.String" itemvalue="PyJWT" />
<item index="191" class="java.lang.String" itemvalue="folium" />
<item index="192" class="java.lang.String" itemvalue="pandocfilters" />
<item index="193" class="java.lang.String" itemvalue="sniffio" />
<item index="194" class="java.lang.String" itemvalue="XlsxWriter" />
<item index="195" class="java.lang.String" itemvalue="seaborn" />
<item index="196" class="java.lang.String" itemvalue="altair-data-server" />
<item index="197" class="java.lang.String" itemvalue="stack-data" />
<item index="198" class="java.lang.String" itemvalue="zipp" />
<item index="199" class="java.lang.String" itemvalue="pkginfo" />
<item index="200" class="java.lang.String" itemvalue="tenacity" />
<item index="201" class="java.lang.String" itemvalue="guidata" />
<item index="202" class="java.lang.String" itemvalue="snuggs" />
<item index="203" class="java.lang.String" itemvalue="itsdangerous" />
<item index="204" class="java.lang.String" itemvalue="outcome" />
<item index="205" class="java.lang.String" itemvalue="Flask-Session" />
<item index="206" class="java.lang.String" itemvalue="autopep8" />
<item index="207" class="java.lang.String" itemvalue="lazy_loader" />
<item index="208" class="java.lang.String" itemvalue="scipy" />
<item index="209" class="java.lang.String" itemvalue="hyperframe" />
<item index="210" class="java.lang.String" itemvalue="opencv-python" />
<item index="211" class="java.lang.String" itemvalue="tomli_w" />
<item index="212" class="java.lang.String" itemvalue="torch" />
<item index="213" class="java.lang.String" itemvalue="overrides" />
<item index="214" class="java.lang.String" itemvalue="toml" />
<item index="215" class="java.lang.String" itemvalue="mistune" />
<item index="216" class="java.lang.String" itemvalue="pandas" />
<item index="217" class="java.lang.String" itemvalue="pyaml" />
<item index="218" class="java.lang.String" itemvalue="Sphinx" />
<item index="219" class="java.lang.String" itemvalue="Django" />
<item index="220" class="java.lang.String" itemvalue="future" />
<item index="221" class="java.lang.String" itemvalue="namex" />
<item index="222" class="java.lang.String" itemvalue="cachetools" />
<item index="223" class="java.lang.String" itemvalue="textdistance" />
<item index="224" class="java.lang.String" itemvalue="PIMS" />
<item index="225" class="java.lang.String" itemvalue="imbalanced-learn" />
<item index="226" class="java.lang.String" itemvalue="notebook_shim" />
<item index="227" class="java.lang.String" itemvalue="rfc3339-validator" />
<item index="228" class="java.lang.String" itemvalue="arrow" />
<item index="229" class="java.lang.String" itemvalue="python-dateutil" />
<item index="230" class="java.lang.String" itemvalue="Brotli" />
<item index="231" class="java.lang.String" itemvalue="cvxopt" />
<item index="232" class="java.lang.String" itemvalue="setuptools" />
<item index="233" class="java.lang.String" itemvalue="MarkupSafe" />
<item index="234" class="java.lang.String" itemvalue="pg8000" />
<item index="235" class="java.lang.String" itemvalue="locket" />
<item index="236" class="java.lang.String" itemvalue="frozenlist" />
<item index="237" class="java.lang.String" itemvalue="snowballstemmer" />
<item index="238" class="java.lang.String" itemvalue="feather-format" />
<item index="239" class="java.lang.String" itemvalue="certifi" />
<item index="240" class="java.lang.String" itemvalue="anyio" />
<item index="241" class="java.lang.String" itemvalue="polars" />
<item index="242" class="java.lang.String" itemvalue="accelerate" />
<item index="243" class="java.lang.String" itemvalue="sympy" />
<item index="244" class="java.lang.String" itemvalue="xlwings" />
<item index="245" class="java.lang.String" itemvalue="dnspython" />
<item index="246" class="java.lang.String" itemvalue="jupyter_client" />
<item index="247" class="java.lang.String" itemvalue="hatch" />
<item index="248" class="java.lang.String" itemvalue="kiwisolver" />
<item index="249" class="java.lang.String" itemvalue="Pympler" />
<item index="250" class="java.lang.String" itemvalue="mdit-py-plugins" />
<item index="251" class="java.lang.String" itemvalue="autograd" />
<item index="252" class="java.lang.String" itemvalue="retrying" />
<item index="253" class="java.lang.String" itemvalue="anywidget" />
<item index="254" class="java.lang.String" itemvalue="charset-normalizer" />
<item index="255" class="java.lang.String" itemvalue="sphinxcontrib-jquery" />
<item index="256" class="java.lang.String" itemvalue="Pint" />
<item index="257" class="java.lang.String" itemvalue="alive-progress" />
<item index="258" class="java.lang.String" itemvalue="scikit-image" />
<item index="259" class="java.lang.String" itemvalue="baresql" />
<item index="260" class="java.lang.String" itemvalue="diff-match-patch" />
<item index="261" class="java.lang.String" itemvalue="pyro-api" />
<item index="262" class="java.lang.String" itemvalue="async-timeout" />
<item index="263" class="java.lang.String" itemvalue="more-itertools" />
<item index="264" class="java.lang.String" itemvalue="imageio-ffmpeg" />
<item index="265" class="java.lang.String" itemvalue="cloudpickle" />
<item index="266" class="java.lang.String" itemvalue="importlib-metadata" />
<item index="267" class="java.lang.String" itemvalue="pybars3" />
<item index="268" class="java.lang.String" itemvalue="simplegeneric" />
<item index="269" class="java.lang.String" itemvalue="jsonschema-specifications" />
<item index="270" class="java.lang.String" itemvalue="nbdime" />
<item index="271" class="java.lang.String" itemvalue="urllib3" />
<item index="272" class="java.lang.String" itemvalue="Cython" />
<item index="273" class="java.lang.String" itemvalue="pypng" />
<item index="274" class="java.lang.String" itemvalue="pymongo" />
<item index="275" class="java.lang.String" itemvalue="wheel" />
<item index="276" class="java.lang.String" itemvalue="nbformat" />
<item index="277" class="java.lang.String" itemvalue="GDAL" />
<item index="278" class="java.lang.String" itemvalue="cachelib" />
<item index="279" class="java.lang.String" itemvalue="ipycanvas" />
<item index="280" class="java.lang.String" itemvalue="prometheus-client" />
<item index="281" class="java.lang.String" itemvalue="ipyleaflet" />
<item index="282" class="java.lang.String" itemvalue="typing-inspect" />
<item index="283" class="java.lang.String" itemvalue="altair-transform" />
<item index="284" class="java.lang.String" itemvalue="colorama" />
<item index="285" class="java.lang.String" itemvalue="pillow" />
<item index="286" class="java.lang.String" itemvalue="formlayout" />
<item index="287" class="java.lang.String" itemvalue="langchain-text-splitters" />
<item index="288" class="java.lang.String" itemvalue="ply" />
<item index="289" class="java.lang.String" itemvalue="aiosignal" />
<item index="290" class="java.lang.String" itemvalue="hypothesis" />
<item index="291" class="java.lang.String" itemvalue="openpyxl" />
<item index="292" class="java.lang.String" itemvalue="torchmetrics" />
<item index="293" class="java.lang.String" itemvalue="tzlocal" />
<item index="294" class="java.lang.String" itemvalue="loky" />
<item index="295" class="java.lang.String" itemvalue="scikit-learn" />
<item index="296" class="java.lang.String" itemvalue="pymoo" />
<item index="297" class="java.lang.String" itemvalue="datashader" />
<item index="298" class="java.lang.String" itemvalue="marshmallow" />
<item index="299" class="java.lang.String" itemvalue="gitdb" />
<item index="300" class="java.lang.String" itemvalue="jupyter-sphinx" />
<item index="301" class="java.lang.String" itemvalue="markdown-it-py" />
<item index="302" class="java.lang.String" itemvalue="langchain-community" />
<item index="303" class="java.lang.String" itemvalue="dirty-cat" />
<item index="304" class="java.lang.String" itemvalue="starlette" />
<item index="305" class="java.lang.String" itemvalue="wasmer-compiler-singlepass" />
<item index="306" class="java.lang.String" itemvalue="lightning" />
<item index="307" class="java.lang.String" itemvalue="netCDF4" />
<item index="308" class="java.lang.String" itemvalue="streamlit" />
<item index="309" class="java.lang.String" itemvalue="sqlite-fts4" />
<item index="310" class="java.lang.String" itemvalue="asgiref" />
<item index="311" class="java.lang.String" itemvalue="contourpy" />
<item index="312" class="java.lang.String" itemvalue="prettytable" />
<item index="313" class="java.lang.String" itemvalue="paramiko" />
<item index="314" class="java.lang.String" itemvalue="regex" />
<item index="315" class="java.lang.String" itemvalue="pyqtgraph" />
<item index="316" class="java.lang.String" itemvalue="asttokens" />
<item index="317" class="java.lang.String" itemvalue="imageio" />
<item index="318" class="java.lang.String" itemvalue="pyro-ppl" />
<item index="319" class="java.lang.String" itemvalue="matplotlib" />
<item index="320" class="java.lang.String" itemvalue="mercantile" />
<item index="321" class="java.lang.String" itemvalue="Mako" />
<item index="322" class="java.lang.String" itemvalue="referencing" />
<item index="323" class="java.lang.String" itemvalue="networkx" />
<item index="324" class="java.lang.String" itemvalue="pygad" />
<item index="325" class="java.lang.String" itemvalue="smmap" />
<item index="326" class="java.lang.String" itemvalue="json5" />
<item index="327" class="java.lang.String" itemvalue="pyerfa" />
<item index="328" class="java.lang.String" itemvalue="pluggy" />
<item index="329" class="java.lang.String" itemvalue="pep8" />
<item index="330" class="java.lang.String" itemvalue="Rtree" />
<item index="331" class="java.lang.String" itemvalue="snakeviz" />
<item index="332" class="java.lang.String" itemvalue="highspy" />
<item index="333" class="java.lang.String" itemvalue="numpy" />
<item index="334" class="java.lang.String" itemvalue="PuLP" />
<item index="335" class="java.lang.String" itemvalue="ppci" />
<item index="336" class="java.lang.String" itemvalue="jupyter" />
<item index="337" class="java.lang.String" itemvalue="editables" />
<item index="338" class="java.lang.String" itemvalue="mdurl" />
<item index="339" class="java.lang.String" itemvalue="prompt-toolkit" />
<item index="340" class="java.lang.String" itemvalue="QtAwesome" />
<item index="341" class="java.lang.String" itemvalue="userpath" />
<item index="342" class="java.lang.String" itemvalue="linkify-it-py" />
<item index="343" class="java.lang.String" itemvalue="PyQtWebEngine-Qt5" />
<item index="344" class="java.lang.String" itemvalue="websockets" />
<item index="345" class="java.lang.String" itemvalue="jaraco.classes" />
<item index="346" class="java.lang.String" itemvalue="python-lsp-jsonrpc" />
<item index="347" class="java.lang.String" itemvalue="pytoolconfig" />
<item index="348" class="java.lang.String" itemvalue="trove-classifiers" />
<item index="349" class="java.lang.String" itemvalue="Rx" />
<item index="350" class="java.lang.String" itemvalue="papermill" />
<item index="351" class="java.lang.String" itemvalue="black" />
<item index="352" class="java.lang.String" itemvalue="Send2Trash" />
<item index="353" class="java.lang.String" itemvalue="mpl-scatter-density" />
<item index="354" class="java.lang.String" itemvalue="pytz-deprecation-shim" />
<item index="355" class="java.lang.String" itemvalue="watchdog" />
<item index="356" class="java.lang.String" itemvalue="spyder" />
<item index="357" class="java.lang.String" itemvalue="swifter" />
<item index="358" class="java.lang.String" itemvalue="Flask-Mail" />
<item index="359" class="java.lang.String" itemvalue="pytz" />
<item index="360" class="java.lang.String" itemvalue="keyring" />
<item index="361" class="java.lang.String" itemvalue="traitlets" />
<item index="362" class="java.lang.String" itemvalue="absl-py" />
<item index="363" class="java.lang.String" itemvalue="protobuf" />
<item index="364" class="java.lang.String" itemvalue="python-lsp-server" />
<item index="365" class="java.lang.String" itemvalue="shapely" />
<item index="366" class="java.lang.String" itemvalue="filterpy" />
<item index="367" class="java.lang.String" itemvalue="graphql-relay" />
<item index="368" class="java.lang.String" itemvalue="cvxpy" />
<item index="369" class="java.lang.String" itemvalue="joblib" />
<item index="370" class="java.lang.String" itemvalue="atomicwrites" />
<item index="371" class="java.lang.String" itemvalue="python-dotenv" />
<item index="372" class="java.lang.String" itemvalue="tinycss2" />
<item index="373" class="java.lang.String" itemvalue="fsspec" />
<item index="374" class="java.lang.String" itemvalue="PyQt5-Qt5" />
<item index="375" class="java.lang.String" itemvalue="python-json-logger" />
<item index="376" class="java.lang.String" itemvalue="docopt" />
<item index="377" class="java.lang.String" itemvalue="numpydoc" />
<item index="378" class="java.lang.String" itemvalue="pyzmq" />
<item index="379" class="java.lang.String" itemvalue="keras" />
<item index="380" class="java.lang.String" itemvalue="PythonQwt" />
<item index="381" class="java.lang.String" itemvalue="entrypoints" />
<item index="382" class="java.lang.String" itemvalue="optuna" />
<item index="383" class="java.lang.String" itemvalue="beautifulsoup4" />
<item index="384" class="java.lang.String" itemvalue="flit_core" />
<item index="385" class="java.lang.String" itemvalue="tokenizers" />
<item index="386" class="java.lang.String" itemvalue="fqdn" />
<item index="387" class="java.lang.String" itemvalue="orjson" />
<item index="388" class="java.lang.String" itemvalue="deprecation" />
<item index="389" class="java.lang.String" itemvalue="sqlite-utils" />
<item index="390" class="java.lang.String" itemvalue="sspyrs" />
<item index="391" class="java.lang.String" itemvalue="bcrypt" />
<item index="392" class="java.lang.String" itemvalue="grapheme" />
<item index="393" class="java.lang.String" itemvalue="numcodecs" />
<item index="394" class="java.lang.String" itemvalue="xarray" />
<item index="395" class="java.lang.String" itemvalue="asgi-csrf" />
<item index="396" class="java.lang.String" itemvalue="widgetsnbextension" />
<item index="397" class="java.lang.String" itemvalue="plotnine" />
<item index="398" class="java.lang.String" itemvalue="multipledispatch" />
<item index="399" class="java.lang.String" itemvalue="mizani" />
<item index="400" class="java.lang.String" itemvalue="numexpr" />
<item index="401" class="java.lang.String" itemvalue="distro" />
<item index="402" class="java.lang.String" itemvalue="webcolors" />
<item index="403" class="java.lang.String" itemvalue="hvplot" />
<item index="404" class="java.lang.String" itemvalue="yapf" />
<item index="405" class="java.lang.String" itemvalue="llvmlite" />
<item index="406" class="java.lang.String" itemvalue="wasmer" />
<item index="407" class="java.lang.String" itemvalue="graphene" />
<item index="408" class="java.lang.String" itemvalue="nbval" />
<item index="409" class="java.lang.String" itemvalue="uri-template" />
<item index="410" class="java.lang.String" itemvalue="sounddevice" />
<item index="411" class="java.lang.String" itemvalue="param" />
<item index="412" class="java.lang.String" itemvalue="lightning-utilities" />
<item index="413" class="java.lang.String" itemvalue="pylint-venv" />
<item index="414" class="java.lang.String" itemvalue="click-default-group" />
<item index="415" class="java.lang.String" itemvalue="python-barcode" />
<item index="416" class="java.lang.String" itemvalue="three-merge" />
<item index="417" class="java.lang.String" itemvalue="coverage" />
<item index="418" class="java.lang.String" itemvalue="asn1crypto" />
<item index="419" class="java.lang.String" itemvalue="pyproject_hooks" />
<item index="420" class="java.lang.String" itemvalue="dask-image" />
<item index="421" class="java.lang.String" itemvalue="ipython" />
<item index="422" class="java.lang.String" itemvalue="adodbapi" />
<item index="423" class="java.lang.String" itemvalue="fastjsonschema" />
<item index="424" class="java.lang.String" itemvalue="pybind11" />
<item index="425" class="java.lang.String" itemvalue="aiohttp" />
<item index="426" class="java.lang.String" itemvalue="async-lru" />
<item index="427" class="java.lang.String" itemvalue="mlxtend" />
<item index="428" class="java.lang.String" itemvalue="PyYAML" />
<item index="429" class="java.lang.String" itemvalue="mpld3" />
<item index="430" class="java.lang.String" itemvalue="rfc3986" />
<item index="431" class="java.lang.String" itemvalue="redis" />
<item index="432" class="java.lang.String" itemvalue="pywinusb" />
<item index="433" class="java.lang.String" itemvalue="pyls-spyder" />
<item index="434" class="java.lang.String" itemvalue="Pygments" />
<item index="435" class="java.lang.String" itemvalue="umap-learn" />
<item index="436" class="java.lang.String" itemvalue="PyQt5" />
<item index="437" class="java.lang.String" itemvalue="moviepy" />
<item index="438" class="java.lang.String" itemvalue="sphinxcontrib-qthelp" />
<item index="439" class="java.lang.String" itemvalue="fast-histogram" />
<item index="440" class="java.lang.String" itemvalue="pywin32" />
<item index="441" class="java.lang.String" itemvalue="comm" />
<item index="442" class="java.lang.String" itemvalue="transformers" />
<item index="443" class="java.lang.String" itemvalue="aniso8601" />
<item index="444" class="java.lang.String" itemvalue="graphql-core" />
<item index="445" class="java.lang.String" itemvalue="Pyomo" />
<item index="446" class="java.lang.String" itemvalue="rapidfuzz" />
<item index="447" class="java.lang.String" itemvalue="pexpect" />
<item index="448" class="java.lang.String" itemvalue="priority" />
<item index="449" class="java.lang.String" itemvalue="ecos" />
<item index="450" class="java.lang.String" itemvalue="nbconvert" />
<item index="451" class="java.lang.String" itemvalue="streamz" />
<item index="452" class="java.lang.String" itemvalue="supersmoother" />
<item index="453" class="java.lang.String" itemvalue="simplejson" />
<item index="454" class="java.lang.String" itemvalue="dataclasses-json" />
<item index="455" class="java.lang.String" itemvalue="jedi" />
<item index="456" class="java.lang.String" itemvalue="rasterio" />
<item index="457" class="java.lang.String" itemvalue="jupyter_server" />
<item index="458" class="java.lang.String" itemvalue="pure-eval" />
<item index="459" class="java.lang.String" itemvalue="ptpython" />
<item index="460" class="java.lang.String" itemvalue="optree" />
<item index="461" class="java.lang.String" itemvalue="pydocstyle" />
<item index="462" class="java.lang.String" itemvalue="datasette-graphql" />
<item index="463" class="java.lang.String" itemvalue="ansi2html" />
<item index="464" class="java.lang.String" itemvalue="decorator" />
<item index="465" class="java.lang.String" itemvalue="alembic" />
<item index="466" class="java.lang.String" itemvalue="jellyfish" />
<item index="467" class="java.lang.String" itemvalue="pycodestyle" />
<item index="468" class="java.lang.String" itemvalue="pycosat" />
<item index="469" class="java.lang.String" itemvalue="requests" />
<item index="470" class="java.lang.String" itemvalue="brewer2mpl" />
<item index="471" class="java.lang.String" itemvalue="websocket-client" />
<item index="472" class="java.lang.String" itemvalue="sphinxcontrib-devhelp" />
<item index="473" class="java.lang.String" itemvalue="kornia" />
<item index="474" class="java.lang.String" itemvalue="julia" />
<item index="475" class="java.lang.String" itemvalue="nest-asyncio" />
<item index="476" class="java.lang.String" itemvalue="emcee" />
<item index="477" class="java.lang.String" itemvalue="ml-dtypes" />
<item index="478" class="java.lang.String" itemvalue="ipywidgets" />
<item index="479" class="java.lang.String" itemvalue="blinker" />
<item index="480" class="java.lang.String" itemvalue="pyarrow" />
<item index="481" class="java.lang.String" itemvalue="quantecon" />
<item index="482" class="java.lang.String" itemvalue="tornado" />
<item index="483" class="java.lang.String" itemvalue="plotly" />
<item index="484" class="java.lang.String" itemvalue="python-multipart" />
<item index="485" class="java.lang.String" itemvalue="hpack" />
<item index="486" class="java.lang.String" itemvalue="sortedcontainers" />
<item index="487" class="java.lang.String" itemvalue="fiona" />
<item index="488" class="java.lang.String" itemvalue="cftime" />
<item index="489" class="java.lang.String" itemvalue="toolz" />
<item index="490" class="java.lang.String" itemvalue="mpmath" />
<item index="491" class="java.lang.String" itemvalue="jupyter-console" />
<item index="492" class="java.lang.String" itemvalue="typing_extensions" />
<item index="493" class="java.lang.String" itemvalue="bokeh" />
<item index="494" class="java.lang.String" itemvalue="langchain-core" />
<item index="495" class="java.lang.String" itemvalue="slicerator" />
<item index="496" class="java.lang.String" itemvalue="yarl" />
<item index="497" class="java.lang.String" itemvalue="hatchling" />
<item index="498" class="java.lang.String" itemvalue="webencodings" />
<item index="499" class="java.lang.String" itemvalue="inflection" />
<item index="500" class="java.lang.String" itemvalue="sphinxcontrib-applehelp" />
<item index="501" class="java.lang.String" itemvalue="datasette" />
<item index="502" class="java.lang.String" itemvalue="html5lib" />
<item index="503" class="java.lang.String" itemvalue="colorlog" />
<item index="504" class="java.lang.String" itemvalue="missingno" />
<item index="505" class="java.lang.String" itemvalue="threadpoolctl" />
<item index="506" class="java.lang.String" itemvalue="huggingface-hub" />
<item index="507" class="java.lang.String" itemvalue="scramp" />
<item index="508" class="java.lang.String" itemvalue="about-time" />
<item index="509" class="java.lang.String" itemvalue="nbclient" />
<item index="510" class="java.lang.String" itemvalue="spyder-kernels" />
<item index="511" class="java.lang.String" itemvalue="QtPy" />
<item index="512" class="java.lang.String" itemvalue="astroid" />
<item index="513" class="java.lang.String" itemvalue="cycler" />
<item index="514" class="java.lang.String" itemvalue="appdirs" />
<item index="515" class="java.lang.String" itemvalue="safetensors" />
<item index="516" class="java.lang.String" itemvalue="Markdown" />
<item index="517" class="java.lang.String" itemvalue="uncertainties" />
<item index="518" class="java.lang.String" itemvalue="intervaltree" />
<item index="519" class="java.lang.String" itemvalue="notebook" />
<item index="520" class="java.lang.String" itemvalue="zarr" />
<item index="521" class="java.lang.String" itemvalue="jupyter-lsp" />
<item index="522" class="java.lang.String" itemvalue="pyodbc" />
<item index="523" class="java.lang.String" itemvalue="simpy" />
<item index="524" class="java.lang.String" itemvalue="cligj" />
<item index="525" class="java.lang.String" itemvalue="h5py" />
<item index="526" class="java.lang.String" itemvalue="wrapt" />
<item index="527" class="java.lang.String" itemvalue="sphinxcontrib-htmlhelp" />
<item index="528" class="java.lang.String" itemvalue="jupyterlab_server" />
<item index="529" class="java.lang.String" itemvalue="clr-loader" />
<item index="530" class="java.lang.String" itemvalue="winpython" />
<item index="531" class="java.lang.String" itemvalue="fonttools" />
<item index="532" class="java.lang.String" itemvalue="wasmer-compiler-cranelift" />
<item index="533" class="java.lang.String" itemvalue="duckdb" />
<item index="534" class="java.lang.String" itemvalue="PySocks" />
<item index="535" class="java.lang.String" itemvalue="httpie" />
<item index="536" class="java.lang.String" itemvalue="geopandas" />
<item index="537" class="java.lang.String" itemvalue="virtualenv" />
<item index="538" class="java.lang.String" itemvalue="uc-micro-py" />
<item index="539" class="java.lang.String" itemvalue="dask" />
<item index="540" class="java.lang.String" itemvalue="jaxtyping" />
<item index="541" class="java.lang.String" itemvalue="dash" />
<item index="542" class="java.lang.String" itemvalue="pyviz_comms" />
<item index="543" class="java.lang.String" itemvalue="maturin" />
<item index="544" class="java.lang.String" itemvalue="pydeck" />
<item index="545" class="java.lang.String" itemvalue="ptyprocess" />
<item index="546" class="java.lang.String" itemvalue="yt-dlp" />
<item index="547" class="java.lang.String" itemvalue="docstring-to-markdown" />
<item index="548" class="java.lang.String" itemvalue="SQLAlchemy" />
<item index="549" class="java.lang.String" itemvalue="tblib" />
<item index="550" class="java.lang.String" itemvalue="flake8" />
<item index="551" class="java.lang.String" itemvalue="azure-cosmos" />
<item index="552" class="java.lang.String" itemvalue="clrmagic" />
<item index="553" class="java.lang.String" itemvalue="sqlparse" />
<item index="554" class="java.lang.String" itemvalue="rpds-py" />
<item index="555" class="java.lang.String" itemvalue="aiosqlite" />
<item index="556" class="java.lang.String" itemvalue="geographiclib" />
<item index="557" class="java.lang.String" itemvalue="zict" />
<item index="558" class="java.lang.String" itemvalue="xmltodict" />
<item index="559" class="java.lang.String" itemvalue="jupyterlab" />
<item index="560" class="java.lang.String" itemvalue="Flask" />
<item index="561" class="java.lang.String" itemvalue="tbats" />
<item index="562" class="java.lang.String" itemvalue="ipython-sql" />
<item index="563" class="java.lang.String" itemvalue="pytest" />
<item index="564" class="java.lang.String" itemvalue="sphinx-rtd-theme" />
<item index="565" class="java.lang.String" itemvalue="sphinxcontrib-serializinghtml" />
<item index="566" class="java.lang.String" itemvalue="dash-html-components" />
<item index="567" class="java.lang.String" itemvalue="tzdata" />
<item index="568" class="java.lang.String" itemvalue="pystache" />
<item index="569" class="java.lang.String" itemvalue="botorch" />
<item index="570" class="java.lang.String" itemvalue="zstandard" />
<item index="571" class="java.lang.String" itemvalue="tqdm" />
<item index="572" class="java.lang.String" itemvalue="fastapi" />
<item index="573" class="java.lang.String" itemvalue="build" />
<item index="574" class="java.lang.String" itemvalue="fasteners" />
<item index="575" class="java.lang.String" itemvalue="azure-core" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (PyRex-master)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/PyRex-master.iml" filepath="$PROJECT_DIR$/.idea/PyRex-master.iml" />
</modules>
</component>
</project>

BIN
Example.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

21
LICENSE Executable file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 user0706
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

42
PyRex/.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="510b60e1-1817-48bd-9df0-5265c65edcee" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 1
}]]></component>
<component name="ProjectId" id="2snYfcM3OXJ16VhJGoejKX3oCLy" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.ShowReadmeOnStart": "true",
"com.codeium.enabled": "true"
}
}]]></component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-python-sdk-d7ad00fb9fc3-c546a90a8094-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-242.23726.102" />
</set>
</attachedChunks>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="510b60e1-1817-48bd-9df0-5265c65edcee" name="Changes" comment="" />
<created>1739092909700</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1739092909700</updated>
</task>
<servers />
</component>
</project>

250
Qt_ui/generator.ui Executable file
View File

@@ -0,0 +1,250 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CodeGenerator</class>
<widget class="QMainWindow" name="CodeGenerator">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>333</height>
</rect>
</property>
<property name="windowTitle">
<string>PyRex Code Generaotr</string>
</property>
<property name="windowIcon">
<iconset resource="src.qrc">
<normaloff>:/icons/icons/icon.ico</normaloff>:/icons/icons/icon.ico</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTextEdit" name="textEdit">
<property name="styleSheet">
<string notr="true">border-bottom: 2px;
border-style: solid;
border-bottom-color: rgb(255, 85, 0);</string>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;import re&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;regex = r&amp;quot;&amp;lt;CHANGE_ME&amp;gt;pattern&amp;lt;CHANGE_ME&amp;gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;test_str = &amp;quot;&amp;lt;CHANGE_ME&amp;gt;string&amp;lt;CHANGE_ME&amp;gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;matches = re.finditer(regex, test_str, re.MULTILINE)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;for matchNum, match in enumerate(matches, start=1):&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; print (&amp;quot;Match {matchNum} was found at {start}-{end}: {match}&amp;quot;.format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; for groupNum in range(0, len(match.groups())):&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; groupNum = groupNum + 1&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; print (&amp;quot;Group {groupNum} found at {start}-{end}: {group}&amp;quot;.format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QPushButton" name="CopyPushButton">
<property name="styleSheet">
<string notr="true">QPushButton#CopyPushButton {
min-width:60px;
max-width:60px;
min-height:35;
max-height:35;
color: #495057;
background: rgba(255,255,255,100%);
border-bottom: 2px;
border-style: solid;
border-bottom-color: rgba(0,0,0,.3);
border-top-left-radius: 0px;
border-top-right-radius: 3px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
QPushButton#CopyPushButton:hover {
background: rgba(255,255,255,50%);
border-bottom-color:rgb(255, 85, 0);
}
QPushButton#CopyPushButton:pressed {
background: rgba(255,255,255,100%);
border-bottom-color:rgb(255, 85, 0);
}
QPushButton#CopyPushButton:disabled {
background: rgba(0,0,0,.04);
border-bottom-color: rgba(0,0,0,.15);
}</string>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QPushButton" name="ClosePushButton">
<property name="styleSheet">
<string notr="true">QPushButton#ClosePushButton {
min-width:60px;
max-width:60px;
min-height:35;
max-height:35;
color: #495057;
background: rgba(255,255,255,100%);
border-bottom: 2px;
border-style: solid;
border-bottom-color: rgba(0,0,0,.3);
border-top-left-radius: 0px;
border-top-right-radius: 3px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
QPushButton#ClosePushButton:hover {
background: rgba(255,255,255,50%);
border-bottom-color:rgb(255, 85, 0);
}
QPushButton#ClosePushButton:pressed {
background: rgba(255,255,255,100%);
border-bottom-color:rgb(255, 85, 0);
}
QPushButton#ClosePushButton:disabled {
background: rgba(0,0,0,.04);
border-bottom-color: rgba(0,0,0,.15);
}</string>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources>
<include location="src.qrc"/>
</resources>
<connections>
<connection>
<sender>ClosePushButton</sender>
<signal>clicked()</signal>
<receiver>CodeGenerator</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>432</x>
<y>560</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>299</y>
</hint>
</hints>
</connection>
<connection>
<sender>CopyPushButton</sender>
<signal>clicked()</signal>
<receiver>textEdit</receiver>
<slot>selectAll()</slot>
<hints>
<hint type="sourcelabel">
<x>366</x>
<y>560</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>280</y>
</hint>
</hints>
</connection>
<connection>
<sender>CopyPushButton</sender>
<signal>clicked()</signal>
<receiver>textEdit</receiver>
<slot>copy()</slot>
<hints>
<hint type="sourcelabel">
<x>366</x>
<y>560</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>280</y>
</hint>
</hints>
</connection>
</connections>
</ui>

73
Qt_ui/icons/code.svg Executable file
View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="code.svg"
id="svg9"
version="1.1"
viewBox="0 0 24 24"
height="24px"
width="24px">
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs13" />
<sodipodi:namedview
inkscape:current-layer="svg9"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="12"
inkscape:cx="12"
inkscape:zoom="22.416667"
showgrid="false"
id="namedview11"
inkscape:window-height="748"
inkscape:window-width="1280"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<!-- Uploaded to SVGRepo https://www.svgrepo.com -->
<title
id="title2">ic_fluent_code_24_regular</title>
<desc
id="desc4">Created with Sketch.</desc>
<g
style="fill:#ffffff"
fill-rule="evenodd"
fill="none"
stroke-width="1"
stroke="none"
id="🔍-Product-Icons">
<g
style="fill:#ffffff"
fill-rule="nonzero"
fill="#212121"
id="ic_fluent_code_24_regular">
<path
style="fill:#ffffff"
id="🎨-Color"
d="M8.06561801,18.9432081 L14.565618,4.44320807 C14.7350545,4.06523433 15.1788182,3.8961815 15.5567919,4.06561801 C15.9032679,4.2209348 16.0741922,4.60676263 15.9697642,4.9611247 L15.934382,5.05679193 L9.43438199,19.5567919 C9.26494549,19.9347657 8.82118181,20.1038185 8.44320807,19.934382 C8.09673215,19.7790652 7.92580781,19.3932374 8.03023576,19.0388753 L8.06561801,18.9432081 L14.565618,4.44320807 L8.06561801,18.9432081 Z M2.21966991,11.4696699 L6.46966991,7.21966991 C6.76256313,6.9267767 7.23743687,6.9267767 7.53033009,7.21966991 C7.79659665,7.48593648 7.8208027,7.90260016 7.60294824,8.19621165 L7.53033009,8.28033009 L3.81066017,12 L7.53033009,15.7196699 C7.8232233,16.0125631 7.8232233,16.4874369 7.53033009,16.7803301 C7.26406352,17.0465966 6.84739984,17.0708027 6.55378835,16.8529482 L6.46966991,16.7803301 L2.21966991,12.5303301 C1.95340335,12.2640635 1.9291973,11.8473998 2.14705176,11.5537883 L2.21966991,11.4696699 L6.46966991,7.21966991 L2.21966991,11.4696699 Z M16.4696699,7.21966991 C16.7359365,6.95340335 17.1526002,6.9291973 17.4462117,7.14705176 L17.5303301,7.21966991 L21.7803301,11.4696699 C22.0465966,11.7359365 22.0708027,12.1526002 21.8529482,12.4462117 L21.7803301,12.5303301 L17.5303301,16.7803301 C17.2374369,17.0732233 16.7625631,17.0732233 16.4696699,16.7803301 C16.2034034,16.5140635 16.1791973,16.0973998 16.3970518,15.8037883 L16.4696699,15.7196699 L20.1893398,12 L16.4696699,8.28033009 C16.1767767,7.98743687 16.1767767,7.51256313 16.4696699,7.21966991 Z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
Qt_ui/icons/icon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

73
Qt_ui/icons/info.svg Executable file
View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="info.svg"
id="svg9"
version="1.1"
viewBox="0 0 24 24"
height="24px"
width="24px">
<metadata
id="metadata15">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs13" />
<sodipodi:namedview
inkscape:current-layer="svg9"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="12"
inkscape:cx="12"
inkscape:zoom="22.416667"
showgrid="false"
id="namedview11"
inkscape:window-height="748"
inkscape:window-width="1280"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<!-- Uploaded to SVGRepo https://www.svgrepo.com -->
<title
id="title2">ic_fluent_book_formula_information_24_regular</title>
<desc
id="desc4">Created with Sketch.</desc>
<g
style="fill:#ffffff"
fill-rule="evenodd"
fill="none"
stroke-width="1"
stroke="none"
id="🔍-System-Icons">
<g
style="fill:#ffffff"
fill-rule="nonzero"
fill="#212121"
id="ic_fluent_book_formula_information_24_regular">
<path
style="fill:#ffffff"
id="🎨-Color"
d="M18,2 C19.3807,2 20.5,3.11929 20.5,4.5 L20.5,18.75 C20.5,19.1642 20.1642,19.5 19.75,19.5 L5.5,19.5 C5.5,20.0523 5.94772,20.5 6.5,20.5 L19.75,20.5 C20.1642,20.5 20.5,20.8358 20.5,21.25 C20.5,21.6642 20.1642,22 19.75,22 L6.5,22 C5.11929,22 4,20.8807 4,19.5 L4,4.5 C4,3.11929 5.11929,2 6.5,2 L18,2 Z M18,3.5 L6.5,3.5 C5.94772,3.5 5.5,3.94772 5.5,4.5 L5.5,18 L19,18 L19,4.5 C19,3.94772 18.5523,3.5 18,3.5 Z M12.25,9 C12.6296833,9 12.9434889,9.28215687 12.9931531,9.64823019 L13,9.75 L13,14.75 C13,15.1642 12.6642,15.5 12.25,15.5 C11.8703167,15.5 11.5565111,15.2178347 11.5068469,14.8517677 L11.5,14.75 L11.5,9.75 C11.5,9.33579 11.8358,9 12.25,9 Z M12.25,6 C12.8023,6 13.25,6.44772 13.25,7 C13.25,7.55228 12.8023,8 12.25,8 C11.6977,8 11.25,7.55228 11.25,7 C11.25,6.44772 11.6977,6 12.25,6 Z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
Qt_ui/icons/logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

73
Qt_ui/icons/sheet.svg Executable file
View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="sheet.svg"
id="svg862"
version="1.1"
viewBox="0 0 24 24"
height="24px"
width="24px">
<metadata
id="metadata868">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs866" />
<sodipodi:namedview
inkscape:current-layer="svg862"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="12"
inkscape:cx="12"
inkscape:zoom="22.416667"
showgrid="false"
id="namedview864"
inkscape:window-height="748"
inkscape:window-width="1280"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<!-- Uploaded to SVGRepo https://www.svgrepo.com -->
<title
id="title855">ic_fluent_text_bullet_list_square_24_regular</title>
<desc
id="desc857">Created with Sketch.</desc>
<g
style="fill:#ffffff"
fill-rule="evenodd"
fill="none"
stroke-width="1"
stroke="none"
id="🔍-System-Icons">
<g
style="fill:#ffffff"
fill-rule="nonzero"
fill="#212121"
id="ic_fluent_text_bullet_list_square_24_regular">
<path
style="fill:#ffffff"
id="🎨-Color"
d="M18.75,3 C19.940825,3 20.9156417,3.92516222 20.994809,5.09595127 L21,5.25 L21,18.75 C21,19.940825 20.074801,20.9156417 18.9040441,20.994809 L18.75,21 L5.25,21 C4.05913667,21 3.08435514,20.074801 3.00519082,18.9040441 L3,18.75 L3,5.25 C3,4.05913667 3.92516222,3.08435514 5.09595127,3.00519082 L5.25,3 L18.75,3 Z M18.75,4.5 L5.25,4.5 C4.8703075,4.5 4.55650958,4.78215688 4.50684668,5.14823019 L4.5,5.25 L4.5,18.75 C4.5,19.1296833 4.78215688,19.4434889 5.14823019,19.4931531 L5.25,19.5 L18.75,19.5 C19.1296833,19.5 19.4434889,19.2178347 19.4931531,18.8517677 L19.5,18.75 L19.5,5.25 C19.5,4.8703075 19.2178347,4.55650958 18.8517677,4.50684668 L18.75,4.5 Z M7.75,14.75 C8.30228,14.75 8.75,15.1977 8.75,15.75 C8.75,16.3023 8.30228,16.75 7.75,16.75 C7.19772,16.75 6.75,16.3023 6.75,15.75 C6.75,15.1977 7.19772,14.75 7.75,14.75 Z M16.7499,15 C17.1642,15 17.4999,15.3358 17.4999,15.75 C17.4999,16.1296833 17.2178188,16.4434889 16.8516887,16.4931531 L16.7499,16.5 L11.2501,16.5 C10.8358,16.5 10.5001,16.1642 10.5001,15.75 C10.5001,15.3703167 10.7821813,15.0565111 11.1483113,15.0068469 L11.2501,15 L16.7499,15 Z M7.75,11 C8.30228,11 8.75,11.4477 8.75,12 C8.75,12.5523 8.30228,13 7.75,13 C7.19772,13 6.75,12.5523 6.75,12 C6.75,11.4477 7.19772,11 7.75,11 Z M16.7499,11.25 C17.1642,11.25 17.4999,11.5858 17.4999,12 C17.4999,12.4142 17.1642,12.75 16.7499,12.75 L11.2501,12.75 C10.8358,12.75 10.5001,12.4142 10.5001,12 C10.5001,11.5858 10.8358,11.25 11.2501,11.25 L16.7499,11.25 Z M7.75,7.25 C8.30228,7.25 8.75,7.69772 8.75,8.25 C8.75,8.80228 8.30228,9.25 7.75,9.25 C7.19772,9.25 6.75,8.80228 6.75,8.25 C6.75,7.69772 7.19772,7.25 7.75,7.25 Z M16.75,7.5 C17.1642,7.5 17.5,7.83579 17.5,8.25 C17.5,8.66421 17.1642,9 16.75,9 L11.25,9 C10.8358,9 10.5,8.66421 10.5,8.25 C10.5,7.83579 10.8358,7.5 11.25,7.5 L16.75,7.5 Z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
Qt_ui/icons/windowIcon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

2226
Qt_ui/mainGUI.ui Executable file

File diff suppressed because it is too large Load Diff

1610
Qt_ui/sheetGUI.ui Executable file

File diff suppressed because it is too large Load Diff

10
Qt_ui/src.qrc Executable file
View File

@@ -0,0 +1,10 @@
<RCC>
<qresource prefix="icons">
<file>icons/windowIcon.png</file>
<file>icons/icon.ico</file>
<file>icons/code.svg</file>
<file>icons/info.svg</file>
<file>icons/logo.png</file>
<file>icons/sheet.svg</file>
</qresource>
</RCC>

51
README.md Executable file
View File

@@ -0,0 +1,51 @@
<p align="center">
<img height="100" src="https://github.com/user0706/PyRex/blob/master/Qt_ui/icons/windowIcon.png?raw=true">
</p>
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) [![python-version](https://img.shields.io/badge/Python-3.6|above-<COLOR>.svg)](https://www.python.org/) [![Qt](https://img.shields.io/badge/GUI%20by-Qt%20Designer-orange)](https://doc.qt.io/qt-5/qtdesigner-manual.html) [![License](https://img.shields.io/pypi/l/ansicolortags.svg)](https://github.com/user0706/PyRex/blob/master/LICENSE) [![Status](https://img.shields.io/badge/status-test-yellow)](https://github.com/user0706/PyRex/) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/user0706/PyRex/)
## Description
PyRex is a tool for visual testing Python regular expression.
<br>Based on the re python package, combined with the Qt user interface, it allows a visual display of the results of a regular expression pattern.
<br>Also, in addition to the above basic function, there is an option to generate code for the Python language.
## Prerequisites
After opening the downloaded repository in cmd *(Windows)*/terminal *(Linux/MacOS)*, to install the necessary packages for PyRex operation, enter the following command:
```python
pip install -r requirements.txt --no-index --find-links file:///tmp/packages
(if not, try pip3)
```
## Download
[Windows XP or above](https://github.com/user0706/PyRex/releases/tag/v1.0)
## How to run PyRex?
### Using an executable file:
Easily go through the installation process
<hr>
### Using raw repositories:
Execute the following commands in cmd *(Windows)*/terminal *(Linux/MacOS)*:
- Download repository
```
git clone https://github.com/user0706/PyRex.git
```
- Entry into the download repository
```
cd PyRex
```
- Start the program
```
python main.py
(if not, try python3)
```
## What's new:
- Code generator for Python regex
## Screenshots
![](https://github.com/user0706/PyRex/blob/master/Example.png?raw=true)
## To-Do
- [X] <del>Python code generator</del>
- [ ] support for PHP regular expression
- [ ] support for JavaSrcript regular expression

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

271
functions.py Executable file
View File

@@ -0,0 +1,271 @@
from mainGUI import *
from generator import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys
import re
import random
def Process(string, pattern, info, NoMatchesLabel):
'''Processes the specified regex pattern
:param pattern: Regex pattern
:type pattern: str
:param string: Test string
:type string: str
:returns info: Search result information
:type info: list
:Example: string => "HELLO world
Great day"
pattern => [A-Z]+.*
info => []
return info => [["Full match 1", "[0-10]", "HELLO world"]]
'''
if pattern:
try:
NoMatchesLabel.hide()
regex = r"{}".format(str(pattern))
matches = re.finditer(regex, string, re.MULTILINE)
for match_num, match in enumerate(matches, start=1):
info.append(['Full match '+str(match_num), str(match.start())+'-'+str(match.end()), str(match.group())])
for group_num in range(0, len(match.groups())):
group_num = group_num + 1
info.append(['Group '+str(group_num), str(match.start(group_num))+'-'+str(match.end(group_num)), str(match.group(group_num))])
except:
NoMatchesLabel.show()
if not info:
NoMatchesLabel.show()
return info
def GenerateGroupColor(color_spectrum, target):
'''Color generator for groups
:param target: Result info group name
:type target: str
:param color_spectrum: List of optional colors
:type color_spectrum: list
:returns: Selected rgb color
:type: str
'''
if target == 'Group 1':
color = color_spectrum[1]
elif target == 'Group 2':
color = color_spectrum[2]
elif target == 'Group 3':
color = color_spectrum[3]
elif target == 'Group 4':
color = color_spectrum[4]
elif target == 'Group 5':
color = color_spectrum[5]
elif target == 'Group 6':
color = color_spectrum[6]
elif target == 'Group 7':
color = color_spectrum[7]
elif target == 'Group 8':
color = color_spectrum[8]
elif target == 'Group 9':
color = color_spectrum[9]
elif target == 'Group 10':
color = color_spectrum[10]
else:
color = random.choice(color_spectrum)
return color
def FullMatchTagUI(scroll_area, layout, tag):
'''Full match tag header - The dynamic part of Qt ui
:param scroll_area: QT ui scroll area
:type: PyQt5.QtWidgets.QScrollArea
:param layout: QT ui scroll area layout
:type: PyQt5.QtWidgets.QHBoxLayout
'''
CollectionWidget = QtWidgets.QWidget(scroll_area)
CollectionWidget.setMinimumSize(QtCore.QSize(300, 25))
CollectionWidget.setMaximumSize(QtCore.QSize(500, 25))
CollectionWidget.setObjectName("CollectionWidget")
verticalLayout_6 = QtWidgets.QVBoxLayout(CollectionWidget)
verticalLayout_6.setContentsMargins(0, 0, 0, 0)
verticalLayout_6.setSpacing(0)
verticalLayout_6.setObjectName("verticalLayout_6")
CollectionLabel = QtWidgets.QLabel("Match {}".format(str(tag.split(' ')[-1])))
font = QtGui.QFont()
font.setPointSize(8)
font.setBold(True)
CollectionLabel.setFont(font)
CollectionLabel.setStyleSheet("color: rgb(78, 123, 179);\nmargin-bottom:5px;\nmargin-top:10px;")
CollectionLabel.setObjectName("CollectionLabel")
verticalLayout_6.addWidget(CollectionLabel)
CollectionLine = QtWidgets.QFrame(CollectionWidget)
CollectionLine.setStyleSheet("background-color: rgba(199, 199, 199, 50%);\nmin-height:1px;\nmax-height:1px;")
CollectionLine.setFrameShape(QtWidgets.QFrame.HLine)
CollectionLine.setFrameShadow(QtWidgets.QFrame.Sunken)
CollectionLine.setObjectName("CollectionLine")
verticalLayout_6.addWidget(CollectionLine)
layout.addWidget(CollectionWidget)
def InfoUI(res_widget, res_layout, res_tag, res_range, res_text, res_index, res_color, scroll_area, layout, tag):
'''UI information widget element - The dynamic part of Qt ui
:param res_widget: A list where the i-th element is the i-th Qt widget
:type res_widget: list
:param res_layout: A list where the i-th element is the i-th Qt H layout
:type res_layout: list
:param res_tag: A list where the i-th element is the i-th tag
:type res_tag: list
:param res_range: A list where the i-th element is the i-th range
:type res_range: list
:param res_text: A list where the i-th element is the i-th text
:type res_text: list
:param res_index: Current element-widget
:type res_index: int
:param res_color: Tag background color
:type res_color: str
:param scroll_area: Qt ui scroll area
:type scroll_area: PyQt5.QtWidgets.QScrollArea
:param layout: Qt ui scroll area layout
:type layout: PyQt5.QtWidgets.QHBoxLayout
:param tag: Tag name
:type tag: str
'''
res_widget[res_index] = QtWidgets.QWidget(scroll_area)
res_widget[res_index].setObjectName("ResultWidget")
res_layout[res_index] = QtWidgets.QHBoxLayout(res_widget[res_index])
res_layout[res_index].setContentsMargins(0, 7, 0, 0)
res_layout[res_index].setObjectName("horizontalLayout_4")
if 'Full match' in tag[0]:
res_tag[res_index] = QtWidgets.QLabel(' '.join(tag[0].split(' ')[:-1]))
else:
res_tag[res_index] = QtWidgets.QLabel(tag[0])
res_tag[res_index].setStyleSheet("min-width:60px;\nmax-width:60px;\nmin-height:20px;\nmax-height:20px;\nbackground-color: {};\nborder:2px;\nborder-radius:3px;\ncolor: rgb(54, 54, 54);\n".format(res_color))
res_tag[res_index].setAlignment(QtCore.Qt.AlignCenter)
res_tag[res_index].setObjectName("ResultTag")
res_layout[res_index].addWidget(res_tag[res_index], 0, QtCore.Qt.AlignTop)
res_range[res_index] = QtWidgets.QLabel(tag[1])
res_range[res_index].setStyleSheet("min-width:60px;\nmax-width:60px;\nmin-height:20px;\nmax-height:20px;\ncolor: rgb(54, 54, 54);\n")
res_range[res_index].setAlignment(QtCore.Qt.AlignCenter)
res_range[res_index].setWordWrap(True)
res_range[res_index].setObjectName("ResultRange")
res_layout[res_index].addWidget(res_range[res_index], 0, QtCore.Qt.AlignTop)
res_text[res_index] = QtWidgets.QLabel(tag[2])
res_text[res_index].setStyleSheet("min-width:200px;\nmin-height:20px;\npadding-left:5px;\nbackground-color: rgba(98, 98, 98, 10%);\nborder:2px;\nborder-radius:3px;\ncolor: rgb(54, 54, 54);\n")
res_text[res_index].setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
res_text[res_index].setWordWrap(True)
res_text[res_index].setObjectName("ResultText")
res_layout[res_index].addWidget(res_text[res_index], 0, QtCore.Qt.AlignTop)
layout.addWidget(res_widget[res_index])
def PreprocessInfo(info):
'''Define the length of the list of variables for those used in UpdateInfo
:return res_widget: list with the same length as info parameter
:rtype res_widget: list
:return res_layout: list with the same length as info parameter
:rtype res_layout: list
:return res_tag: list with the same length as info parameter
:rtype res_tag: list
:return res_range: list with the same length as info parameter
:rtype res_range: list
:return res_text: list with the same length as info parameter
:rtype res_text: list
'''
res_widget = list(range(len(info)))
res_layout = list(range(len(info)))
res_tag = list(range(len(info)))
res_range = list(range(len(info)))
res_text = list(range(len(info)))
return res_widget, res_layout, res_tag, res_range, res_text
def clearLayout(layout):
'''Cleaning the previous state of Layout
:param layout: Layout to be cleaned
:type layout: PyQt5.QtWidgets.QHBoxLayout
'''
while layout.count():
child = layout.takeAt(0)
if child.widget():
child.widget().deleteLater()
def Highlight(plain_edit, color, start, end):
'''Highlights/marks the appropriate substring of the test string
:param plain_edit: Plain edit component. NOT text from plain edit
:type plain_edit: PyQt5.QtWidgets.QPlainTextEdit
:param color: Matching color for the background of the corresponding group - tag result
:type color: str
:param start: Starting position/index of substring for marking.
:type start: int
:param end: Ending position/index of substring for marking.
:type end: int
'''
fmt = QTextCharFormat()
fmt.setBackground(color)
cursor = QTextCursor(plain_edit.document())
cursor.setPosition(start, QTextCursor.MoveAnchor)
cursor.setPosition(end, QTextCursor.KeepAnchor)
cursor.setCharFormat(fmt)
def ClearHighlight(plain_edit, plain_edit_text):
'''Reset all highlighted/marked substrings from the test string
:param plain_edit: Plain edit component. NOT text from plain edit
:type plain_edit: PyQt5.QtWidgets.QPlainTextEdit
:param plain_edit_text: Text from plaind edit
:type plain_edit_text: str
'''
fmt = QTextCharFormat()
fmt.setBackground(QColor(Qt.white))
cursor = QTextCursor(plain_edit.document())
cursor.setPosition(0, QTextCursor.MoveAnchor)
cursor.setPosition(len(list(plain_edit_text)), QTextCursor.KeepAnchor)
cursor.setCharFormat(fmt)
def HighlightRange(string):
'''Convert a range from a string type to a list of integers
:param string: The range of substring to be highlighted
:type string: str
:return : The range of substring to be highlighted
:rtype : list
:Example: string => "[2-9]"
return => [2,9]
'''
return [int(re.sub(r'(\[|\])','',i)) for i in string.split('-')]
def strColorTolist(string):
'''Convert string type rgb colors to separate integer values of red - green - blue
:param string: Rgb color as a string
:type string: str
:return colorList[0]: Red value
:rtype colorList[0]: int
:return colorList[1]: Green value
:rtype colorList[1]: int
:return colorList[2]: Blue value
:rtype colorList[2]: int
:Example: string => "rgb(255,100,50)"
return colorList[0] => 255
return colorList[1] => 100
return colorList[2] => 50
'''
colorList = [int(i) for i in re.sub(r'(rgb\(|\))','',string).split(', ')]
return colorList[0],colorList[1],colorList[2]
def GetCode(textEdit, pattern, string):
'''Generate code for Python regular expression based on the template
:param textEdit: The QTextEdit element carries a raw code template
:type textEdit: PyQt5.QtWidgets.QTextEdit
:param pattern: A pattern to be entered in the code template
:type pattern: str
:param string: A test string to be entered in the code template
:type string: str
'''
template = textEdit.toPlainText()
textEdit.setText(template.replace("<CHANGE_ME>pattern<CHANGE_ME>", pattern).replace("<CHANGE_ME>string<CHANGE_ME>", string))

159
generator.py Executable file
View File

@@ -0,0 +1,159 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'generator.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_CodeGenerator(object):
def setupUi(self, CodeGenerator):
CodeGenerator.setObjectName("CodeGenerator")
CodeGenerator.resize(800, 333)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
CodeGenerator.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(CodeGenerator)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
self.textEdit.setStyleSheet("border-bottom: 2px;\n"
"border-style: solid;\n"
"border-bottom-color: rgb(255, 85, 0);")
self.textEdit.setLineWidth(1)
self.textEdit.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
self.textEdit.setObjectName("textEdit")
self.verticalLayout.addWidget(self.textEdit)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.CopyPushButton = QtWidgets.QPushButton(self.centralwidget)
self.CopyPushButton.setStyleSheet("QPushButton#CopyPushButton {\n"
" min-width:60px;\n"
" max-width:60px;\n"
" min-height:35;\n"
" max-height:35;\n"
"\n"
" color: #495057;\n"
"\n"
" background: rgba(255,255,255,100%);\n"
" border-bottom: 2px;\n"
" border-style: solid;\n"
" border-bottom-color: rgba(0,0,0,.3);\n"
" border-top-left-radius: 0px;\n"
" border-top-right-radius: 3px;\n"
" border-bottom-right-radius: 0px;\n"
" border-bottom-left-radius: 0px;\n"
"}\n"
"\n"
"QPushButton#CopyPushButton:hover {\n"
" background: rgba(255,255,255,50%);\n"
" border-bottom-color:rgb(255, 85, 0);\n"
"}\n"
"\n"
"QPushButton#CopyPushButton:pressed {\n"
" background: rgba(255,255,255,100%);\n"
" border-bottom-color:rgb(255, 85, 0);\n"
"}\n"
"\n"
"QPushButton#CopyPushButton:disabled {\n"
" background: rgba(0,0,0,.04);\n"
" border-bottom-color: rgba(0,0,0,.15); \n"
"}")
self.CopyPushButton.setObjectName("CopyPushButton")
self.horizontalLayout.addWidget(self.CopyPushButton, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
self.ClosePushButton = QtWidgets.QPushButton(self.centralwidget)
self.ClosePushButton.setStyleSheet("QPushButton#ClosePushButton {\n"
" min-width:60px;\n"
" max-width:60px;\n"
" min-height:35;\n"
" max-height:35;\n"
"\n"
" color: #495057;\n"
"\n"
" background: rgba(255,255,255,100%);\n"
" border-bottom: 2px;\n"
" border-style: solid;\n"
" border-bottom-color: rgba(0,0,0,.3);\n"
" border-top-left-radius: 0px;\n"
" border-top-right-radius: 3px;\n"
" border-bottom-right-radius: 0px;\n"
" border-bottom-left-radius: 0px;\n"
"}\n"
"\n"
"QPushButton#ClosePushButton:hover {\n"
" background: rgba(255,255,255,50%);\n"
" border-bottom-color:rgb(255, 85, 0);\n"
"}\n"
"\n"
"QPushButton#ClosePushButton:pressed {\n"
" background: rgba(255,255,255,100%);\n"
" border-bottom-color:rgb(255, 85, 0);\n"
"}\n"
"\n"
"QPushButton#ClosePushButton:disabled {\n"
" background: rgba(0,0,0,.04);\n"
" border-bottom-color: rgba(0,0,0,.15); \n"
"}")
self.ClosePushButton.setObjectName("ClosePushButton")
self.horizontalLayout.addWidget(self.ClosePushButton, 0, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.verticalLayout.addLayout(self.horizontalLayout)
CodeGenerator.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(CodeGenerator)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
self.menubar.setObjectName("menubar")
CodeGenerator.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(CodeGenerator)
self.statusbar.setObjectName("statusbar")
CodeGenerator.setStatusBar(self.statusbar)
self.retranslateUi(CodeGenerator)
self.ClosePushButton.clicked.connect(CodeGenerator.close)
self.CopyPushButton.clicked.connect(self.textEdit.selectAll)
self.CopyPushButton.clicked.connect(self.textEdit.copy)
QtCore.QMetaObject.connectSlotsByName(CodeGenerator)
def retranslateUi(self, CodeGenerator):
_translate = QtCore.QCoreApplication.translate
CodeGenerator.setWindowTitle(_translate("CodeGenerator", "PyRex Code Generaotr"))
self.textEdit.setHtml(_translate("CodeGenerator", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">import re</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">regex = r&quot;&lt;CHANGE_ME&gt;pattern&lt;CHANGE_ME&gt;&quot;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">test_str = &quot;&lt;CHANGE_ME&gt;string&lt;CHANGE_ME&gt;&quot;</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">matches = re.finditer(regex, test_str, re.MULTILINE)</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">for matchNum, match in enumerate(matches, start=1):</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> print (&quot;Match {matchNum} was found at {start}-{end}: {match}&quot;.format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> for groupNum in range(0, len(match.groups())):</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> groupNum = groupNum + 1</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\"> print (&quot;Group {groupNum} found at {start}-{end}: {group}&quot;.format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))</span></p></body></html>"))
self.CopyPushButton.setText(_translate("CodeGenerator", "Copy"))
self.ClosePushButton.setText(_translate("CodeGenerator", "Close"))
import src_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
CodeGenerator = QtWidgets.QMainWindow()
ui = Ui_CodeGenerator()
ui.setupUi(CodeGenerator)
CodeGenerator.show()
sys.exit(app.exec_())

117
main.py Executable file
View File

@@ -0,0 +1,117 @@
from functions import *
from generator import *
from mainGUI import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys
import os
import re
class MyWin(QtWidgets.QMainWindow):
def __init__(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
shortcut = QShortcut(QKeySequence("Ctrl+Return"), self)
shortcut.activated.connect(self.ui.ProcessPushButton.click)
self.Pattern = ''
self.TestString = ''
self.ui.ProcessPushButton.clicked.connect(self.PatternChanged)
self.ui.RegexTextEdit.installEventFilter(self)
self.ui.SheetDockWidget.hide()
self.ui.RegexSheetPushButton.clicked.connect(self.Sheet)
self.SheetFlag = False
self.ui.CodeGeneratorPushButton.clicked.connect(self.CodeGenerator)
self.ui.AboutPushButton.hide()
self.ResultWidget = None
self.horizontalLayout_4 = None
self.ResultTag = None
self.ResultRange = None
self.ResultText = None
self.Info = []
self.Match = []
self.ui.NoMatchesLabel.hide()
self.resize(800, 600)
self.WindowWidthFlag = 0
self.WindowHeightFlag = 0
self.ColorList = ['rgb(198, 227, 255)','rgb(198, 233, 157)','rgb(245, 171, 165)','rgb(255, 191, 109)','rgb(193, 203, 235)','rgb(215, 253, 227)','rgb(227, 255, 172)','rgb(232, 141, 238)','rgb(207, 221, 103)','rgb(255, 172, 192)','rgb(132, 214, 238)']
self.GeneratedCode = Ui_MainWindow()
def UpdateInfo(self):
'''Visual display of search results'''
for i, v in enumerate(self.Info):
if 'Full match' in v[0]:
FullMatchTagUI(self.ui.scrollAreaWidgetContents, self.ui.verticalLayout_5, v[0])
color = self.ColorList[0]
else:
color = GenerateGroupColor(self.ColorList, v[0])
InfoUI(self.ResultWidget, self.horizontalLayout_4, self.ResultTag, self.ResultRange, self.ResultText, i, color, self.ui.scrollAreaWidgetContents, self.ui.verticalLayout_5, v)
SpacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Expanding)
self.ui.verticalLayout_5.addItem(SpacerItem)
def eventFilter(self, obj, event):
if obj is self.ui.RegexTextEdit and event.type() == QEvent.KeyPress:
if event.key() in (Qt.Key_Return, Qt.Key_Enter):
self.PatternChanged()
return True
return super().eventFilter(obj, event)
def PatternChanged(self):
'''Search for test text based on a pattern and display the results'''
clearLayout(self.ui.verticalLayout_5)
self.Info = []
self.Pattern = self.ui.RegexTextEdit.toPlainText()
self.TestString = self.ui.TestStringTextEdit.toPlainText()
self.Info = Process(self.TestString, self.Pattern, self.Info, self.ui.NoMatchesLabel)
self.ResultWidget, self.horizontalLayout_4, self.ResultTag, self.ResultRange, self.ResultText = PreprocessInfo(self.Info)
self.UpdateInfo()
ClearHighlight(self.ui.TestStringTextEdit, self.TestString)
for k, v in enumerate(self.Info):
hrange = HighlightRange(v[1])
if 'Full match' in v[0]:
Highlight(self.ui.TestStringTextEdit, QColor(198, 227, 255), hrange[0], hrange[1])
else:
color = GenerateGroupColor(self.ColorList, v[0])
r, g, b = strColorTolist(color)
Highlight(self.ui.TestStringTextEdit, QColor(r,g,b), hrange[0], hrange[1])
def Sheet(self):
'''Display regular expression cheat sheet'''
if not self.SheetFlag:
self.WindowWidthFlag = self.width()
self.WindowHeightFlag = self.height()
self.ui.SheetDockWidget.show()
self.SheetFlag = True
elif self.SheetFlag:
self.ui.SheetDockWidget.close()
self.adjustSize()
self.resize(self.WindowWidthFlag,self.WindowHeightFlag)
self.SheetFlag = False
def CodeGenerator(self):
'''The code for Python regular expression is generated in a new window'''
if not self.Pattern or not self.TestString:
self.ui.NoMatchesLabel.show()
else:
self.CodeGeneratorWindow = QtWidgets.QMainWindow()
self.gen_ui = Ui_CodeGenerator()
self.gen_ui.setupUi(self.CodeGeneratorWindow)
GetCode(self.gen_ui.textEdit, self.Pattern, self.TestString)
self.CodeGeneratorWindow.show()
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
myapp = MyWin()
myapp.show()
sys.exit(app.exec_())

1357
mainGUI.py Executable file

File diff suppressed because it is too large Load Diff

2
requirements.txt Executable file
View File

@@ -0,0 +1,2 @@
PyQt5==5.15.1
PyQt5-sip==12.8.1

1547
src_rc.py Executable file

File diff suppressed because it is too large Load Diff