All Projects → nktknshn → tgmount

nktknshn / tgmount

Licence: Apache-2.0 license
Mount Telegram dialogs and channels as a Virtual File System.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tgmount

opentele
A Python Telegram API Library for converting between tdata and telethon sessions, with built-in official Telegram APIs.
Stars: ✭ 90 (+73.08%)
Mutual labels:  telegram-api, telethon
elfuse
FUSE filesystems in Emacs Lisp
Stars: ✭ 61 (+17.31%)
Mutual labels:  fuse, libfuse
webfuse
websocket filesystem based on libfuse
Stars: ✭ 23 (-55.77%)
Mutual labels:  fuse, libfuse
addmember-telegram
Add member auto to telegram group
Stars: ✭ 170 (+226.92%)
Mutual labels:  telegram-api, telethon
Telegram-mailer
Web-application for sending messages to list of users. Use several accounts to avoid ban.
Stars: ✭ 28 (-46.15%)
Mutual labels:  telegram-api, telethon
Telethon
Pure Python 3 MTProto API Telegram client library, for bots too!
Stars: ✭ 5,805 (+11063.46%)
Mutual labels:  telegram-api, telethon
Mergerfs
a featureful union filesystem
Stars: ✭ 2,114 (+3965.38%)
Mutual labels:  fuse, libfuse
ilovepdf
Telegram Bot that helps you to convert Images to pdf, pdf to images, 45+ file formats to pdf, more features Soon..
Stars: ✭ 140 (+169.23%)
Mutual labels:  telegram-api
squashmount
Init and management script for mounting rewritable squashfs-compressed data
Stars: ✭ 40 (-23.08%)
Mutual labels:  fuse
tdlib-binaries
prebuilt TDLib binaries
Stars: ✭ 26 (-50%)
Mutual labels:  telegram-api
Cgofuse
Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
Stars: ✭ 245 (+371.15%)
Mutual labels:  fuse
fatx
Original Xbox FATX Filesystem Library, Python bindings, FUSE driver, and GUI explorer
Stars: ✭ 87 (+67.31%)
Mutual labels:  fuse
One4uBot
Telegram Userbot Project to helping your Telegram experience based on PaperplaneExtended - Our Support https://t.me/userbotindo,
Stars: ✭ 51 (-1.92%)
Mutual labels:  telethon
hidethisbot
An inline Telegram bot to keep your private messages hidden from prying eyes.
Stars: ✭ 44 (-15.38%)
Mutual labels:  telegram-api
dedupsqlfs
Deduplicating filesystem via Python3, FUSE and SQLite
Stars: ✭ 24 (-53.85%)
Mutual labels:  fuse
TeleBot
A minimal library to develop your new Telegram bot 🐘
Stars: ✭ 40 (-23.08%)
Mutual labels:  telegram-api
GitFS
A FUSE filesystem that stores data on Git
Stars: ✭ 26 (-50%)
Mutual labels:  fuse
fusera
A FUSE interface to the NCBI Sequence Read Archive (SRA)
Stars: ✭ 28 (-46.15%)
Mutual labels:  fuse
AntiDeletedAccountsBot
Automatically kick deleted accounts
Stars: ✭ 36 (-30.77%)
Mutual labels:  telethon
ipfs-api-mount
Mount IPFS directory as local FS.
Stars: ✭ 16 (-69.23%)
Mutual labels:  fuse

Overview

The main purpose of the program is to make audio files posted on Telegram available to regular desktop audio players. This is done via VFS by mapping remote files from telegram's cloud to local file system. Tested with audio players quodlibet, deadbeef, clementine.

This version is not maintained anymore. Use new version instead https://github.com/nktknshn/tgmount-ng

Libraries used

Running

$ virtualenv .venv3.7 -p python3.7
$ source .venv3.7/bin/activate
$ pip install -r requirements.txt
$ python tgmount/tgmount.py --list-dialogs

Usage

To obtain your API id follow official manual. Running the program for the first time will require authentication.

$ export TGAPP=1234567:deadbeef0d04a3efe93e1af778773d6f0

Print your dialogs along with their numeric id's:

$ tgmount.py --list-dialogs

Print 10 newest available documents:

$ tgmount.py --list-documents --id 793392913 --limit 10

Print 10 oldest available documents:

$ tgmount.py --list-documents --id 793392913 --limit 10 --reverse

Using global telegram username:

$ tgmount.py --list-documents --id techtroit --limit 10 --reverse

Json output:

$ tgmount.py --list-documents --id techtroit --limit 10 --json

Mount channel techtroit to /mnt/techtroit/ loading all the audio files posted after message with id 11286

$ tgmount.py --mount /mnt/techtroit/ --id techtroit --offset 11286 --reverse

Download files

$ tgmount.py --download /ssd/tgfs/download/ --id techtroit --files 11823,11822

Download all files uploaded after message with id 11837

$ tgmount.py --download /ssd/tgfs/download/ --id techtroit --files $(tgmount.py --list-documents --id techtroit --offset-id 11837 --reverse --json | jq -r 'map(.message_id) | join(",")')

More options:

usage: tgmount.py [-h] [--id ID] [--mount DIR] [--list-dialogs]
                  [--list-documents] [--download DIR] [--files FILES]
                  [--all-files] [--no-updates] [--reverse] [--limit LIMIT]
                  [--offset-id OFFSET_ID] [--session SESSION]
                  [--fsname FSNAME] [--socks SOCKS] [--debug] [--debug-fuse]
                  [--json]

optional arguments:
  -h, --help            show this help message and exit
  --id ID               chat or channel ID. Telegram username or numeric ID
  --mount DIR           mount to DIR
  --list-dialogs        print available telegram dialogs
  --list-documents      print available documents
  --download DIR        save files to DIR. Use with --files parameter
  --files FILES         comma separated list of document IDs
  --all-files           Retrieve all type of files, not only audio files.
                        Default: no
  --no-updates          don't listen for new files. Default: no
  --reverse             documents will be searched in reverse order (from
                        oldest to newest). Default: from newest to oldest
  --limit LIMIT         limit number of documents or dialogs. default:
                        unlimited
  --offset-id OFFSET_ID
                        offset message ID. Only documents previous to the
                        given ID will be retrieved
  --session SESSION     telegram session name. Default: tgfs
  --fsname FSNAME       VFS name. Default: tgfs
  --socks SOCKS         SOCKS5 proxy i.e. 127.0.0.1:9050
  --debug               enable debugging output
  --debug-fuse          enable FUSE debugging output
  --json                json output. Default: no
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].