4 releases
new 0.2.1 | Dec 12, 2024 |
---|---|
0.2.0 | May 2, 2024 |
0.1.2 |
|
0.1.1 | Nov 20, 2023 |
0.1.0 | Sep 5, 2023 |
#598 in Text processing
167 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
~12–24MB
~345K SLoC