No project description provided
Project description
@FindInChannelBot
Telegram 的消息搜索功能不支持中日韩等语言,因为这类语言字词间不加空格。而我习惯于使用 Telegram 的频道做笔记,因此一个好用的搜索功能对我来说很重要。为了能方便地在频道内搜索,这个机器人诞生了。
The ‘Find in Conversations’ feature in Telegram does not support searching in languages like Chinese/Japanese/Korean etc., since these languages do not have spaces between words. I'm used to take notes in Telegram channels, so it's important for me to have a better search tool. I made this bot so I can find in channels easily.
Usage
/start
the bot
/add
a channel to the bot
/find
in the channel
/lang
setting UI language
/cancel
the current action
/help
show help
The user interface language of this bot follows your Telegram settings by default (language packs on Telegram desktop, and system language settings on mobiles). Please help with translating!
Deploy
Instead of HTTP bot API, this bot uses MTProto client API. Please obtain these tokens:
- App
api_id
andapi_hash
, please obtain it at https://my.telegram.org/apps; - Bot token, please obtain it by talking to @BotFather.
You can install it via PyPI:
pip3 install -U telegram-find-in-channel-bot
Or clone this repo and install from source:
cd telegram-find-in-channel-bot
for f in tgficbot/locales/*.po; do
mkdir -p ${f%.po}/LC_MESSAGES
msgfmt $f -o ${f%.po}/LC_MESSAGES/main.mo
done
python3 setup.py install
Run apt install gettext
if command msgfmt
not found.
(Optional) If cryptg
is installed, the bot will work faster:
apt update
apt install clang python3-dev
pip3 install -U cryptg
Configuration file is by default ~/.config/tgficbot.cfg
, but you can specify a different location. Here's the format:
[api]
id = 123456
hash = xxxxxxxxxxxxxxxxx
[bot]
token = 123456789:xxxxxxxxxxxxxxxxxxxx
To run:
python3 -m tgficbot.main --config <config_file> --dbpath <directory_to_store_database>
The parameter following --dbpath
indicates where the databases are stored. They are in ~/.cache/
if you don't specify --dbpath
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file telegram-find-in-channel-bot-0.4.0.tar.gz
.
File metadata
- Download URL: telegram-find-in-channel-bot-0.4.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a65024efd51e21d8e628c875a93c2b76bf54983556e21b4fe5188af0985ad46 |
|
MD5 | 397fa2fd2b41aad6c642987258d4ebfd |
|
BLAKE2b-256 | d29dc31899ade6bbb64f2d17a6f3d6dcd7a879ffd53a87addfe8fa9f93e11a56 |
File details
Details for the file telegram_find_in_channel_bot-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: telegram_find_in_channel_bot-0.4.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8106c6d13cac7fda324a50f1dbc33801005f0fde5446900555e8d14b105d69d5 |
|
MD5 | d16258b5e6a90f3b45c138f2323099fb |
|
BLAKE2b-256 | da88dbce635f951ad42f7a27e969c491d801177d5776e71bc12013d7839e7293 |