Comments on How to get a mailto: URI out of abook(1)
Post
How to get a mailto: URI out of abook(1)
+0
−0
I store my address book with abook(1).
https://manpages.debian.org/bookworm/abook/abook.1.en.html
Let's say I want to introduce some contact in some field that accepts the usual name <email>
format.
How can I ask abook(1) to produce that format?
The addressbook entry is the following:
[0]
name=Alejandro Colomar
[email protected],[email protected]
nick=alx
(I hope it's a valid one.)
With --mutt-query, I can get something similar:
$ abook --mutt-query alx
[email protected] Alejandro Colomar
[email protected] Alejandro Colomar
Then, I can do some magic with custom formats, but I get a wrong email:
$ abook --mutt-query=alx --outformat=vcard \
| abook --convert --infile=- --informat=vcard \
--outformat=custom --outformatstr='{name} <{email}>';
Alejandro Colomar <[email protected],[email protected]>
The above pipeline works only for contacts with a single email. Is there a way to make it work for every contact?
EDIT:
This is what I'd expect:
$ abook --mutt-query=alx --outformat=mailto
Alejandro Colomar <[email protected]>
Alejandro Colomar <[email protected]>
2 comment threads