Compare commits

..

2 Commits

8 changed files with 14 additions and 14 deletions

10
Cargo.lock generated
View File

@ -2111,7 +2111,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "letterbox"
version = "0.0.14"
version = "0.0.15"
dependencies = [
"build-info",
"build-info-build",
@ -2516,7 +2516,7 @@ dependencies = [
[[package]]
name = "notmuch"
version = "0.0.14"
version = "0.0.15"
dependencies = [
"itertools 0.10.5",
"log",
@ -3121,7 +3121,7 @@ dependencies = [
[[package]]
name = "procmail2notmuch"
version = "0.0.14"
version = "0.0.15"
dependencies = [
"anyhow",
]
@ -3908,7 +3908,7 @@ dependencies = [
[[package]]
name = "server"
version = "0.0.14"
version = "0.0.15"
dependencies = [
"ammonia",
"anyhow",
@ -3994,7 +3994,7 @@ dependencies = [
[[package]]
name = "shared"
version = "0.0.14"
version = "0.0.15"
dependencies = [
"build-info",
"notmuch",

View File

@ -1,6 +1,6 @@
[package]
name = "notmuch"
version = "0.0.14"
version = "0.0.15"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "procmail2notmuch"
version = "0.0.14"
version = "0.0.15"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.0.14"
version = "0.0.15"
edition = "2021"
default-run = "server"

View File

@ -8,7 +8,7 @@ use std::{collections::HashMap, convert::Infallible, str::FromStr};
use async_trait::async_trait;
use css_inline::{CSSInliner, InlineError, InlineOptions};
use linkify::{LinkFinder, LinkKind};
use log::{error, info, warn};
use log::{error, warn};
use lol_html::{
element, errors::RewritingError, html_content::ContentType, rewrite_str, text,
RewriteStrSettings,
@ -141,7 +141,6 @@ impl Transformer for FrameImages {
RewriteStrSettings {
element_content_handlers: vec![
element!("img[data-src]", |el| {
info!("found image with data-src {el:?}");
let src = el
.get_attribute("data-src")
.unwrap_or("https://placehold.co/600x400".to_string());
@ -150,7 +149,6 @@ impl Transformer for FrameImages {
Ok(())
}),
element!("img[data-cfsrc]", |el| {
info!("found image with data-cfsrc {el:?}");
let src = el
.get_attribute("data-cfsrc")
.unwrap_or("https://placehold.co/600x400".to_string());
@ -159,7 +157,6 @@ impl Transformer for FrameImages {
Ok(())
}),
element!("img[alt], img[title]", |el| {
info!("found image with alt or title {el:?}");
let src = el
.get_attribute("src")
.unwrap_or("https://placehold.co/600x400".to_string());

View File

@ -179,6 +179,9 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
"atmeta.com".to_string() => vec![
Selector::parse("div.entry-content").unwrap(),
],
"blog.prusa3d.com".to_string() => vec![
Selector::parse("article.content").unwrap(),
],
"blog.cloudflare.com".to_string() => vec![
Selector::parse(".author-lists").unwrap(),
Selector::parse(".post-full-content").unwrap()

View File

@ -1,6 +1,6 @@
[package]
name = "shared"
version = "0.0.14"
version = "0.0.15"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,5 +1,5 @@
[package]
version = "0.0.14"
version = "0.0.15"
name = "letterbox"
repository = "https://github.com/seed-rs/seed-quickstart"
authors = ["Bill Thiede <git@xinu.tv>"]