pimutils / mates.rs

A very simple commandline addressbook
MIT License
63 stars 9 forks source link

What can and should mates become? #7

Closed quite closed 9 years ago

quite commented 9 years ago

I'm starting to use mates through mutt for querying my contacts for email addresses. This works fine.

I'm coming from abook and over time built a few scripts to query my contacts file for several things. I'm now thinking about what mates might become.

Would the original author like for mates to index the whole vcf file (in some reasonable way), to enable full text search on the contacts, returning vcf filenames? Returning arbitrary fields?

Maybe I want to search all contacts for certain digits in any of their telephone numbers, returning contact names and the matching numbers. Or maybe I want to search contacts names matching a regexp, returning their cellphone numbers.

Dealing with the vcf files themselves is of course quiet unwieldy, which is why mates exist. But perhaps doing these things would be easier if one just shoved all data into a sql database, which should be well suited for the type of queries I want to do.

untitaker commented 9 years ago

I don't have a grand vision for mates. Besides for learning Rust, I wrote it to cover my own usecases.

That said, I am not sure if keeping the index is worth the performance gains. I'd have to do a benchmark on those. I used this collection of fake vcards before to test vdirsyncer. If it turns out that the index is completely useless, reducing mates' functionality to a tool for querying particular properties of vcards is possible, and would also cover your usecase.

quite commented 9 years ago

I see. Well, I think I'm about to experiment with keeping everything in a db, and have an interface to some useful queries.

untitaker commented 9 years ago

I've decided to remove the indexing stuff whenever I have the time to do so.

quite commented 9 years ago

I have begun to slowly develop something of my own to work with, primarily search dirs with vcards. Thanks for the inspiration so far.