an address book is really useful

This commit is contained in:
Felix Van der Jeugt 2017-05-19 17:07:11 +02:00
parent 49c9cf0cae
commit 4048720e54
No known key found for this signature in database
GPG Key ID: 58B209295023754D
2 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,13 @@ prefer_plaintext = True
sent_tags = inbox sent_tags = inbox
sign_by_default = True sign_by_default = True
[[[abook]]]
type = shellcommand
command = 'notmuch-abook.sh'
regexp = '\[?{"name": "(?P<name>.*)", "address": "(?P<email>.+)", "name-addr": ".*"}[,\]]?'
shellcommand_external_filtering = True
[[ugent]] [[ugent]]
realname = Felix Van der Jeugt realname = Felix Van der Jeugt
address = felix.vanderjeugt@ugent.be address = felix.vanderjeugt@ugent.be
@ -28,6 +35,12 @@ prefer_plaintext = True
sent_tags = inbox sent_tags = inbox
sign_by_default = True sign_by_default = True
[[[abook]]]
type = shellcommand
command = 'notmuch-abook.sh'
regexp = '\[?{"name": "(?P<name>.*)", "address": "(?P<email>.+)", "name-addr": ".*"}[,\]]?'
shellcommand_external_filtering = True
[bindings] [bindings]
P = shellescape --thread True --refocus True notmuch\ new\ --quiet P = shellescape --thread True --refocus True notmuch\ new\ --quiet

2
local/bin/notmuch-abook.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
notmuch address --format=json --output=recipients --output=sender --deduplicate=address from:"$*" OR to:"$*" | rg -i "$*"