crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit 51a25a58f5cf4dc58b96042452207043a5d04e27
parent c58574b106eb09a7643736f75cf625c5160a86f2
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Mon, 13 Dec 2021 00:54:46 -0800

update

Diffstat:
DREADME.md | 6------
Mcrabmail/Cargo.lock | 10++++++++++
Mcrabmail/Cargo.toml | 1+
Mcrabmail/src/main.rs | 1-
Mcrabmail/templates/thread.html | 3+--
5 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md @@ -1,6 +0,0 @@ -# Crabmail - -Crabmail is a set of tools for self-hosting mailing list archives. Each tool can be used individually or in conjunction with others. - -* Crabmail: A static HTML email viewer -* Crabmail-sync: A simple pull-based mbox sync diff --git a/crabmail/Cargo.lock b/crabmail/Cargo.lock @@ -146,6 +146,7 @@ dependencies = [ "mailparse", "mbox-reader", "pico-args", + "quick-xml", "url", ] @@ -440,6 +441,15 @@ dependencies = [ ] [[package]] +name = "quick-xml" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b" +dependencies = [ + "memchr", +] + +[[package]] name = "quote" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/crabmail/Cargo.toml b/crabmail/Cargo.toml @@ -17,4 +17,5 @@ mbox-reader = "0.2.0" #unamaintained, should remove dep pico-args = "0.4.1" askama = "0.10" anyhow = "1.0" +quick-xml = "0.22" ammonia = {version = "3", optional = true} diff --git a/crabmail/src/main.rs b/crabmail/src/main.rs @@ -30,7 +30,6 @@ struct Email { date: u64, // unix epoch. received date body: String, mime: String, - // raw_email: String, } impl Email { diff --git a/crabmail/templates/thread.html b/crabmail/templates/thread.html @@ -2,9 +2,9 @@ {% block content %} <div class="page-title"><h1>{{root.subject}}</h1></div> -<hr class="thin"> <div> {% for message in messages %} + <hr class="thin"> <div id="{{message.id}}" class="message"> <b> <a href="mailto:{{message.from.addr}}" class="addr">{{message.from}}</a></b> @@ -16,7 +16,6 @@ <div class="reply"> <a href="{{message.mailto()}}">✉️ reply</a> </div> - <hr class="thin"> {% endfor %} </div> </div>