A production-grade toolkit that monitors curated X accounts, translates their long-form threads into polished Simplified Chinese, and republishes translations through X and a Telegram operator bot.
- Account watchlists with incremental scraping and credential rotation (Tweety-powered client)
- Translation pipeline with OpenAI integration, retry/backoff, and manual override workflows
- X publishing with thread support, media handling, templated closing messages, and duplicate safeguards
- Telegram control bot plus review CLI for operators to inspect, export, and queue work
- Lightweight scheduler with JSON-backed job store for scrape/translate/publish automation
- Structured logging, typed configuration, and CI-ready tooling for automated quality gates
- Create a virtual environment using Poetry or your preferred tool, then install dependencies:
poetry install
- Configure secrets by creating a
.envfile and populating the environment variables described indocs/operations.md. - Run migrations to bring legacy JSON exports into the new storage layout:
poetry run xbot migrate from-legacy --source legacy_data_dump
- Scrape, translate, schedule, review, and publish via the CLI or Telegram bot.
See docs/operations.md for full instructions and runbooks.
src/xbot/- Source package with services, models, and interfacestests/- Unit and integration test suitesscripts/- Utility scripts (migrations, data seeding)docs/- Architecture and operations documentationvar/- Runtime artefacts (JSON stores, logs), ignored by git
Version 1.0 - This project is now feature-complete with full CI/CD integration, modern typing, and comprehensive test coverage. All core functionality has been implemented, tested, and production-ready.