From ba379cd452b09d66bc1e8da5acc5a58df9118e5c Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 12 Apr 2024 13:35:39 +0200 Subject: [PATCH] keep a map of uuid and titles --- .gitignore | 1 + md2imap/md2imap.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e245a10..10eda4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ md2imap/mbox +md2imap/uidmap md2imap/*.header md2imap/*.imap md2imap/input**/* diff --git a/md2imap/md2imap.sh b/md2imap/md2imap.sh index f9200e9..63ff25f 100644 --- a/md2imap/md2imap.sh +++ b/md2imap/md2imap.sh @@ -5,14 +5,17 @@ qp () { ' -- "$@" } rm mbox +rm uidmap for f in input/*.md do - dos2unix "$f" + dos2unix -q "$f" f=${f##*/} title=${f%.md} subject=$(echo $title|qp -e) - uid=$(cat /proc/sys/kernel/random/uuid) + + echo $uid $title >> uidmap + cp imap-note-header "$title".header sed -i "s/name/$1/" "$title".header sed -i "s/email/$2/" "$title".header