-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clippy issues, remove some dep #452
Changes from 3 commits
e14b823
64e4bf5
9ca1749
e74e842
0cb160c
b27ab89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,12 @@ native-tls = [ | |
"reqwest/native-tls-vendored", | ||
"reqwest/native-tls-alpn", | ||
] | ||
rustls = [ | ||
"tbot/rustls", | ||
"hyper-proxy/rustls", | ||
"reqwest/rustls-tls", | ||
] | ||
rustls = ["tbot/rustls", "hyper-proxy/rustls", "reqwest/rustls-tls"] | ||
|
||
[build-dependencies] | ||
ctl10n = "0.2.0" | ||
|
||
[dependencies] | ||
lazy_static = "1.4" | ||
once_cell = "1.18" | ||
anyhow = "1.0" | ||
structopt = "0.3" | ||
futures = "0.3" | ||
|
@@ -55,6 +49,6 @@ version = "0.9" | |
default-features = false | ||
|
||
[dependencies.reqwest] | ||
version = "0.11" | ||
version = "0.12" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reqwest 0.12 breaks tbot |
||
default-features = false | ||
features = ["gzip", "json"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,17 @@ | |
Telegram RSS bot [@RustRssBot](http://t.me/RustRssBot) | ||
|
||
**Supports:** | ||
- [x] RSS 0.9 | ||
- [x] RSS 0.91 | ||
- [x] RSS 0.92 | ||
- [x] RSS 0.93 | ||
- [x] RSS 0.94 | ||
- [x] RSS 1.0 | ||
- [x] RSS 2.0 | ||
- [x] Atom 0.3 | ||
- [x] Atom 1.0 | ||
- [x] JSON Feed 1 | ||
|
||
- [x] RSS 0.9 | ||
- [x] RSS 0.91 | ||
- [x] RSS 0.92 | ||
- [x] RSS 0.93 | ||
- [x] RSS 0.94 | ||
- [x] RSS 1.0 | ||
- [x] RSS 2.0 | ||
- [x] Atom 0.3 | ||
- [x] Atom 1.0 | ||
- [x] JSON Feed 1 | ||
|
||
## Usage | ||
|
||
|
@@ -25,13 +26,13 @@ Telegram RSS bot [@RustRssBot](http://t.me/RustRssBot) | |
|
||
## Download | ||
|
||
The pre-compiled binaries can be downloaded directly from [Releases](https://github.com/iovxw/rssbot/releases). Make sure to use the english binary (`rssbot-en-amd64-linux`). The Linux version is statically linked to *musl*, no other dependencies required. | ||
The pre-compiled binaries can be downloaded directly from [Releases](https://github.com/iovxw/rssbot/releases). Make sure to use the english binary (`rssbot-en-amd64-linux`). The Linux version is statically linked to _musl_, no other dependencies required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't change the style |
||
|
||
## Compile | ||
|
||
**Please try to download from the Link above, if that's not feasible or you have other requirements you should compile manually** | ||
|
||
Install *Rust Nightly* and *Cargo* ([`rustup` recommended](https://www.rustup.rs/)) first, then: | ||
Install _Rust Nightly_ and _Cargo_ ([`rustup` recommended](https://www.rustup.rs/)) first, then: | ||
|
||
``` | ||
LOCALE=en cargo build --release | ||
|
@@ -58,7 +59,7 @@ OPTIONS: | |
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-feed-size <bytes> Maximum feed size, 0 is unlimited [default: 2M] | ||
--max-interval <seconds> Maximum fetch interval [default: 43200] | ||
--min-interval <seconds> Minimum fetch interval [default: 300] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,20 @@ | |
|
||
**Other Languages:** [English](README.en.md) | ||
|
||
Telegram RSS 机器人 [@RustRssBot](http://t.me/RustRssBot) | ||
Telegram RSS 机器人 [@RustRssBot](http://t.me/RustRssBot) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2 space? |
||
|
||
**支持:** | ||
- [x] RSS 0.9 | ||
- [x] RSS 0.91 | ||
- [x] RSS 0.92 | ||
- [x] RSS 0.93 | ||
- [x] RSS 0.94 | ||
- [x] RSS 1.0 | ||
- [x] RSS 2.0 | ||
- [x] Atom 0.3 | ||
- [x] Atom 1.0 | ||
- [x] JSON Feed 1 | ||
|
||
- [x] RSS 0.9 | ||
- [x] RSS 0.91 | ||
- [x] RSS 0.92 | ||
- [x] RSS 0.93 | ||
- [x] RSS 0.94 | ||
- [x] RSS 1.0 | ||
- [x] RSS 2.0 | ||
- [x] Atom 0.3 | ||
- [x] Atom 1.0 | ||
- [x] JSON Feed 1 | ||
|
||
## 使用 | ||
|
||
|
@@ -25,13 +26,13 @@ Telegram RSS 机器人 [@RustRssBot](http://t.me/RustRssBot) | |
|
||
## 下载 | ||
|
||
可直接从 [Releases](https://github.com/iovxw/rssbot/releases) 下载预编译的程序(带 `zh` 的为中文版), Linux 版本为 *musl* 静态链接, 无需其他依赖 | ||
可直接从 [Releases](https://github.com/iovxw/rssbot/releases) 下载预编译的程序(带 `zh` 的为中文版), Linux 版本为 _musl_ 静态链接, 无需其他依赖 | ||
|
||
## 编译 | ||
|
||
**请先尝试从上面下载, 如不可行或者有其他需求再手动编译** | ||
|
||
先安装 *Rust Nightly* 以及 *Cargo* (推荐使用 [`rustup`](https://www.rustup.rs/)), 然后: | ||
先安装 _Rust Nightly_ 以及 _Cargo_ (推荐使用 [`rustup`](https://www.rustup.rs/)), 然后: | ||
|
||
``` | ||
cargo build --release | ||
|
@@ -56,7 +57,7 @@ OPTIONS: | |
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-feed-size <bytes> Maximum feed size, 0 is unlimited [default: 2M] | ||
--max-interval <seconds> Maximum fetch interval [default: 43200] | ||
--min-interval <seconds> Minimum fetch interval [default: 300] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
use std::env; | ||
use std::path::Path; | ||
|
||
use ctl10n; | ||
|
||
const LOCALES: &[&str] = &["zh", "en"]; | ||
|
||
fn main() { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't change the style