├── README.md ├── asset ├── x_1920.png └── x_2560.png ├── src ├── size.py ├── settings.py ├── directx.py ├── screenshot.py └── run.py ├── .vscode └── launch.json ├── pyproject.toml ├── requirements.txt ├── settings.toml ├── .gitignore ├── poetry.lock └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # d2-ruin-farm -------------------------------------------------------------------------------- /asset/x_1920.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lclbm/d2-ruin-farm/HEAD/asset/x_1920.png -------------------------------------------------------------------------------- /asset/x_2560.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lclbm/d2-ruin-farm/HEAD/asset/x_2560.png -------------------------------------------------------------------------------- /src/size.py: -------------------------------------------------------------------------------- 1 | from loguru import logger 2 | from PIL import ImageGrab 3 | 4 | MONITOR_WIDTH, MONITOR_HEIGHT = ImageGrab.grab().size 5 | logger.info(f"屏幕分辨率: {MONITOR_WIDTH}x{MONITOR_HEIGHT}") 6 | 7 | if (MONITOR_WIDTH, MONITOR_HEIGHT) not in [(1920, 1080), (2560, 1440)]: 8 | raise Exception(f"不支持的分辨率,目前仅支持1920x1080和2560x1440分辨率") -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python 调试程序: 当前文件", 9 | "type": "debugpy", 10 | "request": "launch", 11 | "program": "src/run.py", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "d2-ruin-farm" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["lclbm <614867321@qq.com>"] 6 | readme = "README.md" 7 | packages = [{include = "d2_ruin_farm"}] 8 | 9 | [tool.poetry.dependencies] 10 | python = ">=3.11, <3.13" 11 | loguru = "^0.7.2" 12 | pydirectinput = "^1.0.4" 13 | opencv-python = "^4.9.0.80" 14 | pillow = "^10.3.0" 15 | pyinstaller = "^6.6.0" 16 | 17 | 18 | [build-system] 19 | requires = ["poetry-core"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | altgraph==0.17.4 ; python_version >= "3.11" and python_version < "3.13" 2 | colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.13" and sys_platform == "win32" 3 | loguru==0.7.2 ; python_version >= "3.11" and python_version < "3.13" 4 | macholib==1.16.3 ; python_version >= "3.11" and python_version < "3.13" and sys_platform == "darwin" 5 | numpy==1.26.4 ; python_version >= "3.11" and python_version < "3.13" 6 | opencv-python==4.9.0.80 ; python_version >= "3.11" and python_version < "3.13" 7 | packaging==24.0 ; python_version >= "3.11" and python_version < "3.13" 8 | pefile==2023.2.7 ; python_version >= "3.11" and python_version < "3.13" and sys_platform == "win32" 9 | pillow==10.3.0 ; python_version >= "3.11" and python_version < "3.13" 10 | pydirectinput==1.0.4 ; python_version >= "3.11" and python_version < "3.13" 11 | pyinstaller-hooks-contrib==2024.5 ; python_version >= "3.11" and python_version < "3.13" 12 | pyinstaller==6.6.0 ; python_version >= "3.11" and python_version < "3.13" 13 | pywin32-ctypes==0.2.2 ; python_version >= "3.11" and python_version < "3.13" and sys_platform == "win32" 14 | setuptools==69.5.1 ; python_version >= "3.11" and python_version < "3.13" 15 | win32-setctime==1.1.0 ; python_version >= "3.11" and python_version < "3.13" and sys_platform == "win32" 16 | -------------------------------------------------------------------------------- /settings.toml: -------------------------------------------------------------------------------- 1 | [base] 2 | log_level = "DEBUG" # 日志等级 3 | debug = false # 是否开启调试模式,开启后会保存图片到本地文件夹 4 | map_debug = false # 是否开启地图选择调试模式,开启后运行脚本时会先进行飞图操作 5 | kick_mode = 0 # 需要填写下方配置的索引值,第一套配置索引为0,第二套配置索引为1 6 | 7 | 8 | [key] 9 | "职业技能按键" = "v" 10 | "未充能近战按键" = "c" 11 | "跳隐身按键" = "x" 12 | "终结技按键" = "g" 13 | "埋头表情按键" = "down" # 引号里可以填写up/right/down/left 14 | 15 | 16 | [image] 17 | "x技能识别阈值" = 0.9 # 不建议改动这个值 18 | 19 | "连续检测boss血条次数" = 2 20 | "连续检测玩家血条次数" = 2 21 | 22 | "玩家血条颜色范围" = [[200, 200, 200], [255, 255, 255]] 23 | "玩家终结技血条颜色范围" = [[0, 190, 190], [0, 200, 200]] 24 | "BOSS血条颜色范围" = [[150, 90, 10], [240, 180, 80]] 25 | 26 | 27 | [image.1440p] 28 | "X技能坐标边界" = [252, 1233, 334, 1318] 29 | "玩家血条坐标边界" = [994, 134, 1094, 144] 30 | "BOSS血条坐标边界" = [1250, 1295, 1350, 1305] 31 | 32 | 33 | [image.1080p] 34 | "X技能坐标边界" = [189, 924, 250, 987] 35 | "玩家血条坐标边界" = [745, 100, 820, 107] 36 | "BOSS血条坐标边界" = [937, 971, 1012, 978] 37 | 38 | 39 | [map_select] 40 | "鼠标移动和单击时间间隔" = 0.3 41 | "打开地图后等待时间" = 1 42 | "选择废墟等待时间" = 0.3 43 | "选择难度时间间隔" = 1.5 44 | "飞图点击开始按钮延迟" = 3 45 | 46 | 47 | [map_select.1440p] 48 | "鼠标x轴坐标" = 2360 49 | "难度选项卡坐标" = [1960, 1110] 50 | "大师难度选项坐标" = [455, 460] 51 | "开始按钮坐标" = [2180, 1210] 52 | "F进度坐标" = [1805, 1115] 53 | 54 | 55 | [map_select.1080p] 56 | "鼠标x轴坐标" = 1770 57 | "难度选项卡坐标" = [1470, 832] 58 | "大师难度选项坐标" = [341, 345] 59 | "开始按钮坐标" = [1635, 907] 60 | "F进度坐标" = [1353, 836] 61 | 62 | 63 | # 这里准备了两套配置,在前面的"启用的配置"中选择要启用的配置 64 | [kick] 65 | "最大连续失败次数" = 20 # 眉笔机制,连续失败次数超过这个值时会重新进本 66 | "闪身后破隐等待时间" = 1.5 67 | "终结后最长等待结算时间" = 35 68 | "未检测到护盾后的等待时间" = 10 69 | "等待结算超时后的等待时间" = 10 70 | 71 | # 第一套配置,索引为0 72 | # https://www.bilibili.com/video/BV1cH4y1G7ZP 73 | # https://space.bilibili.com/80661500 74 | [[kick.commands]] 75 | "开BOSS鼠标偏移" = [-42, -40] 76 | "隐身后往左走时间" = 0.64 77 | "隐身后往前走时间" = 1.91 78 | 79 | "射击黄血鼠标偏移" = [260, 86] 80 | "等待黄血刷新时间" = 5.605 81 | 82 | "躲藏第一段位移镜头偏移" = [-905, 0] 83 | "躲藏第一段位移时间" = 1.82 84 | 85 | "躲藏第二段位移镜头偏移" = [130, 0] 86 | "躲藏第二段位移时间" = 3 87 | 88 | 89 | # 第二套配置,索引为1 90 | [[kick.commands]] 91 | "开BOSS鼠标偏移" = [-42, -40] 92 | "隐身后往左走时间" = 0.5 93 | "隐身后往前走时间" = 1.83 94 | 95 | "射击黄血鼠标偏移" = [188, 72] 96 | "等待黄血刷新时间" = 5.805 97 | 98 | "躲藏第一段位移镜头偏移" = [-850, 0] 99 | "躲藏第一段位移时间" = 1.8 100 | 101 | "躲藏第二段位移镜头偏移" = [250, 0] 102 | "躲藏第二段位移时间" = 3 103 | -------------------------------------------------------------------------------- /src/settings.py: -------------------------------------------------------------------------------- 1 | import tomllib 2 | import dataclasses 3 | from pathlib import Path 4 | 5 | from size import MONITOR_HEIGHT 6 | 7 | SETTINGS_PATH = Path(f"./settings.toml") 8 | 9 | 10 | @dataclasses.dataclass 11 | class BaseSettings: 12 | log_level: str 13 | debug: bool 14 | kick_mode: int 15 | map_debug: bool 16 | 17 | 18 | @dataclasses.dataclass 19 | class KeySettings: 20 | 职业技能按键: str 21 | 未充能近战按键: str 22 | 跳隐身按键: str 23 | 终结技按键: str 24 | 埋头表情按键: str 25 | 26 | 27 | @dataclasses.dataclass 28 | class ImageSettings: 29 | @dataclasses.dataclass 30 | class MonitorSettings: 31 | X技能坐标边界: list[int] 32 | 玩家血条坐标边界: list[int] 33 | BOSS血条坐标边界: list[int] 34 | 35 | x技能识别阈值: float 36 | 37 | 连续检测boss血条次数: int 38 | 连续检测玩家血条次数: int 39 | 40 | 玩家血条颜色范围: list[list[int]] 41 | 玩家终结技血条颜色范围: list[list[int]] 42 | BOSS血条颜色范围: list[list[int]] 43 | 44 | monitor_settings: MonitorSettings 45 | 46 | 47 | @dataclasses.dataclass 48 | class MapSelecteSettings: 49 | @dataclasses.dataclass 50 | class MonitorSettings: 51 | 鼠标x轴坐标: list[int] 52 | 难度选项卡坐标: list[int] 53 | 大师难度选项坐标: list[int] 54 | 开始按钮坐标: list[int] 55 | F进度坐标: list[int] 56 | 57 | 鼠标移动和单击时间间隔: float 58 | 打开地图后等待时间: float 59 | 选择废墟等待时间: float 60 | 选择难度时间间隔: float 61 | 飞图点击开始按钮延迟: float 62 | 63 | monitor_settings: MonitorSettings 64 | 65 | 66 | @dataclasses.dataclass 67 | class KickSettings: 68 | @dataclasses.dataclass 69 | class Command: 70 | 开BOSS鼠标偏移: tuple[int] 71 | 隐身后往左走时间: float 72 | 隐身后往前走时间: float 73 | 74 | 射击黄血鼠标偏移: tuple[int] 75 | 等待黄血刷新时间: float 76 | 77 | 躲藏第一段位移镜头偏移: tuple[int] 78 | 躲藏第一段位移时间: float 79 | 80 | 躲藏第二段位移镜头偏移: tuple[int] 81 | 躲藏第二段位移时间: float 82 | 83 | 最大连续失败次数: int 84 | 闪身后破隐等待时间: float 85 | 终结后最长等待结算时间: float 86 | 未检测到护盾后的等待时间: float 87 | 等待结算超时后的等待时间: float 88 | 89 | command: Command 90 | 91 | 92 | settings = tomllib.loads(SETTINGS_PATH.read_text("utf-8")) 93 | image_monitor_settings = {h: settings["image"].pop(f"{h}p") for h in [1080, 1440]} 94 | map_select_monitor_settings = { 95 | h: settings["map_select"].pop(f"{h}p") for h in [1080, 1440] 96 | } 97 | commands = settings["kick"].pop("commands") 98 | 99 | base_settings = BaseSettings(**settings.pop("base")) 100 | key_settings = KeySettings(**settings.pop("key")) 101 | image_settings = ImageSettings( 102 | **settings.pop("image"), 103 | monitor_settings=ImageSettings.MonitorSettings( 104 | **image_monitor_settings[MONITOR_HEIGHT] 105 | ), 106 | ) 107 | map_selecte_settings = MapSelecteSettings( 108 | **settings.pop("map_select"), 109 | monitor_settings=MapSelecteSettings.MonitorSettings( 110 | **(map_select_monitor_settings[MONITOR_HEIGHT]) 111 | ), 112 | ) 113 | kick_settings = KickSettings( 114 | **settings.pop("kick"), 115 | command=KickSettings.Command(**commands[base_settings.kick_mode]), 116 | ) 117 | -------------------------------------------------------------------------------- /src/directx.py: -------------------------------------------------------------------------------- 1 | import time 2 | import pydirectinput 3 | from pydirectinput import ( 4 | keyDown, 5 | keyUp, 6 | leftClick, 7 | move, 8 | moveTo, 9 | mouseUp, 10 | mouseDown, 11 | RIGHT, 12 | press, 13 | ) 14 | from loguru import logger 15 | 16 | from settings import map_selecte_settings, kick_settings, key_settings 17 | 18 | 19 | pydirectinput.PAUSE = 0 20 | 21 | 22 | def press_and_hold_key(key: str, seconds: float): 23 | logger.debug(f'press key "{key}" {seconds} seconds') 24 | 25 | keyDown(key) 26 | time.sleep(seconds) 27 | keyUp(key) 28 | 29 | 30 | def move_to_and_left_click(x: int = None, y: int = None): 31 | logger.debug(f"鼠标移动至 ({x}, {y}),左键点击") 32 | 33 | pydirectinput.moveTo(x, y) 34 | time.sleep(map_selecte_settings.鼠标移动和单击时间间隔) 35 | pydirectinput.leftClick() 36 | 37 | 38 | def run(secons: float): 39 | keyDown("shiftleft") 40 | time.sleep(0.001) 41 | keyDown("w") 42 | time.sleep(secons) 43 | keyUp("shiftleft") 44 | keyUp("w") 45 | 46 | 47 | def open_map_and_switch_difficulty(): 48 | # 打开地图 49 | press("m") 50 | time.sleep(map_selecte_settings.打开地图后等待时间) 51 | 52 | # 点击战争领主的废墟 53 | moveTo(map_selecte_settings.monitor_settings.鼠标x轴坐标) 54 | time.sleep(map_selecte_settings.选择废墟等待时间) 55 | leftClick() 56 | 57 | # 点开难度选择 58 | time.sleep(map_selecte_settings.选择难度时间间隔) 59 | move_to_and_left_click(*map_selecte_settings.monitor_settings.难度选项卡坐标) 60 | 61 | # 选择大师难度 62 | time.sleep(map_selecte_settings.选择难度时间间隔) 63 | move_to_and_left_click(*map_selecte_settings.monitor_settings.大师难度选项坐标) 64 | 65 | 66 | def start_next_round(): 67 | open_map_and_switch_difficulty() 68 | 69 | # 点击开始 70 | time.sleep(map_selecte_settings.飞图点击开始按钮延迟) 71 | move_to_and_left_click(*map_selecte_settings.monitor_settings.开始按钮坐标) 72 | 73 | 74 | def refresh_checkpoint(): 75 | open_map_and_switch_difficulty() 76 | 77 | # F进度 78 | moveTo(*map_selecte_settings.monitor_settings.F进度坐标) 79 | time.sleep(1) 80 | press_and_hold_key("f", 4) 81 | 82 | for _ in range(2): 83 | press("esc") 84 | time.sleep(0.5) 85 | 86 | run(10) 87 | logger.info("已重置进度") 88 | 89 | 90 | def kick_boss_by_indebted_kindess(): 91 | # 切枪 92 | press("2") 93 | time.sleep(2) 94 | 95 | # 开启boss 96 | move(*kick_settings.command.开BOSS鼠标偏移, relative=True) 97 | time.sleep(0.5) 98 | leftClick() 99 | time.sleep(0.2) 100 | 101 | # 跳x隐身 102 | press("space") 103 | time.sleep(0.2) 104 | press(key_settings.跳隐身按键) 105 | time.sleep(1) 106 | 107 | # 移动到预设的位置 108 | press_and_hold_key("a", kick_settings.command.隐身后往左走时间) 109 | press_and_hold_key("w", kick_settings.command.隐身后往前走时间) 110 | 111 | # 射击黄血小怪 112 | mouseDown(button=RIGHT) 113 | time.sleep(0.3) 114 | move(*kick_settings.command.射击黄血鼠标偏移, relative=True) 115 | time.sleep(kick_settings.command.等待黄血刷新时间) 116 | leftClick() 117 | mouseUp(button=RIGHT) 118 | 119 | # 终结小怪 120 | keyDown(key_settings.终结技按键) 121 | run(1.7) 122 | keyUp(key_settings.终结技按键) 123 | 124 | 125 | def hide_indebted_kindess(): 126 | move(*kick_settings.command.躲藏第一段位移镜头偏移, relative=True) 127 | keyDown("w") 128 | keyDown("shiftleft") 129 | time.sleep(kick_settings.command.躲藏第一段位移时间) 130 | move(*kick_settings.command.躲藏第二段位移镜头偏移, relative=True) 131 | time.sleep(kick_settings.command.躲藏第二段位移时间) 132 | 133 | keyUp("shiftleft") 134 | keyUp("w") 135 | time.sleep(0.5) 136 | press(key_settings.埋头表情按键) 137 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | 162 | *.ipynb 163 | debug/ -------------------------------------------------------------------------------- /src/screenshot.py: -------------------------------------------------------------------------------- 1 | import time 2 | import cv2 3 | import numpy as np 4 | from functools import wraps 5 | 6 | from loguru import logger 7 | from PIL import ImageGrab, Image 8 | 9 | from size import MONITOR_WIDTH 10 | from settings import image_settings 11 | 12 | 13 | def image_log(func: callable): 14 | from datetime import datetime 15 | from settings import base_settings 16 | 17 | @wraps(func) 18 | def inner(): 19 | image = func() 20 | if base_settings.debug: 21 | time_str = datetime.now().strftime("%Y-%m-%d_%H-%M-%S-%f") 22 | file_name = f"{func.__name__}_{time_str}.png" 23 | 24 | logger.debug(f"[{func.__name__}] 保存图片: {file_name}") 25 | image.save(f"./debug/{file_name}") 26 | return image 27 | 28 | return inner 29 | 30 | 31 | def timer_log(func: callable): 32 | @wraps(func) 33 | def inner(*args, **kwargs): 34 | import time 35 | 36 | start_time = time.monotonic() 37 | result = func(*args, **kwargs) 38 | 39 | logger.debug(f"[{func.__name__}] 耗时: {time.monotonic() - start_time:.3f}s") 40 | 41 | return result 42 | 43 | return inner 44 | 45 | 46 | def result_log(func: callable): 47 | from loguru import logger 48 | from functools import wraps 49 | 50 | @wraps(func) 51 | def inner(*args, **kwargs): 52 | result = func(*args, **kwargs) 53 | logger.debug(f"[{func.__name__}] 结果: {result:.3f}") 54 | return result 55 | 56 | return inner 57 | 58 | 59 | @image_log 60 | @timer_log 61 | def get_x_image(): 62 | return ImageGrab.grab(bbox=image_settings.monitor_settings.X技能坐标边界) 63 | 64 | 65 | @image_log 66 | @timer_log 67 | def get_hp_bar_image(): 68 | return ImageGrab.grab(bbox=image_settings.monitor_settings.玩家血条坐标边界) 69 | 70 | 71 | @image_log 72 | @timer_log 73 | def get_boss_hp_bar_image(): 74 | return ImageGrab.grab(bbox=image_settings.monitor_settings.BOSS血条坐标边界) 75 | 76 | 77 | def conver_image_to_open_cv(image: Image.Image): 78 | import cv2 79 | import numpy as np 80 | 81 | return cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) 82 | 83 | 84 | def get_template_similarity(image: Image.Image, template: cv2.typing.MatLike): 85 | image_cv = conver_image_to_open_cv(image) 86 | result = cv2.matchTemplate(image_cv, template, cv2.TM_CCOEFF_NORMED) 87 | min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result) 88 | 89 | return min_val 90 | 91 | 92 | def get_mask_ratio(image: np.ndarray, lower_bound: np.ndarray, upper_bound: np.ndarray): 93 | mask = cv2.inRange(image, lower_bound, upper_bound) 94 | return np.sum(mask == 255) / (image.size / 3) 95 | 96 | 97 | NORMAL_HP_COLOR_RANGE = ( 98 | np.array(image_settings.玩家血条颜色范围[0][::-1]), 99 | np.array(image_settings.玩家血条颜色范围[1][::-1]), 100 | ) 101 | FINISH_HP_COLOR_RANGE = ( 102 | np.array(image_settings.玩家终结技血条颜色范围[0][::-1]), 103 | np.array(image_settings.玩家终结技血条颜色范围[1][::-1]), 104 | ) 105 | BOSS_HP_COLOR_RANGE = ( 106 | np.array(image_settings.BOSS血条颜色范围[0][::-1]), 107 | np.array(image_settings.BOSS血条颜色范围[1][::-1]), 108 | ) 109 | try: 110 | X_TEMPLATE_IMAGE_CV = conver_image_to_open_cv( 111 | Image.open(f"./asset/x_{MONITOR_WIDTH}.png") 112 | ) 113 | except Exception as e: 114 | raise Exception("加载X技能模板图片失败") from e 115 | 116 | 117 | @result_log 118 | @timer_log 119 | def get_x_similarity(): 120 | return get_template_similarity(get_x_image(), X_TEMPLATE_IMAGE_CV) 121 | 122 | 123 | @result_log 124 | @timer_log 125 | def get_finish_hp_bar_mask_ratio(): 126 | return get_mask_ratio( 127 | conver_image_to_open_cv(get_hp_bar_image()), *FINISH_HP_COLOR_RANGE 128 | ) 129 | 130 | 131 | @result_log 132 | @timer_log 133 | def get_normal_hp_bar_mask_ratio(): 134 | return get_mask_ratio( 135 | conver_image_to_open_cv(get_hp_bar_image()), *NORMAL_HP_COLOR_RANGE 136 | ) 137 | 138 | 139 | @result_log 140 | @timer_log 141 | def get_boss_hp_bar_mask_ratio(): 142 | return get_mask_ratio( 143 | conver_image_to_open_cv(get_boss_hp_bar_image()), *BOSS_HP_COLOR_RANGE 144 | ) 145 | 146 | 147 | def check_boss_hp_bar(times: int, interval: float, func: callable): 148 | for i in range(times): 149 | if not func(get_boss_hp_bar_mask_ratio()): 150 | return False 151 | if i != times - 1: 152 | time.sleep(interval) 153 | return True 154 | 155 | 156 | def check_normal_hp_bar(times: int, interval: float, func: callable): 157 | for i in range(times): 158 | if not func(get_normal_hp_bar_mask_ratio()): 159 | return False 160 | if i != times - 1: 161 | time.sleep(interval) 162 | return True 163 | -------------------------------------------------------------------------------- /src/run.py: -------------------------------------------------------------------------------- 1 | import time 2 | from pathlib import Path 3 | from loguru import logger 4 | 5 | X_SIMILARITY_CHECK_INTERVAL = 4 6 | BOSS_HP_BAR_CHECK_INTERVAL = 0.5 7 | 8 | 9 | def run(): 10 | from pydirectinput import press 11 | from screenshot import ( 12 | get_x_similarity, 13 | get_finish_hp_bar_mask_ratio, 14 | check_boss_hp_bar, 15 | check_normal_hp_bar, 16 | ) 17 | from directx import ( 18 | kick_boss_by_indebted_kindess, 19 | start_next_round, 20 | refresh_checkpoint, 21 | hide_indebted_kindess, 22 | ) 23 | from settings import ( 24 | base_settings, 25 | key_settings, 26 | image_settings, 27 | map_selecte_settings, 28 | kick_settings, 29 | ) 30 | 31 | logger.add("./logs/d2-ruin-farm_{time}.log", level=base_settings.log_level) 32 | for settings in [ 33 | base_settings, 34 | key_settings, 35 | image_settings, 36 | map_selecte_settings, 37 | kick_settings, 38 | ]: 39 | logger.info(settings) 40 | 41 | start_count = 0 42 | finish_count = 0 43 | success_count = 0 44 | continuous_fail_count = 0 45 | need_refresh_checkpoint = False 46 | 47 | logger.info("程序启动") 48 | 49 | if base_settings.debug: 50 | logger.info("已开启调试模式") 51 | Path("./debug").mkdir(exist_ok=True) 52 | 53 | time.sleep(2) 54 | 55 | if base_settings.map_debug: 56 | logger.info("已开始进行地图调试,请检查自动飞本逻辑是否正常") 57 | start_next_round() 58 | need_refresh_checkpoint = True 59 | 60 | while True: 61 | while True: 62 | x_similarity = get_x_similarity() 63 | if x_similarity > image_settings.x技能识别阈值: 64 | logger.info("检测到X技能准备就绪") 65 | break 66 | time.sleep(X_SIMILARITY_CHECK_INTERVAL) 67 | 68 | if continuous_fail_count >= kick_settings.最大连续失败次数: 69 | logger.info(f"连续失败次数超过{kick_settings.最大连续失败次数}次,重新进本") 70 | start_next_round() 71 | need_refresh_checkpoint = True 72 | continuous_fail_count = 0 73 | continue 74 | 75 | if need_refresh_checkpoint: 76 | refresh_checkpoint() 77 | need_refresh_checkpoint = False 78 | continue 79 | 80 | logger.info( 81 | f"start_count: {start_count}, finish_count: {finish_count}, success_count: {success_count}" 82 | ) 83 | start_count += 1 84 | 85 | kick_boss_by_indebted_kindess() 86 | time.sleep(0.1) 87 | 88 | finish_hp_bar_mask_ratio = get_finish_hp_bar_mask_ratio() 89 | 90 | if not finish_hp_bar_mask_ratio >= 0.8: 91 | continuous_fail_count += 1 92 | logger.info("未在玩家血条上检测到感应护盾,准备团灭重试") 93 | 94 | press(key_settings.职业技能按键) 95 | time.sleep(kick_settings.闪身后破隐等待时间) 96 | press(key_settings.未充能近战按键) 97 | time.sleep(kick_settings.未检测到护盾后的等待时间) 98 | 99 | continue 100 | 101 | finish_count += 1 102 | logger.info("玩家血条蓝盾检测成功") 103 | 104 | start_time = time.monotonic() 105 | 106 | # 躲起来等待boss血条消失 107 | time.sleep(2) 108 | hide_indebted_kindess() 109 | 110 | while True: 111 | if time.monotonic() - start_time >= kick_settings.终结后最长等待结算时间: 112 | continuous_fail_count += 1 113 | logger.info("等待boss血条消失超时,准备团灭重试") 114 | 115 | press(key_settings.未充能近战按键) 116 | time.sleep(kick_settings.等待结算超时后的等待时间) 117 | 118 | break 119 | 120 | # 如果boss血条消失,进行玩家血条的检测 121 | if check_boss_hp_bar( 122 | image_settings.连续检测boss血条次数, 123 | BOSS_HP_BAR_CHECK_INTERVAL, 124 | lambda x: x <= 0.1, 125 | ): 126 | logger.info("boss血条已消失") 127 | 128 | # 如果再检测到玩家血条,说明正常结算 129 | if check_normal_hp_bar( 130 | image_settings.连续检测玩家血条次数, 131 | BOSS_HP_BAR_CHECK_INTERVAL, 132 | lambda x: x >= 0.8, 133 | ): 134 | success_count += 1 135 | continuous_fail_count = 0 136 | need_refresh_checkpoint = True 137 | logger.success("已检测到玩家的血条,本轮结算成功") 138 | 139 | start_next_round() 140 | break 141 | # 如果没有检测到玩家血条,说明灭了 142 | else: 143 | logger.info("未检测到玩家的血条,本轮团灭") 144 | continuous_fail_count += 1 145 | break 146 | 147 | time.sleep(BOSS_HP_BAR_CHECK_INTERVAL) 148 | 149 | 150 | if __name__ == "__main__": 151 | try: 152 | run() 153 | except KeyboardInterrupt: 154 | ... 155 | except Exception as e: 156 | logger.critical(e) 157 | logger.info("程序已停止,请检查日志文件") 158 | _ = input("按回车键退出...") 159 | -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "altgraph" 5 | version = "0.17.4" 6 | description = "Python graph (network) package" 7 | optional = false 8 | python-versions = "*" 9 | files = [ 10 | {file = "altgraph-0.17.4-py2.py3-none-any.whl", hash = "sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff"}, 11 | {file = "altgraph-0.17.4.tar.gz", hash = "sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406"}, 12 | ] 13 | 14 | [[package]] 15 | name = "colorama" 16 | version = "0.4.6" 17 | description = "Cross-platform colored terminal text." 18 | optional = false 19 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 20 | files = [ 21 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 22 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 23 | ] 24 | 25 | [[package]] 26 | name = "loguru" 27 | version = "0.7.2" 28 | description = "Python logging made (stupidly) simple" 29 | optional = false 30 | python-versions = ">=3.5" 31 | files = [ 32 | {file = "loguru-0.7.2-py3-none-any.whl", hash = "sha256:003d71e3d3ed35f0f8984898359d65b79e5b21943f78af86aa5491210429b8eb"}, 33 | {file = "loguru-0.7.2.tar.gz", hash = "sha256:e671a53522515f34fd406340ee968cb9ecafbc4b36c679da03c18fd8d0bd51ac"}, 34 | ] 35 | 36 | [package.dependencies] 37 | colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} 38 | win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} 39 | 40 | [package.extras] 41 | dev = ["Sphinx (==7.2.5)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.2.2)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.4.1)", "mypy (==v1.5.1)", "pre-commit (==3.4.0)", "pytest (==6.1.2)", "pytest (==7.4.0)", "pytest-cov (==2.12.1)", "pytest-cov (==4.1.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.0.0)", "sphinx-autobuild (==2021.3.14)", "sphinx-rtd-theme (==1.3.0)", "tox (==3.27.1)", "tox (==4.11.0)"] 42 | 43 | [[package]] 44 | name = "macholib" 45 | version = "1.16.3" 46 | description = "Mach-O header analysis and editing" 47 | optional = false 48 | python-versions = "*" 49 | files = [ 50 | {file = "macholib-1.16.3-py2.py3-none-any.whl", hash = "sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c"}, 51 | {file = "macholib-1.16.3.tar.gz", hash = "sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30"}, 52 | ] 53 | 54 | [package.dependencies] 55 | altgraph = ">=0.17" 56 | 57 | [[package]] 58 | name = "numpy" 59 | version = "1.26.4" 60 | description = "Fundamental package for array computing in Python" 61 | optional = false 62 | python-versions = ">=3.9" 63 | files = [ 64 | {file = "numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0"}, 65 | {file = "numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a"}, 66 | {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4"}, 67 | {file = "numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f"}, 68 | {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a"}, 69 | {file = "numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2"}, 70 | {file = "numpy-1.26.4-cp310-cp310-win32.whl", hash = "sha256:bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07"}, 71 | {file = "numpy-1.26.4-cp310-cp310-win_amd64.whl", hash = "sha256:b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5"}, 72 | {file = "numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71"}, 73 | {file = "numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef"}, 74 | {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e"}, 75 | {file = "numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5"}, 76 | {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a"}, 77 | {file = "numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a"}, 78 | {file = "numpy-1.26.4-cp311-cp311-win32.whl", hash = "sha256:1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20"}, 79 | {file = "numpy-1.26.4-cp311-cp311-win_amd64.whl", hash = "sha256:cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2"}, 80 | {file = "numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218"}, 81 | {file = "numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b"}, 82 | {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b"}, 83 | {file = "numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed"}, 84 | {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a"}, 85 | {file = "numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0"}, 86 | {file = "numpy-1.26.4-cp312-cp312-win32.whl", hash = "sha256:50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110"}, 87 | {file = "numpy-1.26.4-cp312-cp312-win_amd64.whl", hash = "sha256:08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818"}, 88 | {file = "numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c"}, 89 | {file = "numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be"}, 90 | {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764"}, 91 | {file = "numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3"}, 92 | {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd"}, 93 | {file = "numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c"}, 94 | {file = "numpy-1.26.4-cp39-cp39-win32.whl", hash = "sha256:a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6"}, 95 | {file = "numpy-1.26.4-cp39-cp39-win_amd64.whl", hash = "sha256:3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea"}, 96 | {file = "numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30"}, 97 | {file = "numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c"}, 98 | {file = "numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0"}, 99 | {file = "numpy-1.26.4.tar.gz", hash = "sha256:2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"}, 100 | ] 101 | 102 | [[package]] 103 | name = "opencv-python" 104 | version = "4.9.0.80" 105 | description = "Wrapper package for OpenCV python bindings." 106 | optional = false 107 | python-versions = ">=3.6" 108 | files = [ 109 | {file = "opencv-python-4.9.0.80.tar.gz", hash = "sha256:1a9f0e6267de3a1a1db0c54213d022c7c8b5b9ca4b580e80bdc58516c922c9e1"}, 110 | {file = "opencv_python-4.9.0.80-cp37-abi3-macosx_10_16_x86_64.whl", hash = "sha256:7e5f7aa4486651a6ebfa8ed4b594b65bd2d2f41beeb4241a3e4b1b85acbbbadb"}, 111 | {file = "opencv_python-4.9.0.80-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:71dfb9555ccccdd77305fc3dcca5897fbf0cf28b297c51ee55e079c065d812a3"}, 112 | {file = "opencv_python-4.9.0.80-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b34a52e9da36dda8c151c6394aed602e4b17fa041df0b9f5b93ae10b0fcca2a"}, 113 | {file = "opencv_python-4.9.0.80-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4088cab82b66a3b37ffc452976b14a3c599269c247895ae9ceb4066d8188a57"}, 114 | {file = "opencv_python-4.9.0.80-cp37-abi3-win32.whl", hash = "sha256:dcf000c36dd1651118a2462257e3a9e76db789a78432e1f303c7bac54f63ef6c"}, 115 | {file = "opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl", hash = "sha256:3f16f08e02b2a2da44259c7cc712e779eff1dd8b55fdb0323e8cab09548086c0"}, 116 | ] 117 | 118 | [package.dependencies] 119 | numpy = [ 120 | {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, 121 | {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\""}, 122 | {version = ">=1.23.5", markers = "python_version >= \"3.11\""}, 123 | {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, 124 | {version = ">=1.19.3", markers = "python_version >= \"3.6\" and platform_system == \"Linux\" and platform_machine == \"aarch64\" or python_version >= \"3.9\""}, 125 | {version = ">=1.17.0", markers = "python_version >= \"3.7\""}, 126 | {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, 127 | ] 128 | 129 | [[package]] 130 | name = "packaging" 131 | version = "24.0" 132 | description = "Core utilities for Python packages" 133 | optional = false 134 | python-versions = ">=3.7" 135 | files = [ 136 | {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, 137 | {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, 138 | ] 139 | 140 | [[package]] 141 | name = "pefile" 142 | version = "2023.2.7" 143 | description = "Python PE parsing module" 144 | optional = false 145 | python-versions = ">=3.6.0" 146 | files = [ 147 | {file = "pefile-2023.2.7-py3-none-any.whl", hash = "sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6"}, 148 | {file = "pefile-2023.2.7.tar.gz", hash = "sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc"}, 149 | ] 150 | 151 | [[package]] 152 | name = "pillow" 153 | version = "10.3.0" 154 | description = "Python Imaging Library (Fork)" 155 | optional = false 156 | python-versions = ">=3.8" 157 | files = [ 158 | {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, 159 | {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, 160 | {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, 161 | {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, 162 | {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, 163 | {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, 164 | {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, 165 | {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, 166 | {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, 167 | {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, 168 | {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, 169 | {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, 170 | {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, 171 | {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, 172 | {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, 173 | {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, 174 | {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, 175 | {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, 176 | {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, 177 | {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, 178 | {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, 179 | {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, 180 | {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, 181 | {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, 182 | {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, 183 | {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, 184 | {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, 185 | {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, 186 | {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, 187 | {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, 188 | {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, 189 | {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, 190 | {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, 191 | {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, 192 | {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, 193 | {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, 194 | {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, 195 | {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, 196 | {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, 197 | {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, 198 | {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, 199 | {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, 200 | {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, 201 | {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, 202 | {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, 203 | {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, 204 | {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, 205 | {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, 206 | {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, 207 | {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, 208 | {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, 209 | {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, 210 | {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, 211 | {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, 212 | {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, 213 | {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, 214 | {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, 215 | {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, 216 | {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, 217 | {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, 218 | {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, 219 | {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, 220 | {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, 221 | {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, 222 | {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, 223 | {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, 224 | {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, 225 | {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, 226 | {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, 227 | ] 228 | 229 | [package.extras] 230 | docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] 231 | fpx = ["olefile"] 232 | mic = ["olefile"] 233 | tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] 234 | typing = ["typing-extensions"] 235 | xmp = ["defusedxml"] 236 | 237 | [[package]] 238 | name = "pydirectinput" 239 | version = "1.0.4" 240 | description = "Python mouse and keyboard input automation for Windows using Direct Input." 241 | optional = false 242 | python-versions = ">=3.4" 243 | files = [ 244 | {file = "PyDirectInput-1.0.4-py3-none-any.whl", hash = "sha256:238bbe97f505f9c8728a47ea6a787750dbe834ec1fb42b98b3d703d827eda83e"}, 245 | {file = "PyDirectInput-1.0.4.tar.gz", hash = "sha256:bebe65102c69208688402f9f4cbd2ae7afc174fd2123e156e178b1304e7f80a2"}, 246 | ] 247 | 248 | [[package]] 249 | name = "pyinstaller" 250 | version = "6.6.0" 251 | description = "PyInstaller bundles a Python application and all its dependencies into a single package." 252 | optional = false 253 | python-versions = "<3.13,>=3.8" 254 | files = [ 255 | {file = "pyinstaller-6.6.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:d2705efe79f8749526f65c4bce70ae88eea8b6adfb051f123122e86542fe3802"}, 256 | {file = "pyinstaller-6.6.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:2aa771693ee3e0a899be3e9d946a24eab9896a98d0d4035f05a22f1193004cfb"}, 257 | {file = "pyinstaller-6.6.0-py3-none-manylinux2014_i686.whl", hash = "sha256:1fc15e8cebf76361568359a40926aa5746fc0a84ca365fb2ac6caeea014a2cd3"}, 258 | {file = "pyinstaller-6.6.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:7c4a55a5d872c118bc7a5e641c2df46ad18585c002d96adad129b4ee8c104463"}, 259 | {file = "pyinstaller-6.6.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:97197593344f11f3dd2bdadbab14c61fbc4cdf9cc692a89b047cb671764c1824"}, 260 | {file = "pyinstaller-6.6.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:00d81ddeee97710245a7ed03b0f9d5a4daf6c3a07adf978487b10991e1e20470"}, 261 | {file = "pyinstaller-6.6.0-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:b7cab21db6fcfbdab47ee960239d1b44cd95383a4463177bd592613941d67959"}, 262 | {file = "pyinstaller-6.6.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:00996d2090734d9ae4a1e53ed40351b07d593c37118d3e0d435bbcfa8db9edee"}, 263 | {file = "pyinstaller-6.6.0-py3-none-win32.whl", hash = "sha256:cfe3ed214601de0723cb660994b44934efacb77a1cf0e4cc5133da996bcf36ce"}, 264 | {file = "pyinstaller-6.6.0-py3-none-win_amd64.whl", hash = "sha256:e2f55fbbdf8a99ea84b39bc5669a68624473c303486d7eb2cd9063b339f0aa28"}, 265 | {file = "pyinstaller-6.6.0-py3-none-win_arm64.whl", hash = "sha256:abbd591967593dab264bcc3bcb2466c0a1582f19a112e37e916c4212069c7933"}, 266 | {file = "pyinstaller-6.6.0.tar.gz", hash = "sha256:be6bc2c3073d3e84fb7148d3af33ce9b6a7f01cfb154e06314cd1d4c05798a32"}, 267 | ] 268 | 269 | [package.dependencies] 270 | altgraph = "*" 271 | macholib = {version = ">=1.8", markers = "sys_platform == \"darwin\""} 272 | packaging = ">=22.0" 273 | pefile = {version = ">=2022.5.30", markers = "sys_platform == \"win32\""} 274 | pyinstaller-hooks-contrib = ">=2024.3" 275 | pywin32-ctypes = {version = ">=0.2.1", markers = "sys_platform == \"win32\""} 276 | setuptools = ">=42.0.0" 277 | 278 | [package.extras] 279 | completion = ["argcomplete"] 280 | hook-testing = ["execnet (>=1.5.0)", "psutil", "pytest (>=2.7.3)"] 281 | 282 | [[package]] 283 | name = "pyinstaller-hooks-contrib" 284 | version = "2024.5" 285 | description = "Community maintained hooks for PyInstaller" 286 | optional = false 287 | python-versions = ">=3.7" 288 | files = [ 289 | {file = "pyinstaller_hooks_contrib-2024.5-py2.py3-none-any.whl", hash = "sha256:0852249b7fb1e9394f8f22af2c22fa5294c2c0366157969f98c96df62410c4c6"}, 290 | {file = "pyinstaller_hooks_contrib-2024.5.tar.gz", hash = "sha256:aa5dee25ea7ca317ad46fa16b5afc8dba3b0e43f2847e498930138885efd3cab"}, 291 | ] 292 | 293 | [package.dependencies] 294 | packaging = ">=22.0" 295 | setuptools = ">=42.0.0" 296 | 297 | [[package]] 298 | name = "pywin32-ctypes" 299 | version = "0.2.2" 300 | description = "A (partial) reimplementation of pywin32 using ctypes/cffi" 301 | optional = false 302 | python-versions = ">=3.6" 303 | files = [ 304 | {file = "pywin32-ctypes-0.2.2.tar.gz", hash = "sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60"}, 305 | {file = "pywin32_ctypes-0.2.2-py3-none-any.whl", hash = "sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"}, 306 | ] 307 | 308 | [[package]] 309 | name = "setuptools" 310 | version = "69.5.1" 311 | description = "Easily download, build, install, upgrade, and uninstall Python packages" 312 | optional = false 313 | python-versions = ">=3.8" 314 | files = [ 315 | {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, 316 | {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, 317 | ] 318 | 319 | [package.extras] 320 | docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] 321 | testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] 322 | testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] 323 | 324 | [[package]] 325 | name = "win32-setctime" 326 | version = "1.1.0" 327 | description = "A small Python utility to set file creation time on Windows" 328 | optional = false 329 | python-versions = ">=3.5" 330 | files = [ 331 | {file = "win32_setctime-1.1.0-py3-none-any.whl", hash = "sha256:231db239e959c2fe7eb1d7dc129f11172354f98361c4fa2d6d2d7e278baa8aad"}, 332 | {file = "win32_setctime-1.1.0.tar.gz", hash = "sha256:15cf5750465118d6929ae4de4eb46e8edae9a5634350c01ba582df868e932cb2"}, 333 | ] 334 | 335 | [package.extras] 336 | dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] 337 | 338 | [metadata] 339 | lock-version = "2.0" 340 | python-versions = ">=3.11, <3.13" 341 | content-hash = "9f3b8fd90e08e5e0421b8f7a3a1f686e0b2d31dcd4de12f1a7727532461b4986" 342 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------