Changes In Branch trunk Excluding Merge-Ins
This is equivalent to a diff from 01565c7f7e to d8c1d259a2
|
2026-04-23
| ||
| 18:44 | some fixes (by CodeRabbit), merge changes from release branch leaf check-in: d8c1d259a2 user: arcade tags: trunk | |
| 10:36 | fix workflow, fix and comment clippy warnings bump rustls-webpki to 0.103.13 (fixes 2 lowsec issues) leaf check-in: 01565c7f7e user: arcade tags: release, v0.5.6 | |
|
2026-04-18
| ||
| 18:31 | bump, update workflow, add update reaction code, change paging logic check-in: be0b8602d1 user: arcade tags: trunk | |
| 18:28 | bump deps and workflow check-in: 2af2d3bc25 user: arcade tags: release, v0.5.5 | |
Modified Cargo.lock
from [1310a2aaa8]
to [6aa5bd626f].
| ︙ | |||
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 | 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 | + + + + + + | source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "pkg-config", "vcpkg", ] [[package]] name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] |
| ︙ | |||
2030 2031 2032 2033 2034 2035 2036 | 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 | - + + + + | "derive_builder", "never", "quick-xml", ] [[package]] name = "rsstg" |
| ︙ | |||
2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 | 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 | + + | [[package]] name = "toml" version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", "serde_spanned", "toml_datetime", "toml_parser", "toml_writer", "winnow", ] [[package]] name = "toml_datetime" version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" |
| ︙ | |||
2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 | 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 | + + + + + + | version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] [[package]] name = "toml_writer" version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tower" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", |
| ︙ | |||
2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 | 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 | + + + + + + + + + | ] [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "ttl_cache" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4189890526f0168710b6ee65ceaedf1460c48a14318ceec933cb26baa492096a" dependencies = [ "linked-hash-map", ] [[package]] name = "typenum" version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" |
| ︙ |
Modified Cargo.toml
from [a175952cdd]
to [12972fe474].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - - - + + + + + + + + | [package] name = "rsstg" |
Modified LICENSE.0BSD
from [25cd2d58c1]
to [a725e46479].
| 1 2 3 4 5 6 7 8 | - + |
|
| ︙ |
Modified src/command.rs
from [f2ddddf16c]
to [86e99002d1].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + + + + + + + + + + + - + + - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + - + + + + - + - + + + + + + + + + + + + + - - - - - - - - - - - |
|
| ︙ | |||
128 129 130 131 132 133 134 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Some(thing) } } }, None => None, }; let chat_id = ChatUsername::from(channel.as_ref()); |
Modified src/core.rs
from [7b880bf97c]
to [f29c7ca645].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | + + + + + + + + - + - + - - - - - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - |
use crate::{
Arc,
command,
Mutex,
sql::Db,
tg_bot::{
Callback,
MyMessage,
Tg,
validate,
},
};
use std::{
borrow::Cow,
collections::{
BTreeMap,
HashSet,
},
|
| ︙ | |||
110 111 112 113 114 115 116 117 118 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | + + + - - - + - + - - - + + + - + - - - - - - + - - + - - + - + - + - + - - - - - - - - - - - - |
smol::block_on(async {
let mut set = self.running.lock_arc().await;
set.remove(&self.my_id);
})
}
}
pub type FeedList = BTreeMap<i32, String>;
type UserCache = TtlCache<i64, Arc<Mutex<FeedList>>>;
#[derive(Clone)]
pub struct Core {
|
| ︙ | |||
216 217 218 219 220 221 222 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - + + + + + |
///
/// `Posted: N` where `N` is the number of posts processed and sent.
pub async fn check (&self, id: i32, real: bool, last_scrape: Option<DateTime<Local>>) -> Result<String> {
let mut posted: i32 = 0;
let mut conn = self.db.begin().await.stack()?;
let _token = Token::new(&self.running, id).await.stack()?;
|
| ︙ | |||
259 260 261 262 263 264 265 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | + - - - - + + + + - - - - - - - - + + - - - + + + |
} else {
&dates[0]
}
},
None => bail!("Feed item misses posting date."),
}),
}.stack()?;
posts.insert(date, Post{
|
| ︙ | |||
316 317 318 319 320 321 322 | 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - + - + + + + + + - + - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + |
Some(ref x) => sedregex::ReplaceCommand::new(x).stack()?.execute(&post.uri),
None => post.uri.clone().into(),
};
if ! conn.exists(&post_url, id).await.stack()? {
if this_fetch.is_none() || *date > this_fetch.unwrap() {
this_fetch = Some(*date);
};
|
Modified src/main.rs
from [527f3dd3d4]
to [97fdb38ade].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | + + + + + + + + - + |
//! This is telegram bot to fetch RSS/ATOM feeds and post results on public
//! channels
#![warn(missing_docs)]
mod command;
mod core;
mod sql;
mod tg_bot;
use std::sync::Arc;
use async_compat::Compat;
use smol::lock::Mutex;
use stacked_errors::{
Result,
StackableErr,
};
use tgbot::handler::LongPoll;
fn main () -> Result<()> {
smol::block_on(Compat::new(async {
async_main().await.unwrap();
}));
Ok(())
}
/// Initialises configuration and the bot core, then runs the Telegram long-poll loop.
///
/// This function loads configuration (with a default API gateway), constructs the application
/// core, and starts the long-polling loop that handles incoming Telegram updates.
async fn async_main () -> Result<()> {
let settings = config::Config::builder()
.set_default("api_gateway", "https://api.telegram.org").stack()?
.add_source(config::File::with_name("rsstg"))
.build()
.stack()?;
let core = core::Core::new(settings).await.stack()?;
|
Modified src/sql.rs
from [33552cf8df]
to [91f3b5a681].
|
Added src/tg_bot.rs version [186b21c68f].