(Translated by https://www.hiragana.jp/)
GitHub - iovxw/rssbot: Lightweight Telegram RSS notification bot. 用于消息通知的轻量级 Telegram RSS 机器人
Skip to content
/ rssbot Public

Lightweight Telegram RSS notification bot. よう消息通しょうそくつう知的ちてき轻量级 Telegram RSS つくえじん

License

Notifications You must be signed in to change notification settings

iovxw/rssbot

Repository files navigation

rssbot Build Status Github All Releases

Other Languages: English

Telegram RSS つくえじん @RustRssBot

支持しじ:

  • RSS 0.9
  • RSS 0.91
  • RSS 0.92
  • RSS 0.93
  • RSS 0.94
  • RSS 1.0
  • RSS 2.0
  • Atom 0.3
  • Atom 1.0
  • JSON Feed 1

使用しよう

/rss       - 显示とうぜん订阅てき RSS れつひょう
/sub       - 订阅いち个 RSS: /sub http://example.com/feed.xml
/unsub     - 退すさ订一个 RSS: /unsub http://example.com/feed.xml
/export    - 导出为 OPML

しも

直接ちょくせつReleases しも载预编译てきほどじょ(带 zh てき为中ぶんばん), Linux 版本はんぽんmusl せい态链せっ, 无需其他

编译

请先尝试从上めん载, 如不可ふかぎょうあるものゆう其他需求さい动编译

先安さきやすそう Rust Nightly 以及 Cargo (推荐使用しよう rustup), しかきさき:

cargo build --release

编译このみてきぶんけん于: ./target/release/rssbot

运行

USAGE:
    rssbot [FLAGS] [OPTIONS] <token>

FLAGS:
    -h, --help          Prints help information
        --insecure      DANGER: Insecure mode, accept invalid TLS certificates
        --restricted    Make bot commands only accessible for group admins
    -V, --version       Prints version information

OPTIONS:
        --admin <user id>...        Private mode, only specified user can use this bot. This argument can be passed
                                    multiple times to allow multiple admins
        --api-uri <tgapi-uri>       Custom telegram api URI [default: https://api.telegram.org/]
    -d, --database <path>           Path to database [default: ./rssbot.json]
        --max-feed-size <bytes>     Maximum feed size, 0 is unlimited [default: 2097152]
        --max-interval <seconds>    Maximum fetch interval [default: 43200]
        --min-interval <seconds>    Minimum fetch interval [default: 300]

ARGS:
    <token>    Telegram bot token

NOTE: You can get <user id> using bots like @userinfobot @getidsbot

<token>参照さんしょう 这里 さる

环境变量

  • HTTP_PROXY: よう于 HTTP てき代理だいり
  • HTTPS_PROXY: よう于 HTTPS てき代理だいり
  • RSSBOT_DONT_PROXY_FEEDS: 设为 1 使つかい所有しょゆう订阅てき RSS 不通ふつう代理だいり(仅代理だいり Telegram)
  • NO_PROXY: 暂不支持しじとうまち reqwest#877

从旧てき RSSBot 迁移

对于 はらさき Clojure 版本はんぽんてき Bot, 以使よう以下いか脚本きゃくほん转换すうすえ

#!/bin/bash

DATABASE=$1
TARGET=$2

DATA=$(echo "SELECT url, title FROM rss;" | sqlite3 $DATABASE)
IFS=$'\n'

echo -e "[\c" > $TARGET
for line in ${DATA[@]}
do
    IFS='|'
    r=($line)
    link=${r[0]}
    title=${r[1]}

    echo -e "{\"link\":\"$link\"," \
            "\"title\":\"$title\"," \
            "\"error_count\":0," \
            "\"hash_list\":[]," \
            "\"subscribers\":[\c" >> $TARGET

    subscribers=$(echo "SELECT subscriber FROM subscribers WHERE rss='$link';" | sqlite3 $DATABASE)
    IFS=$'\n'
    for subscriber in ${subscribers[@]}
    do
        echo -e "$subscriber,\c" >> $TARGET
    done

    echo -e "]},\c" >> $TARGET
done
echo "]" >> $TARGET
sed -i "s/,]/]/g" $TARGET

まいりすう 1 为旧すうすえ库地, 2 为结はて输出

需要じゅよう注意ちゅういてきやめ推送てき RSS 记录かい保留ほりゅう, 如果直接ちょくせつ使用しよう转换きさきてきすうすえ库, かいじゅう复推おくきゅうてき RSS

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

About

Lightweight Telegram RSS notification bot. よう消息通しょうそくつう知的ちてき轻量级 Telegram RSS つくえじん

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages