On 2025-11-04 11:17, Remind list wrote:
> This is off-topic for Remind users

If it's not remind-list appropriate, I'm willing to chat off-list
(whether here via email or @[email protected], if you're on the fedi)

> How do you store and manage a central personal list of contacts on
> Linux, in a way that you can generate (1) your list of email aliases
> (e.g. for mutt), and (2) your list of phone numbers and addresses
> (e.g. VCARDs for for your mobile phone)?

The CLI/TUI/Linuxy go-to is abook(1), a TUI addressbook that has support
for dumping results in an easy-for-mutt-to-ingest format.

Last I checked, it stores its data in a plain-text ".ini"-style format.

> Up to now, I have my usual file of email aliases, e.g.
> 
>     alias remind "Remind Fans <[email protected]>"
> 
> and I have a separate mostly free-format file of single lines of names
> with phone numbers and/or email addresses and/or random info, e.g
> lines like this:
> 
>     Joe Doe [email protected] work:[email protected] 555-555-1212 
> work:555-555-1212 cell:555-555-1212 123 Main St., AnyTown, Ontario just east 
> of the quarry used to be friends with Tom, Dick, and Harriett 
> OLDwork:555-555-1212 OLD:122 Main St. NoWhere, Ontario

I personally maintain my source-of-authority address-book in recutils
format,

  https://www.gnu.org/software/recutils/manual/recutils.html

a plain-text "database" where records are separated by blank lines and
fields are designated with a prefix, so it might look like

  id: joedoe
  household: doefamily
  last: Doe
  first: Joseph
  nickname: Joe
  dob: Jul 4 1987
  email: [email protected]
  phone: 800-555-1234
  spouse: janedoe

  id: janedoe
  last: Doe
  household: doefamily
  first: Jane
  spouse: joedoe
  phone: 800-555-5555
  email: [email protected]
  note: graduated from Miskatonic University in 2016

  ######## household info ########

  hid: doefamily
  street: 123 Oak St
  city: Anytown
  state: NY
  zip: 12345
  phone: 800-555-1212

(there's some metadata control if you want to let recfix(1) help enforce
some consistency like unique IDs, data-types, etc)

You can then use recsel(1) to query this "database" with reasonably
complex SQL-like SELECT-type queries.  Or grep :-)

It's been a long time since I've done any live recsel querying, where
most of my queries are rolled up in a shell-function so I don't have to
remember the details :-)

I can then use that file to generate my mutt aliases file.  And as
you can tell from the "dob:" field format, I can also generate my
birthdays.rem file (bringing this full circle back to remind so it's at
least _somewhat_ on-topic) from this single source-of-truth.

> I need to have a list of contacts on the phone, and grep doesn't work
> there, and I really need to do a better job of this.

I'm afraid I don't have a good method of then syncing my data to the
phone's address-book, but I also don't like having all my personal
database of friends' private/contact info on the phone.  So my
address-book on my phone is just a matter of names+numbers (and
sometimes a brief note of association like "Joe's sister")

> Just to get the phone started, I wrote a Perl script to read the
> grep file and pull out things that look like names, email, and phone
> numbers and turn those lines into VCARDs, dumping whatever wasn't
> name, email, and phone into the "Notes" section.  I have about 550
> entries.  I upload the 550-entry VCARD file to iCloud and iCloud sends
> it to my iPhone.

Which isn't too bad a way to go.  Strong perl work!

> I prefer CLI-friendly solutions so that I can script things.  Having
> a GUI for updates is okay, I guess, as long as I can still make an
> update using the CLI.

The data storage format is the most important bit, since even if it's a
GUI, as long as the underlying data is CLI-accessible plain-text, then
you're golden.  That said, both abook(1) and recutils-format are
plain-text with each piece of metadata is on its own line, so diff(1)
output is pretty legible (where your single-line format makes it much
harder to tell what was changed).  I keep it in git(1) which also makes
it easy to sync across machines, with the primary private repo on my VPS
instance.

Just my random ramblings on the topic,

-tim
-- 





_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/

Reply via email to