This repository contains a collection of useful Python and PowerShell scripts.
A Python-based GUI application built with Tkinter that allows users to convert PDF files into high-quality images (PNG, JPEG, TIFF, BMP). It provides options for selecting PDF files, output directories, image formats, and various quality (DPI) presets.
Features:
- Convert PDF pages to individual image files.
- Supports PNG, JPEG, TIFF, and BMP output formats.
- Adjustable quality/zoom factor (DPI) with presets (Screen, High, Print, Ultra).
- Progress bar and status updates during conversion.
- Error handling and user-friendly interface.
Dependencies:
tkinter(built-in Python library)PyMuPDF(fitz)Pillow(PIL)pathlib(built-in Python library)queue(built-in Python library)threading(built-in Python library)
How to Run:
- Ensure you have Python installed.
- Install the required libraries:
pip install PyMuPDF Pillow
- Run the script:
python pdf_converter_gui.py
A simple voice recorder application built with Tkinter. It allows users to record audio, apply noise cancellation, adjust volume, and save recordings in various formats (WAV, FLAC, OGG, MP3). It also features a basic real-time waveform visualization.
Features:
- Record audio from your microphone.
- Adjustable volume control.
- Optional noise cancellation with adjustable level.
- Save recordings in WAV, FLAC, OGG, or MP3 formats.
- Real-time audio waveform visualization.
Dependencies:
tkinter(built-in Python library)sounddevicenumpyscipysoundfilepydub
How to Run:
- Ensure you have Python installed.
- Install the required libraries:
You might also need to install
pip install sounddevice numpy scipy soundfile pydub
portaudioforsounddeviceto work correctly. On Windows, you can often install it viapipwin install pyaudioor by installing the appropriate C++ build tools. For MP3 export,pydubrequiresffmpeg. See theinstall_ffmpeg.ps1script for an automated way to install FFmpeg on Windows. - Run the script:
python sound_recorder.py
A PowerShell script designed to automate the download, extraction, and addition of FFmpeg to the system's PATH environment variable on Windows. This script is particularly useful for setting up FFmpeg, which is a prerequisite for certain functionalities in sound_recorder.py (e.g., MP3 export).
Features:
- Downloads the latest FFmpeg essentials build from
gyan.dev. - Extracts FFmpeg to a specified directory.
- Adds the FFmpeg
bindirectory to the system's PATH, makingffmpegcommands accessible from any terminal. - Includes error handling for download and extraction processes.
How to Run:
- Open PowerShell as an Administrator.
- Navigate to the directory containing
install_ffmpeg.ps1. - Run the script:
You might need to adjust your PowerShell execution policy to run local scripts:
.\install_ffmpeg.ps1
(Choose 'Y' to confirm)Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Note: After running the FFmpeg installer, you may need to restart your terminal or VS Code for the PATH changes to take effect.
A Python script that automates the process of deleting your replies on Twitter (now X). It uses Selenium to log in to your account, navigate to your "Posts & replies" section, and iteratively delete replies based on a configurable limit.
Features:
- Automated login to Twitter/X.
- Navigates to the user's "Posts & replies" page.
- Iteratively finds and deletes replies.
- Configurable limits for deletions per session and scroll attempts.
- Handles various UI elements and potential errors during the deletion process.
Dependencies:
seleniumpython-dotenv
How to Run:
- Ensure you have Python installed.
- Install the required libraries:
pip install selenium python-dotenv
- Download and install a compatible WebDriver for your browser (e.g., ChromeDriver for Google Chrome). Ensure the WebDriver executable is in your system's PATH or specify its location in the script.
- Create a
.envfile in the same directory astweety_replies.pywith your Twitter credentials:Replace the placeholder values with your actual Twitter username, password, and profile name (e.g.,TWITTER_USERNAME="your_twitter_username" TWITTER_PASSWORD="your_twitter_password" TWITTER_PROFILE_NAME="your_twitter_profile_name" # TWITTER_VERIFICATION_INPUT="your_verification_input_if_needed"elonmuskif your profile URL isx.com/elonmusk). TheTWITTER_VERIFICATION_INPUTis optional and only needed if Twitter prompts for additional verification during login (e.g., email or phone number associated with the account). - Run the script:
python tweety_replies.py