-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,005 changed files
with
946,587 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 @@ | ||
.venv |
63 changes: 63 additions & 0 deletions
63
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/PKG-INFO
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,63 @@ | ||
Metadata-Version: 2.1 | ||
Name: MouseInfo | ||
Version: 0.1.3 | ||
Summary: An application to display XY position and RGB color information for the pixel currently under the mouse. Works on Python 2 and 3. | ||
Home-page: https://github.com/asweigart/mouseinfo | ||
Author: Al Sweigart | ||
Author-email: [email protected] | ||
License: GPLv3+ | ||
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) | ||
Classifier: Programming Language :: Python | ||
Classifier: Programming Language :: Python :: 2 | ||
Classifier: Programming Language :: Python :: 2.7 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: Programming Language :: Python :: 3.2 | ||
Classifier: Programming Language :: Python :: 3.3 | ||
Classifier: Programming Language :: Python :: 3.4 | ||
Classifier: Programming Language :: Python :: 3.5 | ||
Classifier: Programming Language :: Python :: 3.6 | ||
Classifier: Programming Language :: Python :: 3.7 | ||
Description-Content-Type: text/markdown | ||
|
||
MouseInfo | ||
====== | ||
|
||
An application to display XY position and RGB color information for the pixel currently under the mouse. Works on Python 2 and 3. This is useful for GUI automation planning. | ||
|
||
The full documentation is at https://mouseinfo.readthedocs.io/en/latest/ | ||
|
||
Installation | ||
------------ | ||
|
||
To install with pip, run: | ||
|
||
pip install mouseinfo | ||
|
||
Quickstart Guide | ||
---------------- | ||
|
||
To run this application, enter the following into the terminal: | ||
|
||
python3 -m mouseinfo | ||
|
||
Or for Python 2, run: | ||
|
||
python -m mouseinfo | ||
|
||
Alternatively, to run it from the interactive shell or a Python program: | ||
|
||
>>> import mouseinfo | ||
>>> mouseinfo.mouseInfo() | ||
|
||
The Mouse Info application displays the current XY coordinates of the mouse cursor, as well as the RGB color information of the pixel directly under the cursor. This can be useful for planning out GUI automation tests where the mouse is controlled by a script (such as a Python script with PyAutoGUI) to click on the screen at specific coordinates. | ||
|
||
The "Copy" buttons will copy this mouse information to the clipboard, while the "Log" buttons will add this mouse information to the text field in the application. The RGB color information is given as a comman-delimited, three-integer red, green, and blue values as decimals from 0 to 255. The hex values of the RGB value is also given. | ||
|
||
For practical use, you should set the keyboard focus on these buttons by tabbing over them. This leaves you free to move the mouse into position and then press space or Enter to log the current mouse coordinates/RGB value. | ||
|
||
The contents of the log text field can be saved by clicking "Save Log". This will automatically overwrite any file with the provided name. A screenshot can also be saved by clicking "Save Screenshot" | ||
|
||
Contribute | ||
---------- | ||
|
||
If you'd like to contribute to MouseInfo, check out https://github.com/asweigart/mouseinfo |
11 changes: 11 additions & 0 deletions
11
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/SOURCES.txt
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,11 @@ | ||
MANIFEST.in | ||
README.md | ||
setup.cfg | ||
setup.py | ||
src/MouseInfo.egg-info/PKG-INFO | ||
src/MouseInfo.egg-info/SOURCES.txt | ||
src/MouseInfo.egg-info/dependency_links.txt | ||
src/MouseInfo.egg-info/requires.txt | ||
src/MouseInfo.egg-info/top_level.txt | ||
src/mouseinfo/__init__.py | ||
src/mouseinfo/__main__.py |
1 change: 1 addition & 0 deletions
1
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/dependency_links.txt
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 @@ | ||
|
9 changes: 9 additions & 0 deletions
9
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/installed-files.txt
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,9 @@ | ||
..\mouseinfo\__init__.py | ||
..\mouseinfo\__main__.py | ||
..\mouseinfo\__pycache__\__init__.cpython-310.pyc | ||
..\mouseinfo\__pycache__\__main__.cpython-310.pyc | ||
PKG-INFO | ||
SOURCES.txt | ||
dependency_links.txt | ||
requires.txt | ||
top_level.txt |
31 changes: 31 additions & 0 deletions
31
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/requires.txt
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,31 @@ | ||
pyperclip | ||
|
||
[:platform_system == "Darwin"] | ||
rubicon-objc | ||
|
||
[:platform_system == "Linux" and python_version < "3.0"] | ||
Xlib | ||
|
||
[:platform_system == "Linux" and python_version >= "3.0"] | ||
python3-Xlib | ||
|
||
[:python_version == "2.7"] | ||
Pillow>=2.0.0 | ||
|
||
[:python_version == "3.2"] | ||
Pillow<=3.4.2,>=2.0.0 | ||
|
||
[:python_version == "3.3"] | ||
Pillow<=4.3.0,>=2.0.0 | ||
|
||
[:python_version == "3.4"] | ||
Pillow<=5.4.1,>=2.5.0 | ||
|
||
[:python_version == "3.5"] | ||
Pillow>=3.2.0 | ||
|
||
[:python_version == "3.6"] | ||
Pillow>=4.0.0 | ||
|
||
[:python_version == "3.7"] | ||
Pillow>=5.2.0 |
1 change: 1 addition & 0 deletions
1
venv/Lib/site-packages/MouseInfo-0.1.3-py3.10.egg-info/top_level.txt
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 @@ | ||
mouseinfo |
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,111 @@ | ||
# | ||
# The Python Imaging Library | ||
# $Id$ | ||
# | ||
# bitmap distribution font (bdf) file parser | ||
# | ||
# history: | ||
# 1996-05-16 fl created (as bdf2pil) | ||
# 1997-08-25 fl converted to FontFile driver | ||
# 2001-05-25 fl removed bogus __init__ call | ||
# 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev) | ||
# 2003-04-22 fl more robustification (from Graham Dumpleton) | ||
# | ||
# Copyright (c) 1997-2003 by Secret Labs AB. | ||
# Copyright (c) 1997-2003 by Fredrik Lundh. | ||
# | ||
# See the README file for information on usage and redistribution. | ||
# | ||
|
||
""" | ||
Parse X Bitmap Distribution Format (BDF) | ||
""" | ||
|
||
|
||
from . import FontFile, Image | ||
|
||
bdf_slant = { | ||
"R": "Roman", | ||
"I": "Italic", | ||
"O": "Oblique", | ||
"RI": "Reverse Italic", | ||
"RO": "Reverse Oblique", | ||
"OT": "Other", | ||
} | ||
|
||
bdf_spacing = {"P": "Proportional", "M": "Monospaced", "C": "Cell"} | ||
|
||
|
||
def bdf_char(f): | ||
# skip to STARTCHAR | ||
while True: | ||
s = f.readline() | ||
if not s: | ||
return None | ||
if s[:9] == b"STARTCHAR": | ||
break | ||
id = s[9:].strip().decode("ascii") | ||
|
||
# load symbol properties | ||
props = {} | ||
while True: | ||
s = f.readline() | ||
if not s or s[:6] == b"BITMAP": | ||
break | ||
i = s.find(b" ") | ||
props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii") | ||
|
||
# load bitmap | ||
bitmap = [] | ||
while True: | ||
s = f.readline() | ||
if not s or s[:7] == b"ENDCHAR": | ||
break | ||
bitmap.append(s[:-1]) | ||
bitmap = b"".join(bitmap) | ||
|
||
[x, y, l, d] = [int(p) for p in props["BBX"].split()] | ||
[dx, dy] = [int(p) for p in props["DWIDTH"].split()] | ||
|
||
bbox = (dx, dy), (l, -d - y, x + l, -d), (0, 0, x, y) | ||
|
||
try: | ||
im = Image.frombytes("1", (x, y), bitmap, "hex", "1") | ||
except ValueError: | ||
# deal with zero-width characters | ||
im = Image.new("1", (x, y)) | ||
|
||
return id, int(props["ENCODING"]), bbox, im | ||
|
||
|
||
class BdfFontFile(FontFile.FontFile): | ||
"""Font file plugin for the X11 BDF format.""" | ||
|
||
def __init__(self, fp): | ||
super().__init__() | ||
|
||
s = fp.readline() | ||
if s[:13] != b"STARTFONT 2.1": | ||
msg = "not a valid BDF file" | ||
raise SyntaxError(msg) | ||
|
||
props = {} | ||
comments = [] | ||
|
||
while True: | ||
s = fp.readline() | ||
if not s or s[:13] == b"ENDPROPERTIES": | ||
break | ||
i = s.find(b" ") | ||
props[s[:i].decode("ascii")] = s[i + 1 : -1].decode("ascii") | ||
if s[:i] in [b"COMMENT", b"COPYRIGHT"]: | ||
if s.find(b"LogicalFontDescription") < 0: | ||
comments.append(s[i + 1 : -1].decode("ascii")) | ||
|
||
while True: | ||
c = bdf_char(fp) | ||
if not c: | ||
break | ||
id, ch, (xy, dst, src), im = c | ||
if 0 <= ch < len(self.glyph): | ||
self.glyph[ch] = xy, dst, src, im |
Oops, something went wrong.