This script automates uploading your latest VCV Rack2 recording to a Patreon post by simulating drag-and-drop in your browser. No API access or keys required.
- Opens the Patreon post edit page in your default browser and tiles it left
- Opens Finder, tiles it right, and selects the newest file in your VCV Rack2 recordings folder
- Locates and clicks the Audio button using image recognition
- Simulates dragging and dropping the newest file into the Patreon post editor
- Cleans up stray files after upload
-
Clone the repository:
git clone https://github.com/yourusername/patreon-audio-uploader.git cd patreon-audio-uploader -
(Recommended) Create and activate a Python virtual environment:
python3 -m venv venv source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
Place screenshots named
audio_button.pngandupload_area.pngin the script directory. -
Run the script:
python src/patreon_dragdrop.py
- macOS
- Python 3.8+
- pyautogui
- pillow
- No Patreon API access is used.
- $HOME is used for user directories.
- The script uses AppleScript to tile windows.
To upload your latest recording to Patreon:
python src/patreon_dragdrop.py- The script will open the Patreon post edit page in your default browser.
- It will find the newest file in
~/Library/Application Support/Rack2/recordings. - The script will attempt to locate the 'Audio' button and upload area using image recognition.
- If a match is found, it will simulate clicking and dragging the file into the upload area.
- For troubleshooting, the script saves a screenshot of the matched region as
matched_audio_button.pngormatched_upload_area.pngin thesrcdirectory.
- This script requires pyautogui for simulating mouse actions.
- pillow and pyscreenshot are used for image processing and saving matched regions.
- You may need to grant accessibility permissions to your terminal or Python in macOS System Settings > Privacy & Security > Accessibility and Screen Recording.
- The script uses a strict image matching threshold (default: 0.98). If the button is not found, update your screenshots or adjust the threshold in the script.
- Screenshots for the 'Audio' button and upload area must be saved as
audio_button.pngandupload_area.pngin thesrcdirectory. Make sure they match the browser's appearance, zoom, and resolution.
Feel free to submit issues or pull requests if you have suggestions or improvements for the project.
This project is licensed under the MIT License. See the LICENSE file for more details.
- If the script cannot find the button or upload area, check the saved matched images for debugging.
- Update your reference screenshots if the Patreon UI changes.
- Ensure your browser is at 100% zoom and on the same monitor/resolution as when you took the screenshots.
The old API-based uploader and tests are deprecated. Only the drag-and-drop script is supported.