Show favicons in qp-rake1

This commit is contained in:
Olivier 'reivilibre' 2022-03-27 19:31:24 +01:00
parent e401377db5
commit 4e0352220d
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ use reqwest::header::{HeaderMap, HeaderValue, USER_AGENT};
use reqwest::redirect::Policy; use reqwest::redirect::Policy;
use reqwest::Url; use reqwest::Url;
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::path::PathBuf; use std::path::{Path, PathBuf};
use tokio::fs::File; use tokio::fs::File;
pub const ADBLOCK_FILTER_PATHS: [(AnalysisAntifeatures, &'static str); 4] = [ pub const ADBLOCK_FILTER_PATHS: [(AnalysisAntifeatures, &'static str); 4] = [
@ -136,6 +136,9 @@ pub async fn main() -> anyhow::Result<()> {
cyan_ln!("{} bytes", icon.original_size_in_bytes); cyan_ln!("{} bytes", icon.original_size_in_bytes);
blue!("\tPacked size: "); blue!("\tPacked size: ");
cyan_ln!("{} bytes", icon.webp_bytes.len()); cyan_ln!("{} bytes", icon.webp_bytes.len());
std::fs::write(Path::new("/tmp/qp-rake1.webp"), &icon.webp_bytes)?;
println!("\n(saved as /tmp/qp-rake1.webp!)");
} }
} }