Commit Graph

30 Commits

Author SHA1 Message Date
d13feb2d99 mu-contact: move email validation to contacts cache
So we can be sure the regexp is initialized. This _may_ help for
 https://bugzilla.opensuse.org/show_bug.cgi?id=1221861
though it is very hard to tell!
2024-04-02 07:40:20 +03:00
d7f8a64b20 mu: modernize command-line unit tests 2023-08-27 11:07:55 +03:00
4945e699c8 lib/mu: use fmt-based time/date formatting
For a small speedup
2023-08-06 16:19:43 +03:00
7b38f094c4 migrate some more code to mu_format / join_paths
Let's modernize a bit.
2023-07-20 23:14:29 +03:00
82235b9d49 fmt: more update to use new fmt-based APIs 2023-07-06 21:49:50 +03:00
4920b56671 update to use fmt-based apis
Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
2023-07-05 23:10:13 +03:00
96e16034c7 contact: fix quoting
Ensure that addresses with commas are quoted. Don't 2047-encode though.

Update tests.
2023-03-14 06:18:56 +02:00
3ec960c609 mu: improve mu-error
Add specific error-code for SchemaMismatch

Combine find/cfind no-matches
2023-01-29 15:38:40 +02:00
80a4842cb0 cfind: fix clang compiler warning 2023-01-16 22:35:20 +02:00
6979a66630 utils: get rid of mu-util.[ch]
It was getting old...
Remove the unused parts, refactor the few parts still in use.
2023-01-14 20:02:05 +02:00
8b7e63e84f mu-cfind: use UTC in json output
Fixes #2391.
2022-12-30 23:37:23 +02:00
5300b7ce82 cfind: rework, add support for json output
Update the old cfind code, and add json output support while doing so.
2022-12-30 15:14:17 +02:00
36f6e387ae mu: implement new command-line parser
Implement a new command-line parser, based on CLI11.

It's a bit more C++'ish, and allows for a lot of fancy things... some of
which we have implemented here.

Update the various commands to use the new Options struct

Remove the old help strings; instead e.g. `mu help view` opens the
manpage.

Integrate the guile scripts more tightly.
2022-11-17 11:00:06 +02:00
cea3167f3e lib: remove some dead code (mu-str/utils)
Remove unused library code; recycle some electrons.
2022-05-19 23:38:49 +03:00
158117e843 mu: Make commands Result-based
Use Result<void> as the return value, simplifying some code.
2022-05-12 08:56:13 +03:00
81689f0af3 contacts-cache: return most relevant contacts
Return in the contacts in *reverse* rank order, i.e. the most relevant come first.
This is useful since we only want the first maxnum contacts, and those should of
course be the most relevant.

Update mu cfind/server as well.

cfind
2022-05-09 22:25:28 +03:00
4fc05261ce message: implement rfc2047-encoding addresses
For address names with commas, quotes etc.
2022-05-06 22:17:53 +03:00
87c122d1bc cmd-cfind: fix the "--after" handling
Use the message-date
2022-05-05 01:40:17 +03:00
db963f66df cfind: improve clang compatibility 2022-04-04 23:44:20 +03:00
4fb0e0664d cfind: fix clang compilation (gmtime)
And a little code tidiness.
2022-04-04 08:41:20 +03:00
f7c84006d7 many: update for lib/message updates
Adapt to the new names / directory. Big commit, but mostly just very boring renaming.
2022-03-26 17:19:10 +02:00
af87cde217 utils/mu-date: remove
Remove mu-date.[ch] and convert its last users to use time_to_string instead.
2022-02-22 23:07:29 +02:00
7822d2633e update contacts-cache users for MessageContact
Since contacts-cache now uses MessageContact, update its users
2022-02-21 23:51:46 +02:00
a82bd77d09 lib: rename contacts into contacts-cache
Plus dependents.
2022-02-21 23:22:42 +02:00
be4fc67584 mu-cfind: don't show error when there are no matches
And some cosmetics
2022-01-15 12:48:53 +02:00
3dd721d5a3 clang-format: update c/cc coding style
Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.

For comparing old changes with git blame, we can disregard this one using
--ignore-rev

(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
2021-10-20 12:26:16 +03:00
01ced9a356 mu: Update for new querying APIs 2021-01-22 22:51:33 +02:00
a1d1619bda use c++ for some more sources
Do a (superficial) port to c++ of some of the c sources. Update
deps. Fix a few compiler warnings.
2020-11-07 14:11:59 +02:00
68533cee0d mu: use g_printerr for errors, instead of g_warning
With the new logging setup, we need g_printerr
2020-06-13 16:56:41 +03:00
a9fab4abcc mu: convert command-line tools to c++ 2020-06-13 16:56:41 +03:00