Post by Raphaël Post by Roger
$ cat .abook/addressbook |less
And type: /name_to_find
The aim of a nice formatting command-line syntax is to allow
others tools/script to benefit from abook (in non-interactive mode).
When sending sms with gnokii/bluetooth, I would like the nickname to be
auto-completed from abook (with the mobile phone number)
For this to work, abook should be able to understand which fields have
to be returned (in this case: the NAME (for the completion) + the MOBILE
That was the rational for the current patch.
Second point, I also think that abook may handle a specification of the
*fields* to be searched.
Currently --mutt-query hardcodes the following: NAME, EMAIL, NICK.
Post by Raphaël
As a last point, for every output filter to be also used on the restricted set of
entries (= with --mutt-query) (vs the whole phonebook), they need to
- the already existing XXX_export_database(); (which adds
header/footer/... + custom conditions)
- one which returns the conversion on a per-entry basis, kind of
It would nicely obsoletes the struct abook_output_filter u_filters
duplication I've made in the patch, but it would require that every
current output filters to be split into two functions.
My point being, some of us just want to get full_name, address, phone,
email_address, or a comment quickly as possible via command line rather than
opening up an entire application. Similar to cat & grep usage, of which,
everything else can be piped usually.
I also understand the above rational and it's associated benefits as getting
specific fields to an application is also highly desirable.
Although I getting you side-tracked here, I currently use something like
profiles to subdivide categories of contacts by using bashrc aliases:
alias abook-commercial="abook \
alias abook-gov="abook \
alias abook-im="abook \
alias abook-oss="abook \
alias abook-personal="abook \
alias abook-responded="abook \
alias abook-mutt="abook \
This keeps abook from loading more contact info into memory then I need, hence,
preventing memory waste while keeping load times reasonable.
Most times, I'm just looking for one, maybe two contacts at once. And then,
usually only one of the following; address, full name, phone or email address
is needed using command line in a quick easily typed and memorized syntax.
I then use $HOME/journals/commercial, $HOME/journals/personal, ... for more
in depth journaling on each contact. For those, I use VI/VIM.
(Now, if there were only a method for auto mounting a cryptfs on demand through
mutt... Well, there is using autofs but it's complicated last I checked.)