Skip to content

engelmi/screenshooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI version Python Support

ScreenShooter

ScreenShooter provides a simple way of generating a screen shots via customizable keyboard shortcuts.

Installation

$ pip install screenshooter

Usage

The ScreenShooter is easy to use:

from screenshooter import Screenshooter, ImageSaver
s = Screenshooter(ImageSaver())

This creates a ScreenShooter that sends grabbed images to the default ImageSaver. The images are saved in ./screenshots*.png.

It is possible to customize the ScreenShooter as well as the ImageSaver:

from screenshooter import Screenshooter, ImageSaver

custom_saver_config = {
        "output_dir_parts" : ["screenshots"],
        "image_extension" : ".png",
        "image_start_index" : 1
    }
custom_shooter_config = {
        "shortcut" : "ctrl+shift",
        "monitor" : {
            "monitor_number" : 1,
            "offset_x" : "*",
            "offset_y" : 200,
            "width" : "*",
            "height": "*"
        }
    }

s = Screenshooter(ImageSaver(config_dict=custom_saver_config), config_dict=custom_shooter_config)