feat: inline attachment support

This commit is contained in:
2025-07-03 13:15:44 +02:00
parent c8642343e7
commit 31c1357fbb
11 changed files with 337 additions and 3 deletions

8
src/awk/attachdd.awk Normal file
View File

@@ -0,0 +1,8 @@
BEGIN { FS="[:;]" }
/^END:(VTODO|VJOURNAL)$/ { ins = 0; exit }
/^[^ ]/ && a { a = 0 }
/^ / && a && p { print substr($0, 2); }
/^ / && a && !p { if (index($0, ":")) { p = 1; print substr($0, index($0, ":")+1) } }
/^ATTACH/ && ins { i++; }
/^ATTACH/ && ins && i == id { a = 1; if (index($0, ":")) { p = 1; print substr($0, index($0, ":")+1) } }
/^BEGIN:(VTODO|VJOURNAL)$/ { ins = 1 }