-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
579feea
commit 8634267
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import fire | ||
from openadapt.crud import get_latest_recording, get_window_events | ||
from openadapt.utils import configure_logging, get_strategy_class_by_name | ||
from openadapt.models import Screenshot | ||
|
||
|
||
def crop_test(): | ||
recording = get_latest_recording() | ||
window_event = get_window_events(recording)[0] | ||
screenshot = Screenshot.take_screenshot() | ||
screenshot.image.show() | ||
screenshot.crop_active_window(window_event) | ||
screenshot.image.show() | ||
|
||
|
||
if __name__ == "__main__": | ||
fire.Fire(crop_test) |