fix encoding
This commit is contained in:
parent
cfc5688c45
commit
bc452a9f64
|
@ -6,7 +6,6 @@ Content-Type: text/plain; charset="utf-8"
|
||||||
Date: Wed, 10 Apr 2024 02:45:21 -0400
|
Date: Wed, 10 Apr 2024 02:45:21 -0400
|
||||||
Reply-To: name <email>
|
Reply-To: name <email>
|
||||||
X-Uniform-Type-Identifier: com.apple.mail-note
|
X-Uniform-Type-Identifier: com.apple.mail-note
|
||||||
Subject: title
|
Subject: =?UTF-8?Q?title?=
|
||||||
X-Universally-Unique-Identifier: uid
|
X-Universally-Unique-Identifier: uid
|
||||||
Status: RO
|
Status: RO
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,24 @@
|
||||||
|
qp () {
|
||||||
|
perl -MMIME::QuotedPrint -s -ne '
|
||||||
|
BEGIN { *e = $d ? \&decode_qp : \&encode_qp }
|
||||||
|
print e $_
|
||||||
|
' -- "$@"
|
||||||
|
}
|
||||||
rm mbox
|
rm mbox
|
||||||
for f in input/*.md
|
for f in input/*.md
|
||||||
do
|
do
|
||||||
f=${f##*/}
|
f=${f##*/}
|
||||||
title=${f%.md}
|
title=${f%.md}
|
||||||
|
subject=$(echo $title|qp -e)
|
||||||
|
|
||||||
uid=$(cat /proc/sys/kernel/random/uuid)
|
uid=$(cat /proc/sys/kernel/random/uuid)
|
||||||
cp imap-note-header "$title".imap
|
cp imap-note-header "$title".imap
|
||||||
sed -i "s/uid/${uid}/" "$title".imap
|
sed -i "s/uid/${uid}/" "$title".imap
|
||||||
sed -i "s/title/${title}/" "$title".imap
|
sed -i "s/title/${subject}/" "$title".imap
|
||||||
sed -i "s/name/$1/" "$title".imap
|
sed -i "s/name/$1/" "$title".imap
|
||||||
sed -i "s/email/$2/" "$title".imap
|
sed -i "s/email/$2/" "$title".imap
|
||||||
|
|
||||||
cat "input/$f" >> "$title".imap
|
cat "input/$f" | qp -e >> "$title".imap
|
||||||
cat "$title".imap >> mbox
|
cat "$title".imap >> mbox
|
||||||
printf '\n\n' >> mbox
|
printf '\n\n' >> mbox
|
||||||
rm "$title".imap
|
rm "$title".imap
|
||||||
|
|
Loading…
Reference in New Issue