m-cli
m-cli copied to clipboard
Feature: Add support for screencapture
Adding support for most common screen capture use-cases might be nice.
For example:
- To screen-capture a Window:
screencapture -iW ~/Desktop/screen.jpg
(wherei
flag is interactive andW
is Window Selection Mode) - To screen-capture a user-defined rectangle:
screencapture -i ~/Desktop/screen.jpg
- To screen-capture the whole screen:
screencapture -S ~/Desktop/screen.jpg
I envision the CLI interaction might look something like:
usage: m screencap [ file-name | -w | -f | -r | help ]
Examples:
m screencap # full screencapture of current screen. File saved as ~/Desktop/screen.jpg
m screencap window.png -w # prompt user to select a window to screencapture
m screencap ~/Documents/full.jpg -f # full screencapture of current screen
m screencap rectangle.pdf -r # prompt user to select custom dimensions.
Gotchas:
- File name is required. If user types any command without specifying a file name, use a default name and location (e.g.
~/Desktop/screen.png
)
Reference: http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X
That's a good idea 👍
Options for screen capture are implemented in #102