From 41c4b962d466aa9a1b0452f43cfe2f4740f932a5 Mon Sep 17 00:00:00 2001 From: ArshErgon Date: Sun, 25 Sep 2022 14:54:22 +0430 Subject: [PATCH] added screenshot --- .gitignore | 2 ++ scripts/Screen_Shot/ReadMe.md | 9 +++++++++ scripts/Screen_Shot/requirements.txt | 9 +++++++++ scripts/Screen_Shot/screen_shot.py | 14 ++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 .gitignore create mode 100644 scripts/Screen_Shot/ReadMe.md create mode 100644 scripts/Screen_Shot/requirements.txt create mode 100644 scripts/Screen_Shot/screen_shot.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d75edea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +venv +__pycache__ \ No newline at end of file diff --git a/scripts/Screen_Shot/ReadMe.md b/scripts/Screen_Shot/ReadMe.md new file mode 100644 index 0000000..7ae6efd --- /dev/null +++ b/scripts/Screen_Shot/ReadMe.md @@ -0,0 +1,9 @@ +## Screen Shot CLI proudly made with Python + +### Installation +``` +$ pip install -i requirements.txt +$ python3 screen_shot.py +``` + +> change the sleep time if for you its take time to minimize the Terminal window. Images will be save inside the present folder \ No newline at end of file diff --git a/scripts/Screen_Shot/requirements.txt b/scripts/Screen_Shot/requirements.txt new file mode 100644 index 0000000..36350b3 --- /dev/null +++ b/scripts/Screen_Shot/requirements.txt @@ -0,0 +1,9 @@ +MouseInfo==0.1.3 +PyAutoGUI==0.9.53 +PyGetWindow==0.0.9 +PyMsgBox==1.0.9 +pyperclip==1.8.2 +PyRect==0.2.0 +PyScreeze==0.1.28 +python3-xlib==0.15 +pytweening==1.0.4 diff --git a/scripts/Screen_Shot/screen_shot.py b/scripts/Screen_Shot/screen_shot.py new file mode 100644 index 0000000..f2a1410 --- /dev/null +++ b/scripts/Screen_Shot/screen_shot.py @@ -0,0 +1,14 @@ +import pyautogui +from time import sleep + +def screenshot_fun(): + print("Screenshot program runs on console\nchange the sleep time if you can the screenshot captured the terminal also") + sleepTimer = 2 + print(f"You've {sleepTimer} to minimize the terminal window") + sleep(2) + print("Captured the screen now") + screenshot_img = pyautogui.screenshot() + screenshot_img.save("screen.png") + +if __name__ == '__main__': + screenshot_fun()