{"id":28324411,"url":"https://github.com/bewinxed/cleanslate","last_synced_at":"2025-06-24T02:30:57.204Z","repository":{"id":292028028,"uuid":"978817688","full_name":"Bewinxed/CleanSlate","owner":"Bewinxed","description":"Clean your Twitter (X) account of any \"Problematic\" tweets :^)","archived":false,"fork":false,"pushed_at":"2025-05-07T18:32:07.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T03:22:26.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bewinxed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T14:53:24.000Z","updated_at":"2025-05-07T18:32:10.000Z","dependencies_parsed_at":"2025-05-07T19:41:01.929Z","dependency_job_id":null,"html_url":"https://github.com/Bewinxed/CleanSlate","commit_stats":null,"previous_names":["bewinxed/cleanslate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bewinxed/CleanSlate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2FCleanSlate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2FCleanSlate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2FCleanSlate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2FCleanSlate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bewinxed","download_url":"https://codeload.github.com/Bewinxed/CleanSlate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bewinxed%2FCleanSlate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261591619,"owners_count":23181761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-25T18:10:46.721Z","updated_at":"2025-06-24T02:30:57.197Z","avatar_url":"https://github.com/Bewinxed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CleanSlate\n\nA tool to automatically scan and remove problematic posts from your X (formerly Twitter) archive using a local multimodal LLM.\n\n## Overview\n\nCleanSlate is designed to help you clean your X account history by automatically analyzing and removing potentially problematic posts. It uses a multimodal LLM (Large Language Model) to analyze both text and images in your posts, including context from replies and quoted tweets, to identify content that might be inappropriate for professional settings.\n\n## Features\n\n- **Smart Content Analysis**: Uses a multimodal LLM to analyze post text and images\n- **Context-Aware**: Fetches and analyzes reply/quote context for more accurate classification\n- **Automated Deletion**: Removes problematic posts automatically via browser automation\n- **Progress Tracking**: Maintains progress across sessions with checkpointing\n- **Image Analysis**: Downloads and analyzes images in posts when using multimodal mode\n- **Detailed Logging**: Comprehensive logging of all actions and decisions\n\n## Prerequisites\n\n- Python 3.8+\n- A multimodal LLM accessible via an API compatible with OpenAI's API (local or remote)\n- Downloaded X archive containing your tweets (tweets.js file)\n- The following Python packages (automatically installed with UV):\n  - playwright\n  - requests\n  - tqdm\n  - others as listed in requirements\n\n## Installation\n\nYou can install CleanSlate using Astral's UV tool for fast dependency installation:\n\n```bash\n# Install UV (if not already installed)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n\n# Clone the repository\ngit clone https://github.com/bewinxed/CleanSlate\ncd CleanSlate\n\n# Create a virtual environment and install dependencies\nuv venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\nuv pip install -r requirements.txt\n\n# Install Playwright browsers\npython -m playwright install chromium\n```\n\n## Usage\n\nTo run CleanSlate:\n\n```bash\npython x_post_cleaner.py --tweets-file \"path/to/your/tweets.js\" --llm-studio-url \"http://localhost:1234/v1/chat/completions\"\n```\n\n### Command Line Arguments\n\n- `--tweets-file`: Path to your tweets.js file from the X data archive (required)\n- `--llm-studio-url`: URL of the LLM API service (default: \"http://localhost:1234/v1/chat/completions\")\n- `--progress-file`: Path to save progress (default: \"progress.pkl\")\n- `--no-multimodal`: Disable multimodal LLM analysis (images processing)\n- `--delay`: Delay in seconds between processing tweets (min 2, default 3)\n\n## How It Works\n\n1. **Load Tweets**: Parses your X archive's tweets.js file\n2. **Browser Automation**: Launches a browser session for X.com\n3. **Login**: Helps you log into your X account (manual login required the first time)\n4. **Process Posts**: For each post:\n   - Extracts content (text and images)\n   - Gets context from replies/quotes if necessary\n   - Uses an LLM to analyze the content\n   - If problematic, deletes the post automatically\n5. **Track Progress**: Saves progress to continue from where you left off\n\n## Notes\n\n- The first run requires manual login to X.com\n- Subsequent runs attempt to use saved cookies\n- Processing speed is controlled by the `--delay` parameter (adjust as needed)\n- Deleted posts cannot be recovered, use with caution\n\n## Project Structure\n\n- `x_post_cleaner.py`: Main script\n- `requirements.txt`: Required Python packages\n- `x_post_cleaner.log`: Log file of all actions\n- `progress.pkl`: Progress tracking file\n- `downloaded_images/`: Downloaded post images\n- `context_images/`: Images from replied-to/quoted tweets\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Disclaimer\n\nThis tool is for personal use to help clean your own social media history. Use responsibly and at your own risk. The accuracy of problematic content detection depends on the LLM model used.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewinxed%2Fcleanslate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbewinxed%2Fcleanslate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbewinxed%2Fcleanslate/lists"}