Coder Social home page Coder Social logo

iovxw / rssbot Goto Github PK

View Code? Open in Web Editor NEW
1.5K 24.0 188.0 928 KB

Lightweight Telegram RSS notification bot. 用于消息通知的轻量级 Telegram RSS 机器人

Home Page: http://t.me/RustRssBot

License: The Unlicense

Rust 100.00%
bot telegram rss telegram-rss telegram-bot chinese feed rssbot

rssbot's Introduction

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.

rssbot's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar hashworks avatar huihuimoe avatar iovxw avatar kunoisayami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rssbot's Issues

Support output in English

It would be nice if the bot could support English output (an English README file would be useful as well).

你好,我编译出错

root@Nanqinlang3:/home/rssbot# cargo build --release
 Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading serde_derive v1.0.21
 Downloading log v0.3.8
 Downloading serde v1.0.21
 Downloading futures-await v0.1.0
 Downloading futures v0.1.17
 Downloading serde_json v1.0.6
 Downloading tokio-core v0.1.10
 Downloading error-chain v0.10.0
 Downloading lazy_static v0.2.11
 Downloading curl v0.4.8
 Downloading chrono v0.4.0
 Downloading env_logger v0.4.3
 Downloading tokio-curl v0.1.10
 Downloading regex v0.2.2
 Downloading quick-xml v0.9.4
 Downloading pinyin-order v0.1.1
 Downloading syn v0.11.11
 Downloading serde_derive_internals v0.17.0
 Downloading quote v0.3.15
 Downloading unicode-xid v0.0.4
 Downloading synom v0.11.3
 Downloading bytes v0.4.5
 Downloading tokio-io v0.1.4
 Downloading slab v0.4.0
 Downloading scoped-tls v0.1.0
 Downloading mio v0.6.11
 Downloading iovec v0.1.1
 Downloading byteorder v1.1.0
 Downloading slab v0.3.0
 Downloading net2 v0.2.31
 Downloading lazycell v0.5.1
 Downloading cfg-if v0.1.2
 Downloading libc v0.2.33
 Downloading curl-sys v0.3.15
 Downloading socket2 v0.2.4
 Downloading libz-sys v1.0.18
 Downloading cc v1.0.3
 Downloading pkg-config v0.3.9
 Downloading num-traits v0.1.40
 Downloading dtoa v0.4.2
 Downloading itoa v0.3.4
 Downloading futures-await-await-macro v0.1.0
 Downloading futures-await-async-macro v0.1.1
 Downloading futures-await-syn v0.12.0
 Downloading futures-await-quote v0.4.0
 Downloading futures-await-synom v0.12.0
 Downloading proc-macro2 v0.1.4
 Downloading unicode-xid v0.1.0
 Downloading backtrace v0.3.4
 Downloading rustc-demangle v0.1.5
 Downloading time v0.1.38
 Downloading num v0.1.40
 Downloading num-integer v0.1.35
 Downloading num-iter v0.1.34
 Downloading thread_local v0.3.4
 Downloading utf8-ranges v1.0.0
 Downloading aho-corasick v0.6.3
 Downloading regex-syntax v0.4.1
 Downloading memchr v1.0.2
 Downloading unreachable v1.0.0
 Downloading void v1.0.2
 Downloading encoding_rs v0.7.1
 Downloading phf v0.7.21
 Downloading phf_shared v0.7.21
 Downloading siphasher v0.2.2
 Downloading phf_codegen v0.7.21
 Downloading phf_generator v0.7.21
 Downloading rand v0.3.18
 Downloading openssl-probe v0.1.1
 Downloading openssl-sys v0.9.21
 Downloading backtrace-sys v0.1.16
   Compiling utf8-ranges v1.0.0
   Compiling regex-syntax v0.4.1
   Compiling slab v0.3.0
   Compiling libc v0.2.33
   Compiling siphasher v0.2.2
   Compiling void v1.0.2
   Compiling openssl-probe v0.1.1
   Compiling serde v1.0.21
   Compiling quote v0.3.15
   Compiling dtoa v0.4.2
   Compiling lazycell v0.5.1
   Compiling byteorder v1.1.0
   Compiling rustc-demangle v0.1.5
   Compiling futures v0.1.17
   Compiling unicode-xid v0.1.0
   Compiling pkg-config v0.3.9
   Compiling futures-await-await-macro v0.1.0
   Compiling lazy_static v0.2.11
   Compiling cc v1.0.3
   Compiling unicode-xid v0.0.4
   Compiling scoped-tls v0.1.0
   Compiling slab v0.4.0
   Compiling num-traits v0.1.40
   Compiling cfg-if v0.1.2
   Compiling log v0.3.8
   Compiling itoa v0.3.4
   Compiling memchr v1.0.2
   Compiling time v0.1.38
   Compiling rand v0.3.18
   Compiling iovec v0.1.1
   Compiling phf_shared v0.7.21
   Compiling unreachable v1.0.0
   Compiling proc-macro2 v0.1.4
   Compiling curl-sys v0.3.15
   Compiling libz-sys v1.0.18
   Compiling openssl-sys v0.9.21
   Compiling backtrace-sys v0.1.16
   Compiling synom v0.11.3
   Compiling num-integer v0.1.35
   Compiling socket2 v0.2.4
   Compiling encoding_rs v0.7.1
   Compiling net2 v0.2.31
   Compiling serde_json v1.0.6
   Compiling aho-corasick v0.6.3
   Compiling bytes v0.4.5
   Compiling phf v0.7.21
   Compiling phf_generator v0.7.21
   Compiling thread_local v0.3.4
   Compiling futures-await-quote v0.4.0
