keep a map of uuid and titles
This commit is contained in:
parent
0833fbe161
commit
ba379cd452
|
@ -1,4 +1,5 @@
|
||||||
md2imap/mbox
|
md2imap/mbox
|
||||||
|
md2imap/uidmap
|
||||||
md2imap/*.header
|
md2imap/*.header
|
||||||
md2imap/*.imap
|
md2imap/*.imap
|
||||||
md2imap/input**/*
|
md2imap/input**/*
|
||||||
|
|
|
@ -5,14 +5,17 @@ qp () {
|
||||||
' -- "$@"
|
' -- "$@"
|
||||||
}
|
}
|
||||||
rm mbox
|
rm mbox
|
||||||
|
rm uidmap
|
||||||
for f in input/*.md
|
for f in input/*.md
|
||||||
do
|
do
|
||||||
dos2unix "$f"
|
dos2unix -q "$f"
|
||||||
f=${f##*/}
|
f=${f##*/}
|
||||||
title=${f%.md}
|
title=${f%.md}
|
||||||
subject=$(echo $title|qp -e)
|
subject=$(echo $title|qp -e)
|
||||||
|
|
||||||
uid=$(cat /proc/sys/kernel/random/uuid)
|
uid=$(cat /proc/sys/kernel/random/uuid)
|
||||||
|
|
||||||
|
echo $uid $title >> uidmap
|
||||||
|
|
||||||
cp imap-note-header "$title".header
|
cp imap-note-header "$title".header
|
||||||
sed -i "s/name/$1/" "$title".header
|
sed -i "s/name/$1/" "$title".header
|
||||||
sed -i "s/email/$2/" "$title".header
|
sed -i "s/email/$2/" "$title".header
|
||||||
|
|
Loading…
Reference in New Issue