From 44e22f52b366f6dcb89bd856e3a68cf8d1cd1124 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 1 Sep 2022 09:31:27 +0200 Subject: [PATCH 01/15] Do not set a title --- .config/mutt/markdown2html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index 327dff2..8a67a13 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -304,15 +304,14 @@ def convert_markdown_to_html(mdwn): body = _preprocess_markdown(body) body = _identify_quotes_for_later(body) html = _convert_with_pandoc(body, standalone=True, selfcontained=True, - title="Body") - html = html.replace('Body\n','') + title=None) html = _reformat_quotes(html) if sig: sig = _preprocess_signature(sig) sig = _preprocess_markdown(sig) sig = _convert_with_pandoc(sig, standalone=False, selfcontained=False, - title="Signature") + title=None) sig = SIGNATURE_HTML.format(sig=sig) eob = html.find('') html = f'{html[:eob]}{sig}\n{html[eob:]}' -- 2.39.2 From 449b806fb2837abb85e50b3871fef36594613f15 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 15 Feb 2023 13:27:19 +0100 Subject: [PATCH 02/15] n-s to alternates --- .config/mutt/alternates | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index dbc93a8..851cf41 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -31,6 +31,7 @@ alternates .+@portfolio\.tahi\.v(c|entures) alternates martin@keyp\.io alternates m@rtin\.kiwi alternates squash(tc|news)@thorndonclub\.co\.nz +alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net # vim:ft=muttrc -- 2.39.2 From 4dff42d1a6697429e60588bf049a284be7eaefa5 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 15 Feb 2023 13:27:25 +0100 Subject: [PATCH 03/15] make blocks italic --- .config/mutt/markdown2html | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index 8a67a13..1a14f9d 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -51,6 +51,7 @@ DEFAULT_CSS += ''' .block { padding: 0 0.5em; margin: 0; + font-style: italic; border-left: 2px solid #eee; } .quote, blockquote { -- 2.39.2 From 3f2ef4be00de46a9ce966d3412f0d1313c6b4e69 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 29 Mar 2023 10:15:43 +0200 Subject: [PATCH 04/15] keybind for resizing image even smaller --- .config/mutt/keybindings | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/keybindings b/.config/mutt/keybindings index a3cafa9..d8f3484 100644 --- a/.config/mutt/keybindings +++ b/.config/mutt/keybindings @@ -82,6 +82,7 @@ macro index,pager M " set my_weed=\$weed se macro index,pager " set my_pipe_decode=\$pipe_decode unset pipe_decode$my_confdir/viewmailattachments set pipe_decode=\$my_pipe_decode" "view attachments in browser" macro compose \ez " set my_editor=\$editor set editor='mogrify -sample 1000x1000' set editor=\$my_editor" "Resize attached image to within 1000x1000" +macro compose \eZ " set my_editor=\$editor set editor='mogrify -sample 2500x2500' set editor=\$my_editor" "Resize attached image to within 1000x1000" bind index,pager sidebar-prev bind index,pager \e sidebar-prev -- 2.39.2 From 23c9ed5dea01349dd7c978265ad2dd2c53bc53e1 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 29 Mar 2023 10:16:01 +0200 Subject: [PATCH 05/15] use offlineimap mailboxes order --- .config/mutt/list-mailboxes | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.config/mutt/list-mailboxes b/.config/mutt/list-mailboxes index 497a253..d0bb5d5 100755 --- a/.config/mutt/list-mailboxes +++ b/.config/mutt/list-mailboxes @@ -1,6 +1,15 @@ #!/bin/sh +if [ -f $VARDIR/offlineimap/mailboxes ]; then + sed 1d $VARDIR/offlineimap/mailboxes +fi + find "$1/" -type d -name cur -printf '%h\n' | \ sed -e "s,^$1/,=,g" -e "s,^$1\$,$2," | \ - egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | \ - sort | xargs echo mailboxes + egrep -v '^=(sp(ool|am)|discard|retrain(/(sp|h)am)?)$' | sort | \ +while read mailbox; do + + ! grep -q "^mailboxes ${mailbox}\$" $VARDIR/offlineimap/mailboxes || continue + echo "mailboxes $mailbox" + +done -- 2.39.2 From ade7618250406d55a62464e2a222b077ea18c6c2 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 29 Mar 2023 11:27:44 +0200 Subject: [PATCH 06/15] disable YAML metadata block when parsing markdown --- .config/mutt/markdown2html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index 1a14f9d..a3c0f39 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -251,7 +251,8 @@ def _convert_with_pandoc(mdwn, inputfmt='markdown', outputfmt='html5', ext_disabled = [ 'tex_math_single_backslash', 'tex_math_dollars', 'smart', - 'raw_html' + 'raw_html', + 'yaml_metadata_block' ] enabled = '+'.join(ext_enabled) -- 2.39.2 From e36d08675336bfcdfea3a997230dcea9ac2c2832 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 29 Mar 2023 11:59:20 +0200 Subject: [PATCH 07/15] fix signature format --- .config/mutt/markdown2html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/mutt/markdown2html b/.config/mutt/markdown2html index a3c0f39..3762d5f 100755 --- a/.config/mutt/markdown2html +++ b/.config/mutt/markdown2html @@ -105,7 +105,10 @@ if os.path.exists(STYLESHEET): DEFAULT_CSS += open(STYLESHEET).read() SIGNATURE_HTML = \ - '
-- {sig}
' +""" +
--
+{sig}
+""" def _preprocess_signature(sig): -- 2.39.2 From 059d875ba156992ce8afdc27c32ab319b4d95ed4 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 19 May 2023 11:49:30 +0200 Subject: [PATCH 08/15] remove keyp address --- .config/mutt/alternates | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index 851cf41..b3e1da3 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -28,7 +28,6 @@ alternates .+@tahi-ventures\.(cc|ch|com|de|eu|info|net|org) alternates .+@tahi\.(vc|cc|kiwi\.nz|ventures) alternates .+@grounded.ventures alternates .+@portfolio\.tahi\.v(c|entures) -alternates martin@keyp\.io alternates m@rtin\.kiwi alternates squash(tc|news)@thorndonclub\.co\.nz alternates .+@(.+\.)?nymphenburg-squash\.de -- 2.39.2 From 5dadf1577fe7fc5950a1527ffc40f4ea8e94d280 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 19 May 2023 11:49:46 +0200 Subject: [PATCH 09/15] remove thorndon alternates --- .config/mutt/alternates | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index b3e1da3..d122253 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -29,7 +29,6 @@ alternates .+@tahi\.(vc|cc|kiwi\.nz|ventures) alternates .+@grounded.ventures alternates .+@portfolio\.tahi\.v(c|entures) alternates m@rtin\.kiwi -alternates squash(tc|news)@thorndonclub\.co\.nz alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net -- 2.39.2 From 46724e1eb5bafdcdb27efa5b894e1a1efcd2a268 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 19 May 2023 11:49:56 +0200 Subject: [PATCH 10/15] add p&m alternates --- .config/mutt/alternates | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index d122253..6aa2120 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -31,5 +31,6 @@ alternates .+@portfolio\.tahi\.v(c|entures) alternates m@rtin\.kiwi alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net +alternates .+@penny[au]ndmartin\.net # vim:ft=muttrc -- 2.39.2 From 430e48116e37f0999bec441442471196598e9249 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 19 May 2023 11:50:02 +0200 Subject: [PATCH 11/15] add toni alternates --- .config/mutt/alternates | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index 6aa2120..c703ba7 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -32,5 +32,6 @@ alternates m@rtin\.kiwi alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net alternates .+@penny[au]ndmartin\.net +alternates martin\.krafft@toni(\.immo|-kg\.de) # vim:ft=muttrc -- 2.39.2 From 217ca153fe8a1cc6d92fbe549fff1d9bd5aaa35a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 19 May 2023 11:49:59 +0200 Subject: [PATCH 12/15] add tk@web to ack-r --- .config/mutt/ack-recipients | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/ack-recipients b/.config/mutt/ack-recipients index 8334a45..f010acd 100644 --- a/.config/mutt/ack-recipients +++ b/.config/mutt/ack-recipients @@ -20,3 +20,4 @@ d76070145d21ec707f12b834c24aee6ec35c628b636d6e1606172c65a373b0e3 07979ca17b8706b2c3fbfb744dad1d057d098aa3be0e2b325fe6e4024b310d29 3d66a23f23b70f1838369c8292cddc3a50e5ebb6ae3cb41a6c2ef8354a913814 615aa8482f524f9c66696ebd4bb5bb7836e2819c63313be2c067a4f9a0d546cc +b92544617b44d0058ac3bbb01dad4fed076f1c926edce41d02bbd60e0a110cdd -- 2.39.2 From 7c5b26c61ffd9a6ec42edf94fa09259ac501b4ee Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 10 Jul 2023 14:25:18 +0200 Subject: [PATCH 13/15] edit ical before importing --- .config/mutt/mailcap.icalendar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/mutt/mailcap.icalendar b/.config/mutt/mailcap.icalendar index 2c13a19..8f6f059 100644 --- a/.config/mutt/mailcap.icalendar +++ b/.config/mutt/mailcap.icalendar @@ -2,6 +2,6 @@ # Mutt mailcap for iCalendar previewing/khal import text/calendar; ~/.config/mutt/icalparser; description=iCal details; copiousoutput; \ - print=khal import '%s' + print=sh -c "sensible-editor '%s' && khal import '%s'"; application/ics; ~/.config/mutt/icalparser; description=iCal details; copiousoutput; \ - print=khal import '%s' + print=sh -c "sensible-editor '%s' && khal import '%s'"; -- 2.39.2 From d5ef8d19353a453275f0cbe5f1d6faf77fe23493 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 27 Aug 2023 14:41:24 +1200 Subject: [PATCH 14/15] fix icalparser for full-day events --- .config/mutt/icalparser | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.config/mutt/icalparser b/.config/mutt/icalparser index 50ed472..ee46e61 100755 --- a/.config/mutt/icalparser +++ b/.config/mutt/icalparser @@ -25,19 +25,24 @@ def dtstrs(event): return dt.astimezone().strftime(strf) ret = [] - if start.tzinfo == end.tzinfo: - ret.append(strftime(start, '%F %R')) - else: - ret.append(strftime(start, '%F %R %Z')) + try: + if start.tzinfo == end.tzinfo: + ret.append(strftime(start, '%F %R')) - if start.date() == end.date(): - ret.append(strftime(end, '%T %Z')) + else: + ret.append(strftime(start, '%F %R %Z')) - else: - ret.append(strftime(end, '%F %R %Z')) + if start.date() == end.date(): + ret.append(strftime(end, '%T %Z')) + + else: + ret.append(strftime(end, '%F %R %Z')) + + return ret - return ret + except AttributeError: + return map(lambda d: d.strftime('%F'), (start, end)) def parse_ics_file(fp): cal = Calendar.from_ical(fp.read()) -- 2.39.2 From c43aaa4d1d243f1e1afad65eb04c473a629b0612 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 27 Aug 2023 14:41:53 +1200 Subject: [PATCH 15/15] add siby alternate --- .config/mutt/alternates | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mutt/alternates b/.config/mutt/alternates index c703ba7..b67426a 100644 --- a/.config/mutt/alternates +++ b/.config/mutt/alternates @@ -33,5 +33,6 @@ alternates .+@(.+\.)?nymphenburg-squash\.de #alternates .+@(rw|int|home)\.madduck\.net alternates .+@penny[au]ndmartin\.net alternates martin\.krafft@toni(\.immo|-kg\.de) +alternates martin@squash-in-bayern\.de # vim:ft=muttrc -- 2.39.2