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