Walrus is a Python-based Telegram bot designed for transferring files between platforms. It downloads files sent via Telegram private chats—such as videos, documents, audio, photos, or other file messages—and uploads them to Rubika, either in Saved Messages or a specified channel. Users can also provide direct links like https://example.com/file.pdf or local paths like file:///path/to/video.mp4. Multiple links in a single message get queued individually. The project, hosted at rezaaa/walrus with 46 GitHub stars, targets personal workflows where Telegram acts as the interface for controlling transfers to Rubika as the storage destination.
This setup addresses a specific need for users active on both Telegram and Rubika, an Iranian messaging app. Manual file transfers between them can be tedious, especially for batches or large files. Walrus handles the process automatically, including progress tracking and error retries, while keeping operations local via session files. A disclaimer in the README stresses its use for research, learning, or personal experimentation only, warning against spam, unauthorized access, or violations of platform rules.
Core features
Walrus includes these capabilities, drawn directly from its documentation:
- File handling: Processes Telegram file messages and direct links (HTTP/HTTPS or local
file://paths), with support for videos, documents, audio, photos, and more. Multiple links per message queue separately, ending with a summary notification. - Progress and queue management: Displays live download/upload progress. Maintains a local queue to prevent overlaps. Offers buttons for status checks, canceling transfers, retrying failures (if files remain), and cleanup.
- Upload reliability: Retries on temporary Rubika errors. Notifies on completion with total elapsed time. Sanitizes original filenames for readability.
- Account and destination control: Switch Rubika sessions or accounts via Telegram commands. Select Saved Messages or recent channels as upload targets without restarting the bot.
- Security options: Restrict access to a single owner via
OWNER_TELEGRAM_ID. Sessions stored as files likewalrus.sessionfor Telegram (Pyrogram) andrubsession.rpfor Rubika (rubpy).
These features make it suitable for queued, hands-off transfers without constant monitoring.
Getting it running
Setting up Walrus requires Python 3.9 or higher, along with Telegram credentials. Start with these steps from the README:
git clone https://github.com/rezaaa/walrus.git
cd walrus
cp .env.example .env
Edit the .env file in the project root to add your details:
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
BOT_TOKEN=your_telegram_bot_token
TELEGRAM_SESSION=walrus
RUBIKA_SESSION=rubsession
OWNER_TELEGRAM_ID=123456789
Obtain API_ID and API_HASH from my.telegram.org. Create BOT_TOKEN via @BotFather on Telegram. Set OWNER_TELEGRAM_ID to your user ID—get it by forwarding a message to @userinfobot or querying @RawDataBot for from.id. Leave it unset to allow public access.
TELEGRAM_SESSION names the Pyrogram session file (e.g., walrus.session). RUBIKA_SESSION sets the rubpy session file (e.g., rubsession.rp). Changing Rubika accounts via the bot overwrites the session file without needing .env edits or restarts.
With configuration complete, run the bot (dependencies like Pyrogram and rubpy install via standard Python tools, though not detailed in the README excerpt). Once active, interact via Telegram:
- Send
/startto begin. - For initial Rubika setup (no session exists), tap
📱 Change Accountor use/set_rubika. - Provide your Rubika phone number.
- Enter account password if prompted.
- Supply the OTP code when Rubika requests it.
Success creates or updates the Rubika session file. Future uploads use this session. Quick buttons appear for managing transfers, settings, and destinations like Saved Messages or recent channels.
Who this is for
Walrus fits users bridging Telegram and Rubika for file management. It suits individuals handling personal media libraries, backups, or sharing workflows—sending files to Telegram (or links) from anywhere, then funneling them to Rubika storage. The queue and retry logic help with unreliable connections or large batches, like downloading a dozen PDFs from links.
If you maintain files across apps and prefer Telegram's bot ecosystem for control, this provides a dedicated bridge. Owner-only mode ensures privacy for solo use. Experimenters interested in Pyrogram or rubpy sessions might appreciate the code as a learning tool. It's not built for high-volume production; the 46 stars reflect its niche, personal focus.
How it compares
Few open-source tools directly mirror this Telegram-to-Rubika transfer. General file bots like @filetobot or @SaveAsBot handle Telegram internals but lack Rubika integration. Rubika-specific libraries like rubpy exist standalone, requiring custom scripts for downloads/uploads.
Broader alternatives include multi-platform managers like rclone (supports Telegram via mounts, Rubika indirectly) or TeleDrive (Telegram cloud storage). Walrus stands out for its bot-driven simplicity—no CLI needed post-setup—but ties you to these two apps. It's lighter than full sync tools yet more specialized than generic downloaders.
Practical limits and source
Walrus keeps transfers queued locally, avoiding server overloads, but relies on stable sessions and your credentials. No multi-user support beyond owner mode, and Rubika changes require OTP re-entry. It's Python-only, so resource use stays modest on a basic host.
Those needing cross-platform generality or Docker deploys might look elsewhere. Bulk enterprise transfers exceed its personal scope. Check the full README (English or Persian) and source at github.com/rezaaa/walrus to verify fit.
Comments