A collection of scripts to automate/simplify daily tasks and boost productivity.
π Alert Using Web Scraping
A pair of Python scripts that monitor a website for specific changes and trigger an audio alert. Created for personal use to monitor a specific website's dropdown menu changes.
These scripts offer two different approaches to web scraping:
- Simple Method (
scraping_and_alert_using_requests.py
): Usesrequests
andBeautifulSoup
- Advanced Method (
scraping_and_alert_using_selenium.py
): UsesSelenium
for JavaScript-heavy sites
- Python 3.x
- Required packages:
pip install requests beautifulsoup4 selenium pygame webdriver-manager
- A
.mp3
file namedmusic.mp3
in the same directory for the alert sound
- Continuously monitors a specified website
- Checks dropdown menu for specific text
- Plays audio alert when target text is found
- Shows timestamp of alerts
-
Choose the appropriate script based on your needs:
- Use
requests
script for simple websites - Use
selenium
script for dynamic/JavaScript-heavy sites
- Use
-
Modify these variables in the script:
url = 'your_target_website_url' song_path = 'path_to_your_alert_sound.mp3'
-
Adjust the search criteria according to your target website:
- Modify the Structure according to your target website (Here i used id to find specific dropdown).
- Change the search text in
'text' in option.text.lower()
-
Run the script:
python scraping_and_alert_using_requests.py # or python scraping_and_alert_using_selenium.py
- This project was created for personal use
- The target website URL has been removed for privacy
- Modify the scripts according to your target website's structure
- Be mindful of the website's terms of service and scraping policies (Check Robots.txt)
β¨οΈ AHK Arrowless Keyboard (CapsLock Edition)
AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, primarily designed to provide easy keyboard shortcuts or hotkeys, fast macro-creation and software automation to allow users of most computer skill levels to automate repetitive tasks in any Windows application.
π Download AutoHotkey: https://www.autohotkey.com/
My keyboard doesn't have arrow keys and is also missing some media keys, so I thought I could use Caps Lock in combination with other keys. I created this script to fit my needs. You can modify this script according to your own requirements.
Since my keyboard doesn't have arrow keys, I have mapped Caps Lock as a modifier key to replace arrow keys:
Shortcut | Action |
---|---|
CapsLock + I |
Move Up (β) |
CapsLock + K |
Move Down (β) |
CapsLock + J |
Move Left (β) |
CapsLock + L |
Move Right (β) |
CapsLock + ; |
Move Right (β) |
CapsLock + Win + P |
Take a Screenshot (Print Screen) |
CapsLock + Backspace |
Delete Key |
CapsLock + 1 |
Mute Volume |
CapsLock + 2 |
Decrease Volume |
CapsLock + 3 |
Increase Volume |
π IKJL is somewhat similar to WSAD, which we commonly use for playing games.
- Install AutoHotkey from here.
- Download this script and double-click to run it.
If you don't want to install AHK, you can convert this script into an EXE file:
- Install AutoHotkey.
- Right-click the
.ahk
file and select "Compile Script". - This will generate an
.exe
file that you can run without AutoHotkey.
Alternatively, you can directly download the pre-compiled .exe
file from the folder I have provided.
To make the script run automatically every time you start your computer:
- Press
Win + R
, typeshell:startup
, and hit Enter. - Copy the
.exe
file (or the.ahk
script) into this folder. - The script will now run automatically on startup!
If you don't want to compile the script yourself, you can directly download the EXE file from the folder I have provided.
- Caps Lock functionality is not affected; it still works normally for typing uppercase letters.
- You can modify the script to customize shortcuts as needed.
- To stop the script, right-click the AHK icon in the system tray and select Exit.
π‘ Need help? Visit the AutoHotkey documentation: https://www.autohotkey.com/docs/
Enjoy smooth navigation with Caps Lock! π
π Modified Files Tracker
This Python script helps users find files that have been modified after a specified date and time within a given directory and its subdirectories. It also provides the flexibility to exclude specific folders from the search and saves the list of modified files in a text file (modified_files.txt
).
- Backup Management: Identify newly modified files to back up only what's necessary.
- System Security: Detect unauthorized or unexpected file modifications.
1οΈβ£ Run the script by executing python modified_files_tracker.py
.
2οΈβ£ Enter the root folder path where you want to search for modified files.
3οΈβ£ Provide the date and time (format: YYYY-MM-DD HH:MM:SS
) to check modifications after.
4οΈβ£ (Optional) Enter comma-separated folder names to exclude from the scan.
5οΈβ£ The script will generate modified_files.txt
containing the list of modified files.
The script creates a file modified_files.txt
, listing the names of modified files found in the directory.
π¨ Passport Size Photo 2x4 - Photoshop Script
This JavaScript script is designed to be used with a Photoshop Action file (.atn). It takes a single photo in photoshop, converts it into a passport-sized image with a neat border, and arranges it in a 2x4 grid. The final Photo(2x4) can be printed on 4x6 photo paper.
- Add the Action file to photoshop From the Actions window.
- Now place the Script (without changing name) to the
C:\Program Files\Adobe\Presets and Scripts\Script_By_SN.js
- Set up process Done!
-
Open Photo in photoshop
-
Photo of any person should have Transparent Background
-
You can do this with photoshop or any other online web app Adobe-Express-Online
-
Now select the primary color in photoshop which you want as Background in your Passport size photo.
-
Now just Run that action file it will ask you how much you want to crop(it will automatically maintain the aspect ratio), once you done cropping press enter.
-
Now you get the final output of passport size images (arranged 2x4) with neat border.
π οΈ Resource Injector for EXE
Here we take an example of manifest file to inject in EXE
This Python script embeds a manifest file into an EXE (executable file) using Resource Hacker to modify Windows application behavior, such as:
- Running the EXE with administrator privileges.
- Enabling DPI awareness for high-resolution screens.
- Configuring Windows compatibility settings.
Download and install Resource Hacker from the official website:
π Download Resource Hacker
Here's an example of a manifest that forces the EXE to run as an administrator:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Save this file as manifest.xml
in your working directory.
Modify the manifest_path
and exe_path
inside the python script i provided:
manifest_path = r"G:\manifest.xml"
exe_path = r"G:\System_manager.exe"
Now, run the script:
python exe_resource_injector.py
If successful, you'll see:
Manifest merged successfully.
The script:
- Locates Resource Hacker: The script assumes it is installed in
C:\Program Files (x86)\Resource Hacker\
. - Runs a Command: It uses
subprocess
to execute a command that:- Opens the EXE.
- Embeds (or replaces) the manifest.
- Saves the updated EXE.
- Handles Errors: If anything fails, an error message is displayed.
- Run EXE as Administrator: Avoids manual right-clicking β "Run as administrator".
- Enable DPI Scaling: Fixes blurry UI on high-resolution displays.
- Control UAC Behavior: Reduces unnecessary prompts.
π€ Any issues or errors? Please raise them now.