Fast save screenshots every x seconds for workspace
Project description
pyautoscreenshot
🖼️ A Python utility for automatically capturing and saving screenshots at regular intervals
✨ Features
- 📸 Capture screenshots at customizable intervals
- 🕒 Automatic timestamp-based filenames
- 📁 Configurable output directory
- 🏷️ Custom filename prefixes
- 🖼️ High-quality PNG format
- 🚀 Simple CLI interface
📦 Installation
Using pip
pip install pyautoscreenshot
Using uv (Recommended)
uv is a blazing-fast Python package installer:
# Install uv
pip install uv
# Install pyautoscreenshot using uv
uv pip install pyautoscreenshot
🚀 Quick Start
Command Line Usage
# Basic usage (default: 10-second interval)
pyautoscreenshot
# Custom output directory
pyautoscreenshot --output D:/screenshots
# Custom prefix and interval
pyautoscreenshot --prefix workscreen --interval 5
Python Module Usage
python -m pyautoscreenshot [options]
In Your Code
from pyautoscreenshot import take_screenshot
# Take a single screenshot
filepath = take_screenshot("./screenshots", "custom")
print(f"Screenshot saved to: {filepath}")
🎛️ Configuration Options
| Option | Short | Description | Default |
|---|---|---|---|
--output |
-o |
Output directory | ./screenshots |
--prefix |
-p |
Filename prefix | screenshot |
--interval |
-i |
Capture interval (seconds) | 10 |
🛠️ Development
Setup Development Environment
- Clone the repository
git clone https://github.com/fxyzbtc/pyautoscreenshot.git
cd pyautoscreenshot
- Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate # Windows
- Install development dependencies
uv pip install -e ".[dev]"
Running Tests
pytest
Code Style
# Format code
black .
# Sort imports
isort .
📝 Example Output
Screenshots are saved with the following naming pattern:
{prefix}_{YYYYMMDD}_{HHMMSS}.png
Example:
screenshot_20250404_153022.png
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
- 📫 Report issues on GitHub Issues
- 💬 Ask questions in Discussions
- 📚 Read the documentation
Made with ❤️ using Python
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyautoscreenshot-0.1.1.tar.gz.
File metadata
- Download URL: pyautoscreenshot-0.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9261b5eca3c9ca19eee24cbaa1fcf3d33f4f2152974dbc17eb468b67e76fb87
|
|
| MD5 |
e2a131264a84384ed74667c1cedda53f
|
|
| BLAKE2b-256 |
7efea75cba7f93443b8242a016ea834032d8a871d3f56b41f709bce948cf2be5
|
File details
Details for the file pyautoscreenshot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyautoscreenshot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41d9aeb6307b9e8d6a3fea5d7557e4e9469cafd0f96301c042911c269fe3d1b1
|
|
| MD5 |
2e42c5dfb0dedf0a61083f1e81f784d3
|
|
| BLAKE2b-256 |
4f00d0728eb2fdd6e2759493f3cce2065aeee1d233dbcfc9aaeb6886381ff3a7
|