Yasumi
A cross-platform automation tool for AFK tasks, leveraging image/template matching alongside macro recording and playback functionalities. Currently supports the Windows environment.
Origin of the Name:
The name Yasumi is derived from the Japanese word "休み" meaning rest or holiday.
Features:
-
🖼️ Image Matching:
Utilizes multiple methods (e.g., PyAutoGUI, grayscale template matching, and ORB/SIFT/AKAZE algorithms) to locate images on-screen and simulate clicks. -
🎬 Macro Recording & Playback:
Records keyboard and mouse inputs for automatic replay. Macro playback is implemented using pydirectinput on Windows and pyautogui on macOS. -
⚙️ Configurable Settings:
Allows adjustment of matching thresholds, scanning intervals, and stop keys via a configuration file (.config
). -
👤 Profile Management:
Enables creation, import, and management of multiple profiles, each with its own set of images to detect and dedicated macro recordings. -
💻 Curses-based Menu:
Provides a text-based interface for selecting matching algorithms and configuring settings.
Installation:
-
📥 Clone the Repository:
git clone https://github.com/yourusername/yasumi.git cd yasumi
-
📦 Install Dependencies:
Ensure Python 3 is installed, then install the required packages:
pip install -r requirements.txt
Note:
- On Windows, you may need to install
windows-curses
for the curses module. - On macOS, ensure your terminal (or packaged app) has Accessibility permissions for automation.
- On Windows, you may need to install
Usage:
-
🚀 Run the Tool:
From the project root, execute:
python -m src.yasumi
-
📋 Main Menu Options:
-
▶️ Start with Default Profile:
Initiates the automation/matching mode using the default profile. Macro playback runs in the background if a macro is recorded. -
✏️ Edit Profile:
Allows creation of new profiles, import of existing profiles, or modification of key macros (record, select, and clear actions). -
⚙️ Settings:
Permits adjustment of stop keys, matching thresholds, scanning duration, and more. -
🐛 Debug:
Runs the tool in debug mode for live troubleshooting. -
❌ Exit:
Quits the tool.
-
Macro Recording & Playback:
-
📹 Recording:
In the Edit Profile menu under “Modify Key Macro,” start/stop macro recording using F8 (to toggle recording on/off). -
🔄 Playback:
Macro playback runs continuously in the background when starting with the default profile. On Windows, pydirectinput is used for playback; on macOS, pyautogui and a Quartz-basedleft_click
helper are used. -
📂 Profile Selection:
Choose a specific profile to save your macro under and also clear the macro for a selected profile. -
🛑 Stopping Macro Playback:
The playback loop monitors a global flag, allowing for a stop function (e.g., via additional menu options or hotkeys).
Building an Executable:
To create a standalone executable, use PyInstaller. For example, create a .spec
file that includes your src folder and run:
pyinstaller yasumi.spec
This will produce an executable in the dist folder.
Contributing:
🤝 Contributions and feedback are welcome! Feel free to open issues or submit pull requests to help improve the project.