feat: tag manipulation

This commit is contained in:
2026-03-12 18:17:03 +01:00
parent 1453fdb3ad
commit 8a0c8bc2d7
5 changed files with 99 additions and 5 deletions

View File

@@ -11,11 +11,16 @@
# @argument #3: if set, then the HTML messages will be taken
preview_message() {
[ "$1" = "id" ] && messageid="$2" || messageid="$(nm_last_message_in_thread "$2")"
echo "preview_message: messageid=$messageid" >> /tmp/foo
parts="$(nm_message_parts "$messageid")"
echo "preview_message: parts=$parts" >> /tmp/foo
html="${3:-}"
echo "preview_message: html=$html" >> /tmp/foo
nr="$(nm_message_part_nr "$messageid" "$html")"
echo "preview_message: nr=$nr" >> /tmp/foo
[ ! "$nr" ] && [ ! "$html" ] && html="html" && nr="$(nm_message_part_nr "$messageid" "html")"
echo "preview_message: nr=$nr" >> /tmp/foo
[ "$html" ] && parser="$PANDOC" || parser="cat"
nm_message_header "$messageid" | $CATEMAIL
nm_message_get_part "$messageid" "$nr" | $parser | $CATMD
[ "$nr" ] && (nm_message_get_part "$messageid" "$nr" | $parser | $CATMD)
}