error: failed to run custom build command for `openssl-sys v0.9.21`
process didn't exit successfully: `/home/rssbot/target/release/build/openssl-sys-ad227178dde9be8e/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

    $HOST = x86_64-unknown-linux-gnu
    $TARGET = x86_64-unknown-linux-gnu
    openssl-sys = 0.9.21


It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
could not be found. If you have OpenSSL installed you can likely fix this by
installing `pkg-config`.

', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.21/build.rs:210:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

系统是 debian 8
我试过 apt-get install openssl,失败。

编译报错

  • 系统信息
Distributor ID:	Debian
Description:	Debian GNU/Linux 9.4 (stretch)
Release:	9.4
Codename:	stretch
  • rust| cargo版本
rustc 1.27.0-nightly (056f589fb 2018-04-07)
cargo 1.26.0-nightly (b70ab13b3 2018-04-04)
  • 报错信息
error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:64:33
   |
64 |                     proc_macro::TokenNode::Group(delim, (s.0).0)
   |                                 ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:71:33
   |
71 |                     proc_macro::TokenNode::Op(ch, kind)
   |                                 ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:74:33
   |
74 |                     proc_macro::TokenNode::Term((s.0).0)
   |                                 ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:77:33
   |
77 |                     proc_macro::TokenNode::Literal((l.0).0)
   |                                 ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:125:29
    |
