Maybe it’s my fault for trying to use a program that hasn’t had a release in a decade (though the source has been touched more recently) but it seems the venerable Abook doesn’t support custom queries right now. I’ve tried every combination I could conceive of based on the usage clause it gives me, the man page examples, and even looking at the source, but let’s back up for a moment.
I wanted to make use of an existing program to manage names, phone numbers, and email addresses. The main motivation being to pick a program with nice features instead of having to write my own, spend time designing, writing, and maintaining it, when all I want to be able to do is have a shared address book that I can use from the CLI or X and via scripts. I saw a lot of Mutt users posting on how simple it was to use Abook, so I gave that a shot. It worked great for saving names and email addresses from Mutt and providing those back to Mutt, and it had a decent text UI that I could use outside of Mutt.
I replaced my use of an aliases file with a call to Abook for saving addresses and I updated the query command in Mutt to invoke Abook to get addresses. It worked great. I started condensing my dumb multi-file approach to contacts into one place. I would only have to maintain one file on all my devices and it was going to be great. I would even be able to incorporate it into my SMS sending and receiving scripts (and future MMS, that’s hugely manual right now) and make everything simpler.
For my first target, I thought it would be nice to make my SMS sending script a little fancier and be able to use names instead of memorizing phone numbers like some kind of caveman. So I tried using the `--mutt-query` option for `abook` from the CLI. Unfortunately, the only way the command seems to work is without arguments, which is what mutt does, to get what you would put in an email address line. If I provide any arguments and it finds a matching entry, it returns a blank line. If the query returns no results, then it gives me an error to that effect. So I must be giving it valid arguments, it just doesn’t work.
I couldn’t figure out the error by staring at the source, so maybe it’s something obscure, I don’t know, it’s all the same effect, I still have to find something for storing contacts.
updated: 2023-01-12 21:57:50 -0500
generated: 2023-03-12