summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2020-05-31mdcat: 0.15 -> 0.17, syntect: 3 -> 4Matthias Beyer
And update the implementation for the new mdcat interface. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-05-31uuid: 0.7 -> 0.8Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-05-31handlebars: 2 -> 3Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-05-31semver: 0.9.0 -> 0.10.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-05-31itertools: 0.8.0 -> 0.9.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-04-29Replace repository with new sourcehut repoMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-04-26Clippy Fix: let_underscore_lockMatthias Beyer
Use _variable instead of _ as a variable name for lock. Expl.: https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_lock Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Update mdcat 0.13.0 -> 0.15.0Matthias Beyer
Make version restriction for syntect less strict, as mdcat pins it to a certain version, and we only need it to actually invoke mdcat itself. So no problem with that lax requirement. Because mdcat updated its version of pulldown-cmark, we have to update here as well. We also had to adapt our error handling, because mdcat chooses to return a Box<dyn Error>, which is absolutely garbage for us here. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Merge branch 'update-toml-query' into masterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Fix: Return actual length of bufferMatthias Beyer
The function has to return the number of bytes in the buffer, so return the length of the buffer here. Still, the contents are ignored and not written to any destination. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Add blackhole as default cli optionMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Update toml-query: 0.9.2 -> 0.10.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Revert "Move to toml-query from master branch"Matthias Beyer
This reverts commit f7fadc118f2de7e84cef8c6d4103296289564f74. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Fix clippy warning: next() instead of nth(0)Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Fix clippy warning: next() instead of nth(0)Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Implement Into<anyhow::Error> for ErrorMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Move to kairos from master branch for nowMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Move to toml-query from master branchMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Move libimagerror to thiserrorMatthias Beyer
In this patch, the error output (tracing) algorithm was changed, but should essentially print the same information. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Replace failure with anyhow in complete codebaseMatthias Beyer
This patch was scripted with sed -i 's/use failure::Error/use anyhow::Error/' $(rg "use failure::Error" -l) sed -i 's/use failure::Fallible as /use anyhow::/' $(rg "use failure::Fallible" -l) sed -i 's/failure/anyhow/' $(rg "failure *=" -l) sed -i 's/format_err!/anyhow!/' $(rg "format_err!" -l) sed -i 's/use failure::ResultExt/use anyhow::Context/' $(rg "use failure::ResultExt" -l) sed -i 's/err_msg/anyhow!/' $(rg "use failure::err_msg" -l) sed -i 's/^anyhow\ *=.*$/anyhow = "1"/' $(rg "anyhow * =" -l) sed -i 's/^anyhow_derive.*//' $(rg "anyhow_derive" -l) sed -i 's/extern crate failure/extern crate anyhow/' $(rg "extern crate failure" -l) sed -i 's/.*extern crate anyhow_derive.*//' $(rg "anyhow_derive" -l) Some manual changes were added as well, so this patch was not completely scripted, but mostly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-06Remove unused str error handling moduleMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-06Remove unused io error handling codeMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-06Remove unused ExitUnwrap traitMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-06Remove unused iter extensionsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-01Merge branch 'viewing-iterator' into masterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-01Optimize: Stop iteration for viewing on broken pipe errorMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-01Add viewer for viewing all entries from an iteratorMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-01Add iterator extension for reporting from iteratorMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-01Allow more fine-granular control over IO behaviour in runtimeMatthias Beyer
This patch removes the --ignore-ids option and adds --pipe-input / -I and --pipe-output / -O instead. The behaviour of -IO is the same as --ignore-ids was before, but this change gives the user the option to enable only one of both (input or output, or both). Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-28Remove module-based loggingMatthias Beyer
This patch removes the module-based logging mechanism. This mechanism was introduced so that the configuration file is able to define which imag module logs what. This was a fine-granular setting, but most users won't actually touch it. It was more of a debugging-thing for developers. I rarely used it during development and it only introduced more headaches. It also was not updated (as in the configuration file missed a few modules, others where not removed despite the module did not exist anymore). All in all, it was rather unmaintained and just "too much". Thus, remove this thing completely. Developers know how to use grep. This also automatically fixes bugs where `imag --debug command` did not output any debugging log, but was expected to. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-28Fix: If global loglevel allowes record to be logged, log itMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-28Add helper type for passing data to Handlebars::render()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-28Add IndentionHelper for handlebars templatingMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-28Make error output in handlebars render error more verboseMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-02-21Add test whether Store::is_borrowed() works as expectedMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Fix: Use module path when getting mail instead of using plain MessageId ↵Matthias Beyer
object in String representation Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Merge branch 'libimagmail/neighbors' into masterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add MailStore::thread_root_of()Matthias Beyer
This patch adds a function to find the root node of a mailthread (as in In-Reply-To header). Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add Mail::get_thread() for getting all mails in the same thread as this mailMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Merge branch 'libimagstore/is-borrowed' into masterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add Store::is_borrowed(StoreId)Matthias Beyer
Add a function to Store to check whether a StoreId is borrowed. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Merge branch 'libimagmail/flags' into masterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add helper functions to check whether a mail is passed, replied,...Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add Mail::{get_,neighbors}()Matthias Beyer
This patch adds functions to get the direct neighbors of a mail. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add MailIterator for iterating over entries that are mailsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add function to get char representation of flagMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add function to get flagsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-03Add flags module for flags representation as strong typesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-02Rewrite Hasher::hash() for MailHasherMatthias Beyer
Because message ids should be unique, we consider this to be safe. This should seems to be the best practice. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-02Fix: Do not assume UTF8 encoding of data to hashMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>