125 |                 proc_macro::TokenNode::Group(delim, s) => {
    |                             ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:134:29
    |
134 |                 proc_macro::TokenNode::Op(ch, kind) => {
    |                             ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:141:29
    |
141 |                 proc_macro::TokenNode::Term(s) => {
    |                             ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:144:29
    |
144 |                 proc_macro::TokenNode::Literal(l) => {
    |                             ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:361:21
    |
361 |         proc_macro::TokenNode::Literal(l) => l,
    |                     ^^^^^^^^^ Could not find `TokenNode` in `proc_macro`

error[E0574]: expected struct, variant or union type, found enum `proc_macro::TokenTree`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:54:21
   |
54 |         TokenStream(proc_macro::TokenTree {
   |                     ^^^^^^^^^^^^^^^^^^^^^ not a struct, variant or union type
help: possible better candidate is found in another module, you can import it into scope
   |
1  | use TokenTree;
   |

error[E0412]: cannot find type `TokenTreeIter` in module `proc_macro`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:103:38
    |
103 | pub struct TokenTreeIter(proc_macro::TokenTreeIter);
    |                                      ^^^^^^^^^^^^^ did you mean `TokenTree`?
help: possible candidates are found in other modules, you can import them into scope
    |
1   | use TokenTreeIter;
    |
1   | use imp::TokenTreeIter;
    |

error[E0277]: the trait bound `proc_macro::TokenStream: std::iter::FromIterator<proc_macro::TokenStream>` is not satisfied
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:87:29
   |
87 |         TokenStream(streams.collect::<proc_macro::TokenStream>())
   |                             ^^^^^^^ a collection of type `proc_macro::TokenStream` cannot be built from an iterator over elements of type `proc_macro::TokenStream`
   |
   = help: the trait `std::iter::FromIterator<proc_macro::TokenStream>` is not implemented for `proc_macro::TokenStream`

error[E0599]: no function or associated item named `intern` found for type `proc_macro::Term` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:274:14
    |
274 |         Term(proc_macro::Term::intern(string))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Term`

error[E0599]: no function or associated item named `float` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:318:17
    |
318 |         Literal(proc_macro::Literal::float(s))
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`

error[E0599]: no function or associated item named `integer` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:322:17
    |
322 |         Literal(proc_macro::Literal::integer(s.into()))
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`

error[E0609]: no field `kind` on type `proc_macro::TokenTree`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:360:46
    |
360 |     match stream.into_iter().next().unwrap().kind {
    |                                              ^^^^

error[E0599]: no function or associated item named `u8` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `u16` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `u32` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `u64` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `usize` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `i8` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `i16` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `i32` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `i64` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `isize` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:370:25
    |
370 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
376 | / ints! {
377 | |     u8, u16, u32, u64, usize,
378 | |     i8, i16, i32, i64, isize,
379 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `f32` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:385:25
    |
385 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
391 | / floats! {
392 | |     f32, f64,
393 | | }
    | |_- in this macro invocation

error[E0599]: no function or associated item named `f64` found for type `proc_macro::Literal` in the current scope
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/src/unstable.rs:385:25
    |
385 |                   Literal(proc_macro::Literal::$t(t))
    |                           ^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::Literal`
...
391 | / floats! {
392 | |     f32, f64,
393 | | }
    | |_- in this macro invocation

error: aborting due to 28 previous errors

Some errors occurred: E0277, E0412, E0433, E0574, E0599, E0609.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `proc-macro2`.

To learn more, run the command again with --verbose.

请问这是设么情况呢

Broken Dependency: proc-macro2 ... again ...

Local compiler:
rustc --version
rustc 1.31.0 (abe02cefd 2018-12-04)
rustc +nightly --version
rustc 1.32.0-nightly (f4a421ee3 2018-12-13)

errors:

error[E0658]: use of unstable library feature 'proc_macro_span' (see issue #54725)
   --> /home/xiaoniu/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.6/src/unstable.rs:284:13
    |
284 |     Nightly(proc_macro::SourceFile, FileName),
    |             ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(proc_macro_span)] to the crate attributes to enable

error[E0658]: use of unstable library feature 'proc_macro_span' (see issue #54725)
   --> /home/xiaoniu/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.6/src/unstable.rs:289:20
    |
289 |     fn nightly(sf: proc_macro::SourceFile) -> Self {
    |                    ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add #![feature(proc_macro_span)] to the crate attributes to enable

机器人初始化失败

thread 'main' panicked at 'failed to initialize bot: Telegram(404, "Not Found", None)', libcore/result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.
是因为我的IP被telegram墙了?

订阅列表中相关网站,但是退订的时候提示未订阅

从之前的某天开始,发现机器人不会推送我自己的博客:www.mrkevin.net/feed

我尝试退订再订阅,退订的时候提示未订阅过的Rss,订阅的时候提示已订阅过的 RSS
_20190221114837

之后我将DATAFILE 里的相关数据删除再尝试,依然提示上面的信息
附上我的DATAFILE

rssbot.zip

想问下作者,为啥我订阅自己生成的RSS,更新之后,机器人没有推送呢?

下面是我的RSS
http://huginn.meepoai.com/users/1/web_requests/4/test.xml
这个是freebuf的我自己生成的RSS,同时我订阅了官方的RSS:http://www.freebuf.com/feed
问题就是我自己订阅的RSS更新之后机器人不推送,官方的feed没问题,
我还去看了我生成的RSS,源码随着官网更新也在实时变化,为啥不退送呢?
希望作者能给予一些解答,谢谢!

后台运行问题

nohup后台运行23天后,无法使用/rss /sub等命令,但是机器人在持续运行,能够正常推送,只能杀掉进程后重新运行。
image

rssbot与huginn冲突问题

rssbot与huginn搭建在同一个vps上,rssbot不能推送或者订阅huginn抓取生成的rss。
如下图
image
域名会直接变成localhost:3000,显示在已订阅列表后无法操作,也无法退订

不支持带端口的网址吗?

DDNS架设的wordpress站,原生的feed,但是是用的900的端口,提示我拉取出错,打开链接发现是不带端口的地址😳

添加一个新RSS源后无限推送消息:已订阅过的 RSS

是自建的服务,添加了个rss源后出现无限推送消息的bug
image
登陆到服务器上杀掉进程才停止发送。
另外,在服务器上重启进程后依然推送了一个空的:已订阅过的RSS
image
注意两次推送的时间,22的那次是我重启bot后立即推送的,但只推送了一次。

能否支持导入 OPML

我有一个 RustRssBot 在公共群组中,订阅了较多内容,目前需要将其迁移至另一个群组中,因此有了这个想法

编译报错,可以帮助解决吗?

使用的是最新版nightly,系统是centos7
`[root@zrj766 ~]# cd rssbot-1.4.2
[root@zrj766 rssbot-1.4.2]# cargo build --release

Compiling regex v0.2.10

error: linker cc not found
|

= note: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile regex.

To learn more, run the command again with --verbose.

[root@zrj766 rssbot-1.4.2]#`

[feature] may not be used on the stable release channe

#cargo build --release
Compiling proc-macro2 v0.1.4
$&lt;2&gt;error[E0554]$&lt;2>$<2>: #![feature] may not be used on the stable release channel$<2>
$&lt;2&gt;$&lt;2>--> $&lt;2&gt;/root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.4/src/lib.rs:22:35$&lt;2>
$&lt;2&gt;$&lt;2>|$<2>
$&lt;2&gt;22$&lt;2> $&lt;2&gt;$&lt;2>| $&lt;2&gt;#![cfg_attr(feature = "unstable", feature(proc_macro))]$&lt;2>
$&lt;2&gt;$&lt;2>| $&lt;2&gt; $&lt;2>$<2>^^^^^^^^^^^^^^^^^^^^$<2>

$&lt;2&gt;error$&lt;2>$<2>: aborting due to previous error$<2>

error: Could not compile proc-macro2.

To learn more, run the command again with --verbose

编译到最后几步报错

Compiling tokio-core v0.1.16
Compiling tokio-curl v0.1.11
Compiling telebot v0.1.1 (file:///root/rssbot/telebot)
Compiling rssbot v1.4.2 (file:///root/rssbot)
error[E0658]: impl Trait in return position is experimental (see issue #34511)
--> src/feed.rs:292:6
|
292 | ) -> Result<(Vec, String, u32)> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable

error[E0658]: impl Trait in return position is experimental (see issue #34511)
--> src/feed.rs:345:6
|
345 | ) -> impl Future<Item = RSS, Error = Error> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable

error[E0658]: impl Trait in return position is experimental (see issue #34511)
--> src/utlis.rs:78:6
|
78 | ) -> impl Future<Item = (), Error = telebot::Error> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable

error[E0658]: impl Trait in return position is experimental (see issue #34511)
--> src/cmdhandles.rs:443:6
|
443 | ) -> impl Future<Item = Option, Error = telebot::Error> + 'a {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable

error[E0658]: impl Trait in return position is experimental (see issue #34511)
--> src/fetcher.rs:86:6
|
86 | ) -> Result<(), ()> {
| ^^^^^^^^^^^^^^
|
= help: add #![feature(conservative_impl_trait)] to the crate attributes to enable

error: aborting due to 5 previous errors

For more information about this error, try rustc --explain E0658.
error: Could not compile rssbot.

To learn more, run the command again with --verbose.

当RSS源证书过期时,无法订阅

比如有一个RSS源,采用https协议,但是现在证书过期了,我再想订阅时,提示

订阅失败: 网络错误 ([60] Peer certificate cannot be authenticated with given CA certificates)

而且RSS更新时,也不会发消息了。
希望可以加一个可选的参数,可以忽略这些错误,强行订阅和更新。

机器人初始化无反应

小白一个,多多见谅
从bot father获取了token,下载解压命令没打错,
试了3个vps都是没有任何响应
翻了所有的issue好像没有类似的情况,不知道怎么办了

1

2

关于 2.0 alpha版本 无法顺利启动的问题

我先运行了 1.44 的编译后版本
确认key,网络环境正确无误,并可以工作
再运行了 2.0 alpha 然无法顺利启动
如图:
GjgB6I.png

代理配置是类似:
export http_proxy=$proxy
export https_proxy=$proxy
export no_proxy="localhost, 127.0.0.1, ::1"

我想知道,我还缺什么?

编译时遇到无法编译proc-macro2的问题

rust 版本 1.28.0 nightly

error[E0433]: failed to resolve. Could not find Op in proc_macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:131:42
|
131 | let mut op = proc_macro::Op::new(tt.op(), spacing);
| ^^ Could not find Op in proc_macro

error[E0433]: failed to resolve. Could not find Term in proc_macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:446:59
|
446 | Span::Nightly(s) => Term::Nightly(proc_macro::Term::new(string, s)),
| ^^^^ Could not find Term in proc_macro

error[E0412]: cannot find type Term in module proc_macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:439:25
|
439 | Nightly(proc_macro::Term),
| ^^^^ not found in proc_macro
help: possible candidates are found in other modules, you can import them into scope
|
3 | use Term;
|
3 | use imp::Term;
|
3 | use stable::Term;
|

error[E0412]: cannot find type Term in module proc_macro
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:473:44
|
473 | fn unwrap_nightly(self) -> proc_macro::Term {
| ^^^^ not found in proc_macro
help: possible candidates are found in other modules, you can import them into scope
|
3 | use Term;
|
3 | use imp::Term;
|
3 | use stable::Term;
|

error[E0599]: no variant named Op found for type proc_macro::TokenTree in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:228:13
|
228 | proc_macro::TokenTree::Op(tt) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in proc_macro::TokenTree

error[E0599]: no variant named Term found for type proc_macro::TokenTree in the current scope
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:237:13
|
237 | proc_macro::TokenTree::Term(s) => ::Term::_new(Term::Nightly(s)).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in proc_macro::TokenTree

error: aborting due to 6 previous errors

Some errors occurred: E0412, E0433, E0599.
For more information about an error, try rustc --explain E0412.
error: Could not compile proc-macro2.

怎么修改 推送的频率

我自己弄了一个机器人,推送rss,默认时间是5分钟,想知道怎么修改间隔的时间呢

针对频道/群主或按照订阅内容开启Preview

虽然bot本身不应该在消息中包含正文内容,但是部分链接(比如Twitter)之类的Telegram本身有蛮好的preview或者是instant view。

有些时候这个还是希望能够保留Preview的功能,不知道是否能够按照RSS订阅/发送消息的群组/频道进行控制,在部分情况下开启Preview。

启动失败

今天突然运行中断,重启报错:
thread 'main' panicked at 'failed to initialize bot: Json(ErrorImpl { code: ExpectedSomeValue, line: 1, column: 1 })', libcore/result.rs:945:5
note: Run with RUST_BACKTRACE=1 for a backtrace.

你好,我编译时出现了一些错误,请求帮助

root@two:~/rssbot-1.4.1# cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading log v0.3.8                                                         
 Downloading curl v0.4.8                                                        
 Downloading serde_derive v1.0.15                                               
 Downloading error-chain v0.10.0                                                
 Downloading quick-xml v0.9.4                                                   
 Downloading futures v0.1.16                                                    
 Downloading pinyin-order v0.1.1                                                
 Downloading serde_json v1.0.4                                                  
 Downloading lazy_static v0.2.9                                                 
 Downloading serde v1.0.15                                                      
 Downloading regex v0.2.2                                                       
 Downloading tokio-core v0.1.10                                                 
 Downloading env_logger v0.4.3                                                  
 Downloading chrono v0.4.0                                                      
 Downloading tokio-curl v0.1.10                                                 
 Downloading futures-await v0.1.0                                               
 Downloading curl-sys v0.3.15                                                   
 Downloading libc v0.2.32                                                       
 Downloading socket2 v0.2.4                                                     
 Downloading libz-sys v1.0.18                                                   
 Downloading pkg-config v0.3.9                                                  
 Downloading cc v1.0.1                                                          
 Downloading serde_derive_internals v0.16.0                                     
 Downloading quote v0.3.15                                                      
 Downloading syn v0.11.11                                                       
 Downloading synom v0.11.3                                                      
 Downloading unicode-xid v0.0.4                                                 
 Downloading backtrace v0.3.3                                                   
 Downloading rustc-demangle v0.1.5                                              
 Downloading cfg-if v0.1.2                                                      
 Downloading tokio-io v0.1.3                                                    
 Downloading slab v0.4.0                                                        
 Downloading iovec v0.1.1                                                       
 Downloading mio v0.6.10                                                        
 Downloading bytes v0.4.5                                                       
 Downloading scoped-tls v0.1.0                                                  
 Downloading byteorder v1.1.0                                                   
 Downloading net2 v0.2.31                                                       
 Downloading lazycell v0.5.1                                                    
 Downloading slab v0.3.0                                                        
 Downloading num-traits v0.1.40                                                 
 Downloading dtoa v0.4.2                                                        
 Downloading itoa v0.3.4                                                        
 Downloading memchr v1.0.1                                                      
 Downloading encoding_rs v0.7.1                                                 
 Downloading phf v0.7.21                                                        
 Downloading phf_shared v0.7.21                                                 
 Downloading siphasher v0.2.2                                                   
 Downloading phf_codegen v0.7.21                                                
 Downloading phf_generator v0.7.21                                              
 Downloading rand v0.3.17                                                       
 Downloading thread_local v0.3.4                                                
 Downloading regex-syntax v0.4.1                                                
 Downloading aho-corasick v0.6.3                                                
 Downloading utf8-ranges v1.0.0                                                 
 Downloading unreachable v1.0.0                                                 
 Downloading void v1.0.2                                                        
 Downloading time v0.1.38                                                       
 Downloading num v0.1.40                                                        
 Downloading num-iter v0.1.34                                                   
 Downloading num-integer v0.1.35                                                
 Downloading futures-await-async-macro v0.1.0                                   
 Downloading futures-await-await-macro v0.1.0                                   
 Downloading futures-await-synom v0.12.0                                        
 Downloading futures-await-syn v0.12.0                                          
 Downloading proc-macro2 v0.1.3                                                 
 Downloading futures-await-quote v0.4.0                                         
 Downloading unicode-xid v0.1.0                                                 
 Downloading openssl-probe v0.1.1                                               
 Downloading openssl-sys v0.9.20                                                
 Downloading backtrace-sys v0.1.16                                              
   Compiling cc v1.0.1                                                          
   Compiling pkg-config v0.3.9
   Compiling void v1.0.2
   Compiling unicode-xid v0.1.0
   Compiling siphasher v0.2.2
   Compiling libc v0.2.32
   Compiling unicode-xid v0.0.4
   Compiling byteorder v1.1.0
   Compiling lazy_static v0.2.9
   Compiling cfg-if v0.1.2
   Compiling regex-syntax v0.4.1
   Compiling utf8-ranges v1.0.0
   Compiling num-traits v0.1.40
   Compiling lazycell v0.5.1
   Compiling futures v0.1.16
   Compiling log v0.3.8
   Compiling quote v0.3.15
   Compiling slab v0.3.0
   Compiling openssl-probe v0.1.1
   Compiling scoped-tls v0.1.0
   Compiling rustc-demangle v0.1.5
   Compiling slab v0.4.0
   Compiling itoa v0.3.4
   Compiling dtoa v0.4.2
   Compiling serde v1.0.15
   Compiling futures-await-await-macro v0.1.0
   Compiling backtrace-sys v0.1.16
   Compiling libz-sys v1.0.18
   Compiling openssl-sys v0.9.20
   Compiling curl-sys v0.3.15
   Compiling unreachable v1.0.0
   Compiling proc-macro2 v0.1.3
error[E0277]: the trait bound `proc_macro::Span: std::default::Default` is not satisfied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.3/src/unstable.rs:163:17
    |
163 | pub struct Span(proc_macro::Span);
    |                 ^^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `proc_macro::Span`
    |
    = note: required by `std::default::Default::default`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `proc-macro2`.

To learn more, run the command again with --verbose.
root@two:~/rssbot-1.4.1# cargo +nightly build --release
   Compiling phf_shared v0.7.21
   Compiling proc-macro2 v0.1.3
error[E0277]: the trait bound `proc_macro::Span: std::default::Default` is not satisfied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.3/src/unstable.rs:163:17
    |
163 | pub struct Span(proc_macro::Span);
    |                 ^^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `proc_macro::Span`
    |
    = note: required by `std::default::Default::default`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `proc-macro2`.

To learn more, run the command again with --verbose.
root@two:~/rssbot-1.4.1# cargo +nightly build --verbose
   Compiling cc v1.0.1
     Running `rustc --crate-name cc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.1/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=86cbab482404088c -C extra-filename=-86cbab482404088c --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling pkg-config v0.3.9
     Running `rustc --crate-name pkg_config /root/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.3.9/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=5f052722d1b32389 -C extra-filename=-5f052722d1b32389 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling unicode-xid v0.1.0
     Running `rustc --crate-name unicode_xid /root/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' -C metadata=fedb2cc7e58a400d -C extra-filename=-fedb2cc7e58a400d --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling void v1.0.2
     Running `rustc --crate-name void /root/.cargo/registry/src/github.com-1ecc6299db9ec823/void-1.0.2/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=f5f1346ef1f2b0c5 -C extra-filename=-f5f1346ef1f2b0c5 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling libc v0.2.32
     Running `rustc --crate-name libc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.32/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=771c5adca69a954b -C extra-filename=-771c5adca69a954b --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling siphasher v0.2.2
     Running `rustc --crate-name siphasher /root/.cargo/registry/src/github.com-1ecc6299db9ec823/siphasher-0.2.2/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=d696eba773d3bed8 -C extra-filename=-d696eba773d3bed8 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling cfg-if v0.1.2
     Running `rustc --crate-name cfg_if /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-0.1.2/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=16a71c55f776d252 -C extra-filename=-16a71c55f776d252 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling unicode-xid v0.0.4
     Running `rustc --crate-name unicode_xid /root/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.0.4/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' -C metadata=5683306a961eed3b -C extra-filename=-5683306a961eed3b --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling lazy_static v0.2.9
     Running `rustc --crate-name lazy_static /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-0.2.9/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=76433d389bd172b6 -C extra-filename=-76433d389bd172b6 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling byteorder v1.1.0
     Running `rustc --crate-name byteorder /root/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=79cbd3b4817ec7a4 -C extra-filename=-79cbd3b4817ec7a4 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling lazycell v0.5.1
     Running `rustc --crate-name lazycell /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lazycell-0.5.1/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=07d5cd7de544faf1 -C extra-filename=-07d5cd7de544faf1 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling num-traits v0.1.40
     Running `rustc --crate-name num_traits /root/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.1.40/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=6e808d059cb19fc5 -C extra-filename=-6e808d059cb19fc5 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling regex-syntax v0.4.1
     Running `rustc --crate-name regex_syntax /root/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.4.1/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=53b1030d755b8923 -C extra-filename=-53b1030d755b8923 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling log v0.3.8
     Running `rustc --crate-name log /root/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.3.8/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=1d54bed63de82cf0 -C extra-filename=-1d54bed63de82cf0 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling utf8-ranges v1.0.0
     Running `rustc --crate-name utf8_ranges /root/.cargo/registry/src/github.com-1ecc6299db9ec823/utf8-ranges-1.0.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=84ee0b59af2e8fc2 -C extra-filename=-84ee0b59af2e8fc2 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling quote v0.3.15
     Running `rustc --crate-name quote /root/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-0.3.15/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=385c2bc0ac7669f2 -C extra-filename=-385c2bc0ac7669f2 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling slab v0.3.0
     Running `rustc --crate-name slab /root/.cargo/registry/src/github.com-1ecc6299db9ec823/slab-0.3.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=2f9722fd172d07f3 -C extra-filename=-2f9722fd172d07f3 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling futures v0.1.16
     Running `rustc --crate-name futures /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.16/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' --cfg 'feature="with-deprecated"' -C metadata=84fdb20ce36cd25f -C extra-filename=-84fdb20ce36cd25f --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling slab v0.4.0
     Running `rustc --crate-name slab /root/.cargo/registry/src/github.com-1ecc6299db9ec823/slab-0.4.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=6a6719dcc77d5c01 -C extra-filename=-6a6719dcc77d5c01 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling scoped-tls v0.1.0
     Running `rustc --crate-name scoped_tls /root/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=4e3ae22131f3bd76 -C extra-filename=-4e3ae22131f3bd76 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling rustc-demangle v0.1.5
     Running `rustc --crate-name rustc_demangle /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.5/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=4ce5c81c4d8293fe -C extra-filename=-4ce5c81c4d8293fe --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling openssl-probe v0.1.1
     Running `rustc --crate-name openssl_probe /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-probe-0.1.1/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=730235018b1a4212 -C extra-filename=-730235018b1a4212 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling itoa v0.3.4
     Running `rustc --crate-name itoa /root/.cargo/registry/src/github.com-1ecc6299db9ec823/itoa-0.3.4/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=6aa4964eee486900 -C extra-filename=-6aa4964eee486900 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling dtoa v0.4.2
     Running `rustc --crate-name dtoa /root/.cargo/registry/src/github.com-1ecc6299db9ec823/dtoa-0.4.2/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=6a8a4b4aed4a47ba -C extra-filename=-6a8a4b4aed4a47ba --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling serde v1.0.15
     Running `rustc --crate-name serde /root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.15/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=3185b36e8e4e51e7 -C extra-filename=-3185b36e8e4e51e7 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling futures-await-await-macro v0.1.0
     Running `rustc --crate-name futures_await_await_macro /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-await-await-macro-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=28c519116adaf1f2 -C extra-filename=-28c519116adaf1f2 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --cap-lints allow`
   Compiling backtrace-sys v0.1.16
     Running `rustc --crate-name build_script_build /root/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.16/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=9d63aacc0e46ffa0 -C extra-filename=-9d63aacc0e46ffa0 --out-dir /root/rssbot-1.4.1/target/debug/build/backtrace-sys-9d63aacc0e46ffa0 -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern cc=/root/rssbot-1.4.1/target/debug/deps/libcc-86cbab482404088c.rlib --cap-lints allow`
   Compiling libz-sys v1.0.18
     Running `rustc --crate-name build_script_build /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libz-sys-1.0.18/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=bd1ced0b52d4f6e6 -C extra-filename=-bd1ced0b52d4f6e6 --out-dir /root/rssbot-1.4.1/target/debug/build/libz-sys-bd1ced0b52d4f6e6 -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern pkg_config=/root/rssbot-1.4.1/target/debug/deps/libpkg_config-5f052722d1b32389.rlib --extern cc=/root/rssbot-1.4.1/target/debug/deps/libcc-86cbab482404088c.rlib --cap-lints allow`
   Compiling openssl-sys v0.9.20
     Running `rustc --crate-name build_script_build /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.20/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=a778e77af0b42fd3 -C extra-filename=-a778e77af0b42fd3 --out-dir /root/rssbot-1.4.1/target/debug/build/openssl-sys-a778e77af0b42fd3 -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern cc=/root/rssbot-1.4.1/target/debug/deps/libcc-86cbab482404088c.rlib --extern pkg_config=/root/rssbot-1.4.1/target/debug/deps/libpkg_config-5f052722d1b32389.rlib --cap-lints allow`
   Compiling curl-sys v0.3.15
     Running `rustc --crate-name build_script_build /root/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=ac6b74b9a046f5da -C extra-filename=-ac6b74b9a046f5da --out-dir /root/rssbot-1.4.1/target/debug/build/curl-sys-ac6b74b9a046f5da -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern cc=/root/rssbot-1.4.1/target/debug/deps/libcc-86cbab482404088c.rlib --extern pkg_config=/root/rssbot-1.4.1/target/debug/deps/libpkg_config-5f052722d1b32389.rlib --cap-lints allow`
   Compiling proc-macro2 v0.1.3
     Running `rustc --crate-name proc_macro2 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="unstable"' -C metadata=832d01640e015d29 -C extra-filename=-832d01640e015d29 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern unicode_xid=/root/rssbot-1.4.1/target/debug/deps/libunicode_xid-fedb2cc7e58a400d.rlib --cap-lints allow`
error[E0277]: the trait bound `proc_macro::Span: std::default::Default` is not satisfied
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.3/src/unstable.rs:163:17
    |
163 | pub struct Span(proc_macro::Span);
    |                 ^^^^^^^^^^^^^^^^^ the trait `std::default::Default` is not implemented for `proc_macro::Span`
    |
    = note: required by `std::default::Default::default`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: Could not compile `proc-macro2`.

Caused by:
  process didn't exit successfully: `rustc --crate-name proc_macro2 /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.3/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg feature="unstable" -C metadata=832d01640e015d29 -C extra-filename=-832d01640e015d29 --out-dir /root/rssbot-1.4.1/target/debug/deps -L dependency=/root/rssbot-1.4.1/target/debug/deps --extern unicode_xid=/root/rssbot-1.4.1/target/debug/deps/libunicode_xid-fedb2cc7e58a400d.rlib --cap-lints allow` (exit code: 101)

机器人失效

image

image
如图,当退出vps后机器人停止工作,只有重新ssh到vps重新输入命令才能恢复,但是一旦停止就重复这个现象。

编译到 rssbot v1.4.3 出现报错

rustc 1.28.0-nightly (e3bf634e0 2018-06-28)

Compiling rssbot v1.4.3 (file:///root/rssbot)
error[E0659]: await is ambiguous
--> src/checker.rs:24:37
|
24 | let (_, chat) = await!(bot.get_chat(subscriber).send())
| ^^^^^
|
note: await could refer to the name imported here
--> src/checker.rs:3:5
|
3 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/checker.rs:31:29
|
31 | await!(bot.get_chat_member(subscriber, bot.inner.id).send())
| ^^^^^
|
note: await could refer to the name imported here
--> src/checker.rs:3:5
|
3 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:449:19
|
449 | let msg = await!(bot.message(chat_id, "正在验证 Channel".to_string()).send())?.1;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:451:29
|
451 | let channel = match await!(bot.get_chat(channel).send()) {
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:455:17
|
455 | await!(bot.edit_message_text(chat_id, msg_id, msg).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:462:13
|
462 | await!(bot.edit_message_text(chat_id, msg_id, msg).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:467:33
|
467 | let admins_list = match await!(bot.get_chat_administrators(channel_id).send()) {
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:474:17
|
474 | await!(bot.edit_message_text(chat_id, msg_id, msg).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:482:13
|
482 | await!(bot.edit_message_text(chat_id, msg_id, msg).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:488:13
|
488 | await!(bot.edit_message_text(chat_id, msg_id, msg).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/cmdhandles.rs:492:9
|
492 | await!(bot.delete_message(chat_id, msg_id).send())?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/cmdhandles.rs:2:5
|
2 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/feed.rs:319:24
|
319 | let mut resp = await!(session.perform(req))?;
| ^^^^^
|
note: await could refer to the name imported here
--> src/feed.rs:8:5
|
8 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/fetcher.rs:43:29
|
43 | await!(fetch_feed_updates(bot.clone(), db.clone(),
| ^^^^^
|
note: await could refer to the name imported here
--> src/fetcher.rs:4:5
|
4 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/fetcher.rs:49:21
|
49 | await!(Timeout::new(Duration::from_secs(1), &handle2)
| ^^^^^
|
note: await could refer to the name imported here
--> src/fetcher.rs:4:5
|
4 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/fetcher.rs:85:21
|
85 | let rss = match await!(feed::fetch_feed(
| ^^^^^
|
note: await could refer to the name imported here
--> src/fetcher.rs:4:5
|
4 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/fetcher.rs:109:27
|
109 | match await!(m) {
| ^^^^^
|
note: await could refer to the name imported here
--> src/fetcher.rs:4:5
|
4 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

error[E0659]: await is ambiguous
--> src/fetcher.rs:179:15
|
179 | match await!(r) {
| ^^^^^
|
note: await could refer to the name imported here
--> src/fetcher.rs:4:5
|
4 | use futures::prelude::*;
| ^^^^^^^^^^^^^^^^^^^
= note: await is also a builtin macro
= note: consider adding an explicit import of await to disambiguate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.