Skip to content

Screenshot utility with visual countdown timer that captures clean images without timer overlay

Notifications You must be signed in to change notification settings

sahed-saad/ScreenSnip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ScreenSnip 📸

A simple yet elegant screenshot tool with a countdown timer overlay. Perfect for capturing your screen without the timer appearing in the final image!

Python Version License

✨ Features

  • Countdown Timer: Visual countdown (5 seconds by default) before screenshot
  • Clean Capture: Timer disappears before capture, ensuring clean screenshots
  • Auto-Save: Screenshots automatically saved with timestamp
  • Organized Storage: All images saved to Images/ folder in project directory
  • Timestamped Filenames: Format: YYYY-MM-DD-HH-MM-SS.png

🚀 Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)

Installation

  1. Clone the repository
   git clone https://github.com/sahed-saad/ScreenSnip.git
   cd ScreenSnip
  1. Install dependencies
   pip install pyscreenshot pillow

Usage

Run the script:

python app.py

What happens:

  1. A countdown timer appears on screen (5... 4... 3... 2... 1...)
  2. Timer disappears
  3. Screenshot is captured
  4. Image is saved to Images/ folder
  5. Screenshot opens in your default image viewer

📁 Project Structure

ScreenSnip/
├── app.py              # Main application script
├── Images/             # Screenshots saved here (auto-created)
│   ├── 2024-12-20-14-35-42.png
│   └── 2024-12-20-14-36-15.png
├── README.md           # Project documentation

🛠️ How It Works

  1. Countdown Overlay: Creates a tkinter window with a countdown timer
  2. Window Properties:
    • Always on top (-topmost)
    • Borderless (overrideredirect)
    • Yellow background with red text for visibility
  3. Timer Logic: Recursive countdown using root.after()
  4. Screenshot Capture: Uses pyscreenshot.grab() after timer closes
  5. Auto-Save: Saves to Images/ folder with timestamp filename

🎨 Customization

Change Countdown Duration

Edit line 26 in app.py:

countdown_overlay(5)  # Change 5 to any number of seconds

Change Timer Appearance

Edit lines 10-11 in app.py:

label = tk.Label(root, 
    font=('Helvetica', 48),  # Font and size
    fg='red',                # Text color
    bg='yellow'              # Background color
)

Change Save Location

Edit line 39 in app.py:

images_folder = os.path.join(script_dir, "Images")  # Change "Images" to your folder name

Change Filename Format

Edit line 48 in app.py:

timestamp = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")  # Customize format

Other format options:

  • "%Y%m%d_%H%M%S"20241220_143542
  • "%Y-%m-%d_%I-%M-%S_%p"2024-12-20_02-35-42_PM
  • "%Y%m%d"20241220 (date only)

📦 Dependencies

  • pyscreenshot: Cross-platform screenshot library
  • Pillow (PIL): Python Imaging Library for image processing
  • tkinter: Built-in Python GUI library (comes with Python)

🐛 Troubleshooting

"ModuleNotFoundError: No module named 'pyscreenshot'"

pip install pyscreenshot pillow

Screenshot includes the countdown timer

Increase the buffer time on line 29:

time.sleep(0.2)  # Increase to 0.5 or 1.0

Images folder created in wrong location

The script uses __file__ to determine its location. Make sure you're running the script directly, not importing it.

tkinter not found (Linux)

# Ubuntu/Debian
sudo apt-get install python3-tk

# Fedora
sudo dnf install python3-tkinter

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see below for details:

MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

🙏 Acknowledgments

  • Built with Python's tkinter for GUI
  • Uses pyscreenshot for cross-platform screenshot capability
  • Inspired by the need for clean screenshot captures

⭐ If you find this project useful, please consider giving it a star on GitHub!

About

Screenshot utility with visual countdown timer that captures clean images without timer overlay

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages