xpost-pulverizer
v1.0.0
Published
A powerful Python tool for bulk-deleting your old X (Twitter) tweets with CLI and TUI interfaces.
Downloads
89
Maintainers
Readme
🔥 Xpost Pulverizer
Xpost Pulverizer is a powerful Python tool for bulk-deleting your old X (Twitter) tweets. It works by parsing your easily requested X Data Archive and filtering tweets down locally before sending deletion requests via the Twitter v2 API.
It features two interfaces: a CLI Hacker Dashboard and a Textual Terminal UI (TUI).
✨ Features
- Double Interface: Choose between a high-speed CLI dashboard or a visual TUI control panel.
- Dry Run by Default: Test your filters safely. It will literally NEVER delete anything unless you explicitly arm the live mode.
- Complex Filtering:
- 📅 Date Ranges: Delete tweets sent before, after, or between specific dates.
- 💬 Keywords: Wipe tweets containing specific cringe words or starting with prefixes (e.g.,
RT @). - 📉 Engagement: Clean out tweets that flopped (e.g., less than 5 likes / 2 retweets).
- Rate Limit Armor: Automatically detects Twitter's strict API rate limits, initiates a 15-minute wait, and securely resumes the queue without crashing.
- Asynchronous & Thread-Safe: The TUI runs API tasks in the background, keeping the interface snappy and responsive.
🚀 Setup
1. Requirements
Ensure you have Python 3.10+ installed.
git clone https://github.com/radikonreturn/Xpost_Pulverizer.git
cd Xpost_Pulverizer
# Install dependencies
pip install -r requirements.txt2. Getting Your Data Archive
- Open X (Twitter) on the web.
- Go to Settings and privacy > Your account > Download an archive of your data.
- Once downloaded and extracted, find the file
data/tweets.js. - Copy
tweets.jsinto this tool'sdata/folder (create the folder if it doesn't exist):Xpost_Pulverizer/ └── data/ └── tweets.js
3. Getting API Keys
You need a Free Twitter Developer Account.
- Go to the Twitter Developer Portal.
- Create a Project and an App.
- Under User Authentication Settings, enable OAuth 1.0a and set App Permissions to Read and Write.
- Generate your keys: API Key, API Key Secret, Access Token, and Access Token Secret.
🖥️ Usage: The Terminal UI (Recommended)
The interactive TUI gives you a visual dashboard to configure filters, preview tweets, and monitor live deletions.
python xpost_pulverizer_tui.py- Sidebar: Enter your API Keys and dial in your filters.
- Preview Table: Hit
Load Archiveto parse your data locally. The table will populate with the tweets matching your filters. - Dry Run: Press 🟢
DRY RUNto simulate the deletion queue in the Event Log. - Live Delete: Toggle the Dry Run switch off and hit 🔴
DELETEto start nuking your posts permanently. Pressqat any point to safely emergency-stop the worker thread.
⌨️ Usage: The Hacker CLI
If you prefer scripting or running commands directly, use the CLI. It features a beautiful colorama box-drawing UI.
# View all available flags
python xpost_pulverizer.py --helpEnvironment Variables
For the CLI, it's recommended to store your API keys in your environment variables:
export XPOST_API_KEY="your_api_key_here"
export XPOST_API_SECRET="your_api_secret_here"
export XPOST_ACCESS_TOKEN="your_access_token_here"
export XPOST_ACCESS_TOKEN_SECRET="your_access_token_secret_here"
``` *(In Windows PowerShell, use `$env:XPOST_API_KEY="...`)*
### CLI Examples
**Safe Dry Run (List all tweets)**
```bash
python xpost_pulverizer.py -a data/tweets.jsDelete Old Retweets
python xpost_pulverizer.py -a data/tweets.js -e 2022-12-31 --starts-with "RT @" --deleteDelete Low-Engagement Cringe
python xpost_pulverizer.py -a data/tweets.js --contains cringe ratio --max-likes 2 --delete⚠️ Warning
- Permanent Action: Tweets deleted through the API cannot be recovered. Always verify your filters using a Dry Run first.
- Rate Limits: The free Twitter v2 API restricts you to 50 deletes per 24 hours (or 1,500 per month depending on tier changes). If you hit the ceiling, the script will gracefully pause and wait, but it may take days to clear hundreds of thousands of tweets.
📝 Logs
Every action (DRY, DELETE, API ERROR) is logged to pulverizer_log.txt. The log file automatically rotates with date-stamps when it exceeds 1MB.
