Dirk-Jan C. Binnema
3123f3e983
mu-error: allow for adding end-user hints
2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema
0a12b70d7b
utils-file: improve mu_play
...
implement in terms of run_command
2023-09-13 23:03:51 +03:00
Dirk-Jan C. Binnema
9dcbe1d96c
lib: unit tests: improve / better coverage
2023-09-13 23:02:53 +03:00
Dirk-Jan C. Binnema
7c16d080d2
Merge pull request #2552 from dme/devel/misc
...
mu: Fix "expected command" server error report
2023-09-12 22:28:30 +03:00
David Edmondson
a8440bb258
mu: Fix "expected command" server error report
2023-09-12 08:37:10 +01:00
Dirk-Jan C. Binnema
af9eb36ca0
unit-tests: modernize
...
Use TempDir, join_paths etc.
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema
85ad35bd8e
utils/unbroken: avoid pre-C++20 compiler warning
2023-09-10 10:15:33 +03:00
Dirk-Jan C. Binnema
c8568eecd4
utils/file: add basename/dirname helpers and use them
2023-09-10 10:15:28 +03:00
Dirk-Jan C. Binnema
264bb092f0
support xapian ngrams
...
Xapian supports an "ngrams" option to help with languages/scripts
without explicit wordbreaks, such as Chinese / Japanese / Korean.
Add some plumbing for supporting this in mu as well. Experimental for
now.
2023-09-09 17:26:20 +03:00
Dirk-Jan C. Binnema
9c28c65d45
utils: handle "unbroken" scripts
...
Do not removing combining characters from scripts without explicit word
boundaries, such as those for CJK.
Reuse some Xapian code for that.
2023-09-09 11:40:36 +03:00
Dirk-Jan C. Binnema
77a8a67f6c
move lib/thirdparty to thirdparty/
2023-09-05 08:34:27 +03:00
Dirk-Jan C. Binnema
e1308a9b40
utils: small tweaks
2023-08-27 11:07:55 +03:00
Dirk-Jan C. Binnema
c1950ae0cb
mu-utils: support UTC in parse_date_time
...
Parsing dates known to be in UTC.
2023-08-21 18:29:21 +03:00
Dirk-Jan C. Binnema
15f08488d3
remove Mu::format, use mu_format
...
Use the new fmt-based formatting.
2023-08-19 20:04:50 +03:00
Dirk-Jan C. Binnema
11df0bedce
utils: add mu_print[ln] for ostreams
2023-08-11 19:57:00 +03:00
Dirk-Jan C. Binnema
7aa38d0b56
option/result: add "unwrap"
...
Sprinkle some more Rust on Option & Result
2023-08-09 23:24:47 +03:00
Dirk-Jan C. Binnema
4ecf386cda
utils-file: don't use regexp in join_paths
...
It's slow.
2023-08-06 16:19:43 +03:00
Dirk-Jan C. Binnema
27c07280b1
utils: replace time_to_string with fmt-based formatting
...
It's faster; make "mu find" ~5-10% faster, and removes some code we no
longer need.
2023-08-06 16:19:43 +03:00
Dirk-Jan C. Binnema
111e48efa3
utils: add expand_path (wordexp wrapper)
...
For expanding command-line options for shells that don't do that by themselves.
2023-08-03 22:47:27 +03:00
Dirk-Jan C. Binnema
33fd79a9f0
mu-regex: add multiline test
2023-07-30 00:50:45 +03:00
Dirk-Jan C. Binnema
3a38d6366a
mu-view: test locale to C for tests
2023-07-29 17:25:07 +03:00
Dirk-Jan C. Binnema
766d1849ff
test-utils: add TempTz, RAII temporary timezone
2023-07-29 16:39:08 +03:00
Dirk-Jan C. Binnema
1f0342a91f
mu-view: add unit-test
2023-07-28 19:43:46 +03:00
Dirk-Jan C. Binnema
dc29dc8395
html-to-text: add missing include <array>
2023-07-26 23:30:54 +03:00
Dirk-Jan C. Binnema
c06e765d13
html-to-text: be explicit with array type
...
clang in CI fails to deduce it, so let's help it a bit.
2023-07-26 23:24:29 +03:00
Dirk-Jan C. Binnema
56b8fad89e
utils: implement html-to-text
...
Implement a crude html-to-text scraper function, to extract plain text
from html messages, so we can use it for indexing.
2023-07-25 21:26:36 +03:00
Dirk-Jan C. Binnema
11c807f955
utils/readline: use fmt-based apis
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema
9580d11fef
utils/result: add std::move version of Err
...
Avoid a copy in some situations
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema
6ad5cccc53
store/index: and unit test for circular symlink
...
Check that we bail out early
2023-07-18 23:18:21 +03:00
Dirk-Jan C. Binnema
cf6c5a36d7
utils: rework running system commands
...
Use g_spawn and pass arguments, so we don't involve a shell that needs
escaping etc.
Improve error handling.
2023-07-18 20:19:27 +03:00
Dirk-Jan C. Binnema
6f69f5d482
utils/mu-regex: add move constructor
2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema
cc65b8b401
utils: add some more helpers for test code
...
Creating and removing (temp) dirs, running mu commands.
2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema
904f64aa03
utils/result: add "unwrap" convenience function
2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema
31f0c40893
migrate to fmt-based logging in some more places
...
and improve logging.
2023-07-08 10:30:36 +03:00
Dirk-Jan C. Binnema
82235b9d49
fmt: more update to use new fmt-based APIs
2023-07-06 21:49:50 +03:00
Dirk-Jan C. Binnema
e48485cb58
sexp: use fmt for parsing_error
...
Should help with Apple clang build too.
2023-07-05 23:40:36 +03:00
Dirk-Jan C. Binnema
aed1395c53
lib/utils: update library paths
2023-07-05 23:14:34 +03:00
Dirk-Jan C. Binnema
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
Dirk-Jan C. Binnema
742ca33740
utils: rework Mu::Error and g_ logging macros with fmt
...
A bit more C++ template magic to remove a lot of code.
2023-07-05 23:07:11 +03:00
Dirk-Jan C. Binnema
c6fff6a281
all: update for API changes (config etc.)
...
Use the new & improved APIs.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema
c28fde9155
lib: create mu-xapian-db, mu-config
...
XapianDb is a fairly thing wrapper around Xapian, which handles locking,
exception handling and some tracking.
On top of that, Config add a configuration database for type /
introspectable configuration info.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema
fd7c011195
lib: update for api changes, update tests
...
With the new Sexp. And expand unit tests.
2023-06-27 00:53:23 +03:00
Dirk-Jan C. Binnema
ae9607530f
utils/sexp: extend and improve tests
...
Extend functionality for parsing; update documentation, tests.
2023-06-27 00:52:07 +03:00
Dirk-Jan C. Binnema
9bab2a4050
utils/sexp: add some convenience
...
Add some convenience function for dealing the head/tail
Some whitespace / cosmetics
Add operators ==
Add operator !=
Update command handler for this.
2023-06-04 14:56:40 +03:00
Dirk-Jan C. Binnema
eafc81f168
utils: fix non-cld2 build
2023-05-12 21:52:32 +03:00
Dirk-Jan C. Binnema
ad64093183
utils: implement language-detector
...
A thing wrapper around CLD2 with which we can detect the language of an
e-mail message.
2023-05-11 23:23:52 +03:00
Dirk-Jan C. Binnema
3a05dd8725
lib/utils: implement read_from_stdin
2023-04-29 23:01:12 +03:00
Dirk-Jan C. Binnema
e4af910d04
utils: implement g_cancellable_new_with_timeout
2023-04-29 23:01:12 +03:00
Dirk-Jan C. Binnema
3c578d7a3b
utils: add thread_dep for logger test
...
Needed on some systems
Fixes #2473
2023-04-14 12:48:03 +03:00
Dirk-Jan C. Binnema
8762ac27dc
mu: improve error numbers
...
Ensure they match what mu expects.
2023-04-11 20:47:48 +03:00