initial commit

This commit is contained in:
2026-03-11 22:17:07 +01:00
commit 091b3a1a96
10 changed files with 350 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
BEGIN {
RS = "\x0c"
FS = "\n"
}
# message{ id:eb93d845-6fc7-4181-9848-7411ed999b3c@indyfac.ch depth:0 match:1 excluded:0 filename:/home/amin/.email/indyfac/INBOX/cur/1773225033.821818_4.fredkin,U=4172:2,S
# header{
# lobo loco <loboloco@indyfac.ch> (Today 10:12) (inbox)
/^message{/ {
id = ""
depth = -1
split($1, a, " ")
for (i in a) {
if (id && depth >= 0)
continue
if (substr(a[i], 1, 3) == "id:")
id = substr(a[i], 4)
else if (substr(a[i], 1, 6) == "depth:")
depth = substr(a[i], 7) + 0
}
}
/^header{/ {
subj = ""
for (i=3; i<=NF; i++) {
if (substr($i, 1, 9) == "Subject: ") {
subj = substr($i, 10)
break
}
}
printf "%s\t%s\t%"(2*depth)"s%s\n", id, subj, "", $2
}