3 unstable releases
0.2.0 | May 2, 2024 |
---|---|
0.1.2 |
|
0.1.1 | Nov 20, 2023 |
0.1.0 | Sep 5, 2023 |
#849 in Text processing
225 downloads per month
38KB
788 lines
repub-rs
A rust library for converting mhtml webpages to epub articles.
To Do
- Handling of byline and title is a bit manual, and it'd be better to expose more of those properties.
lib.rs
:
A library for turning mhtml webpages into summarized epub articles
This is primarily intended for use in repub for reMarkable devices, but can be generally used for webpage summarization.
Examples
use repub::Repub;
let mhtml = // ...
# r#"From: <Saved by Blink>
# Snapshot-Content-Location: http://test
# Subject: title
# MIME-Version: 1.0
# Content-Type: multipart/related;
# type="text/html";
# boundary="boundary"
#
# --boundary
# Content-Type: text/html
# Content-ID: <frame-0@mhtml.blink>
# Content-Transfer-Encoding: quoted-printable
# Content-Location: http://test
#
# <html></html>
# --boundary--
# "#;
let mut buff = Vec::new();
Repub::default().mhtml_to_epub(mhtml, &mut buff).unwrap();
Dependencies
~11–24MB
~366K SLoC