Compare commits

..

2 Commits

Author SHA1 Message Date
7a6000be26 server: address lint 2023-12-05 11:26:23 -08:00
dd1a8c2eae procmail2notmuch: WIP update script 2023-12-05 11:23:04 -08:00
2 changed files with 16 additions and 3 deletions

10
procmail2notmuch/update.sh Executable file
View File

@ -0,0 +1,10 @@
set -e
cd ~/dotfiles
git diff
scp nasx:.procmailrc procmailrc
git diff
cd ~/src/xinu.tv/letterbox/procmail2notmuch
cargo run > /tmp/notmuch.tags
mv /tmp/notmuch.tags ~/dotfiles/notmuch.tags
cd ~/dotfiles
git diff

View File

@ -89,13 +89,15 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for PartResponder {
.ok() .ok()
} }
} }
#[get("/attachment/<id>/<idx>")] #[get("/attachment/<id>/<idx>")]
async fn attachment( async fn attachment(
nm: &State<Notmuch>, _nm: &State<Notmuch>,
id: &str, id: &str,
idx: usize, idx: usize,
) -> Result<PartResponder, Debug<NotmuchError>> { ) -> Result<PartResponder, Debug<NotmuchError>> {
let mid = if id.starts_with("id:") { let _idx = idx;
let _mid = if id.starts_with("id:") {
id.to_string() id.to_string()
} else { } else {
format!("id:{}", id) format!("id:{}", id)
@ -198,7 +200,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
show, show,
graphql_query, graphql_query,
graphql_request, graphql_request,
graphiql graphiql,
attachment
], ],
) )
.attach(cors) .attach(cors)