All Projects → lilydjwg → luoxu

lilydjwg / luoxu

Licence: GPL-3.0 license
A Telegram userbot to index Chinese and Japanese group contents.

Programming Languages

python
139335 projects - #7 most used programming language
rust
11053 projects
PLpgSQL
1095 projects
shell
77523 projects

Projects that are alternatives of or similar to luoxu

tgcf
The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
Stars: ✭ 378 (+390.91%)
Mutual labels:  telegram-bot, telegram-userbot
caligo
SelfBot for Telegram
Stars: ✭ 34 (-55.84%)
Mutual labels:  telegram-bot, telegram-userbot
telegram client
library for help you make userbot or bot telegram and support tdlib telegram database and only support nodejs dart and google-apps-script
Stars: ✭ 38 (-50.65%)
Mutual labels:  telegram-bot, telegram-userbot
Rssbot
Lightweight Telegram RSS bot for notifications only. 用于消息通知的轻量级 Telegram RSS 机器人
Stars: ✭ 952 (+1136.36%)
Mutual labels:  telegram-bot, chinese
Telegram-UserBot
Abandoned.. Moved to https://github.com/TeamDerUntergang/Telegram-SedenUserBot
Stars: ✭ 38 (-50.65%)
Mutual labels:  telegram-bot, telegram-userbot
Awesome Telegram Cn
telegram 开发资源、机器人资源整理
Stars: ✭ 78 (+1.3%)
Mutual labels:  telegram-bot, chinese
AsyncTelegram
Async Arduino Telegram BOT Library for ESP8266 and ESP32
Stars: ✭ 41 (-46.75%)
Mutual labels:  telegram-bot
telegram bitcoin bot
Telegram Auto Mining Bitcoins In Termux
Stars: ✭ 115 (+49.35%)
Mutual labels:  telegram-bot
Remove-BG-Bot
A media background remover telegram bot with pyrogram framework.
Stars: ✭ 28 (-63.64%)
Mutual labels:  telegram-bot
ttskit
text to speech toolkit. 好用的中文语音合成工具箱,包含语音编码器、语音合成器、声码器和可视化模块。
Stars: ✭ 336 (+336.36%)
Mutual labels:  chinese
keyword alert bot
telegram keyword alert bot ⏰
Stars: ✭ 52 (-32.47%)
Mutual labels:  telegram-bot
binance-spot-order-notification-heoku
[binance order trade fill notification] Telegram Notification when Binance order created, cancelled or filled. Ready to Deploy on Heroku
Stars: ✭ 30 (-61.04%)
Mutual labels:  telegram-bot
jadibot
Telegram Bot for jadi.net
Stars: ✭ 59 (-23.38%)
Mutual labels:  telegram-bot
KennedyXMusic
A Bot For Playing Music In VCG Telegram!
Stars: ✭ 29 (-62.34%)
Mutual labels:  telegram-bot
GroupMusicPlayerBot
Advanced telegram group music play bot!
Stars: ✭ 32 (-58.44%)
Mutual labels:  telegram-bot
Stella
Stella - the first telegram group management bot to be built in Pyrogram.
Stars: ✭ 25 (-67.53%)
Mutual labels:  telegram-bot
my-id-bot
Telegram bot to get ID of some chats (including your own ID)
Stars: ✭ 49 (-36.36%)
Mutual labels:  telegram-bot
chinese-calendar
🔖 Chinese calendar control in C#
Stars: ✭ 22 (-71.43%)
Mutual labels:  chinese
kuebikobot
A telegram bot that deploys to heroku/aws and downloads links and torrents and uploads to google drive and returns public share link
Stars: ✭ 127 (+64.94%)
Mutual labels:  telegram-bot
H.E.L.P.
Home Environment Locating People 🍍
Stars: ✭ 19 (-75.32%)
Mutual labels:  telegram-bot

功能说明

落絮可以 CJK 友善的方式索引 Telegram 群组与频道,并提供 API 供前端使用。

安装与配置

配置 luoxu

  • 安装依赖请见 requirements.txt 文件
  • 获取一份 Telegram API key
  • 复制 config.toml.example 并按需要修改

使用 python -m luoxu.ls_dialogs 可以列出会话的 id 和名称。频道和群组的 id 可以用于配置文件中。

设置数据库

  • 安装 PostgreSQL 及 pgroonga
  • 使用 createdb 命令创建数据库
  • 使用 postgre 用户身份连接到该数据库,并执行 CREATE EXTENSION pgroonga;
  • 导入 dbsetup.sql 脚本,如 psql DBNAME < dbsetup.sql

运行

在本项目目录下(或者将本项目目录加入 Python 模块路径),执行:

python -m luoxu

配置 Web 前端

  • 可使用 luoxu-web
  • 修改 src/App.svelte 中的 API URL
  • 运行 npm run build 编译文件
  • 使用 Web 服务器 serve public 目录

你也可以使用 Vercel 来方便快捷地部署此项目。

当然了,你也可以自己另外编写 Web 页面来使用此 API。

注意事项

不要直接将索引了私有群组/频道的 API 公开于网络上!任何人都能获取其内容的。公开索引了公开群组或频道的服务前,也请获取群组/频道管理员的同意。

luoxu 相当于运行一个 Telegram 客户端,其权限是完全的(包括创建新的登录、结束已有会话、设置两步验证等)。请注意保护账号安全,不要在不信任的服务器上登录与运行本项目!

请注意配置数据库权限。Arch Linux 上默认安装的 PostgreSQL 很可能是对本地用户不设防的(请查阅 /var/lib/postgres/data/pg_hba.conf 配置文件)。

使用

搜索消息时,搜索字符串不区分简繁(会使用 OpenCC 自动转换),也不进行分词(请手动将可能不连在一起的词语以空格分开)。

搜索字符串支持以下功能:

  • 以空格分开的多个搜索词是「与」的关系
  • 使用 OR(全大写)来表达「或」条件
  • 使用 - 来表达排除,如 落絮 - 测试
  • 使用小括号来分组

数据库升级

当对 PostgreSQL 进行跨版本升级时,需要额外处理 pgroonga 的事情。

步骤示意:

  1. 安装新的数据库软件
  2. cp /usr/lib/postgresql/pgroonga* /opt/pgsql-13/lib
  3. 安装新的 pgroonga
  4. 执行升级(pg_upgrade
  5. 升级完成之后需要重新索引:
reindex index usernames_idx;
reindex index message_idx;

不兼容的变更

  • 2022年06月23日,采用分区表来提升部分查询的性能。需要更新配置文件及数据库。
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].