刘凡 9ff4d1d109 add S3,archive,truncate | 2 år sedan | |
---|---|---|
.. | ||
s3scrot | 2 år sedan | |
.gitignore | 2 år sedan | |
README.md | 2 år sedan | |
setup.py | 2 år sedan |
A screenshot tool that automatically uploads to Amazon S3 and copies the URL to the clipboard.
After ensuring dependencies are met, simply run:
pip install s3scrot
The first time you run s3scrot it will complain that you do not have a config file. It will create a default one for you in your home directory (~/.s3scrot). Edit this file according to the comments in that file. You will need to enter your Amazon S3 bucket, and access credentials.
usage: s3scrot [-h] [-n] [-c] [-b] [-p] [-j] [-q QUALITY]
s3scrot
optional arguments:
-h, --help show this help message and exit
-n, --non-interactive
Capture the whole screen, don't wait for mouse
selection
-c, --no-clipboard Do not copy URL to clipboard
-b, --open-browser Open browser to screenshot URL
-p, --print-url Print URL
-j, --jpeg Use JPEG compression instead of PNG
-q QUALITY, --quality QUALITY
Image quality (1-100) high value means high size, low
compression. Default: 75. For lossless png, low
quality means high compression.
s3scrot
Then click on a window or click and drag across a rectangular region of the screen you wish to capture.
s3scrot -ncbpj -q 50
This will take a screenshot of the entire screen, does not copy the URL to the clipboard, opens the browser to the URL, prints the URL, and uses JPEG compression instead of PNG, at a quality level of 50.
I wanted an easy way to paste screenshots into IRC / hipchat. I use i3wm and so I have some easy keybindings setup to use s3scrot:
bindsym $mod+Print exec "s3scrot -b"
bindsym $mod+Shift+Print exec "s3scrot -bn"
That makes Alt+PrintScreen take a screenshot with selection, and Alt+Shift+PrintScreen take a whole screen screenshot. Then it opens my browser with the URL for preview, and I can paste the URL directly into my chat client.