summaryrefslogtreecommitdiffstats
path: root/lib/entry/libimagentryview
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-04-29Replace repository with new sourcehut repoMatthias Beyer
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-08Implement Into<anyhow::Error> for ErrorMatthias Beyer
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-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-01-01Update copyright years to 2015-2020Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-23Remove unnecessary clone().to_string() callsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-04Add viewer helper trait for iteratorsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28[No-auto] lib/entry/view: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28[Auto] lib/entry/view: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-09Fix for update to new version of mdcatMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30Update all dependenciesMatthias Beyer
This patch updates all dependencies but not "nom". Done with `cargo upgrade --all` and manual editing. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30Change interface of Viewer to propagate io errorsMatthias Beyer
Because we need to catch errors that are caused by a borken pipe when writing to stdout (for example), this patch changes the interface of the Viewer trait to return an error enum that can be used to check whether an IO error happened. The calling code can then decide whether to ignore a broken pipe error or whether to handle it properly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30Replace deprecated functioncallMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29Update dependency: toml: 0.4 -> 0.5Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18Add more context in error messagesMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18Run 'cargo fix' for rust-2018Matthias Beyer
With this patch we move the codebase to Rust-2018. The diff was generated by executing cargo fix --all --all-features --edition on the codebase. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Add feature to trim content on the rightMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03Update copyright yearsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-11Forbid unsafe code in all cratesMatthias Beyer
2018-11-10Update version stringsMatthias Beyer
...for the next release, which will be imag 0.10.0! Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-31Update dependency: mdcat: 0.8 -> 0.11Matthias Beyer
2018-10-30libimagentryview: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-06Roll back mdcat updateMatthias Beyer
Because 0.8 -> 0.10 has changed the API, we cannot update trivially. Revert the update because of that.
2018-10-06Update dependenciesMatthias Beyer
mdcat: 0.8 -> 0.10 textwrap: 0.9 -> 0.10
2018-09-27Update dependency: error-chain: 0.11 -> 0.12Matthias Beyer
2018-05-09Update version string: 0.8.0 -> 0.9.0Matthias Beyer
2018-04-24Add markdown viewer functionalityMatthias Beyer
2018-04-24Rewrite libimagentryview interfaceMatthias Beyer
In the previous versions, the sink (where the entries should be written to) was not passed. This did conflict with the libimagrt holding the stdout/stderr handles, because it automatically writes to stdout (which we don't want to do in some cases). Passing the sink is way nicer. This patch changes libimagentryview so that the sink is passed to the viewer.
2018-04-19Add wrapping functionality to StdoutViewerMatthias Beyer
2018-04-19Update version numbers: 0.7.0 -> 0.8.0Matthias Beyer
2018-04-17Fix documentation in crate metadataMatthias Beyer
2018-03-26Fix: Entry::to_str() should return Result<_>Matthias Beyer
Because serializing might fail. Also fixes all usages of the API.
2018-02-11Update version string: 0.6.0 -> 0.7.0Matthias Beyer
2018-02-07Update dates in license headerMatthias Beyer
And add missing header in one file
2018-01-15log: 0.4.0-rc.1 -> 0.4.0Matthias Beyer
2018-01-15Update dependency: log: 0.3.* -> 0.4.0-rc.1Matthias Beyer
2017-12-25Update version strings: 0.5.0 -> 0.6.0Matthias Beyer
2017-10-31Add badges in Cargo.toml of all cratesMatthias Beyer
2017-10-12Update dependency: error-chain: 0.10 -> 0.11Matthias Beyer
2017-09-24Update version strings: 0.4.0 -> 0.5.0Matthias Beyer
2017-09-19Update dependency specsMatthias Beyer
Most notably: * env_logger: 0.4 -> 0.5 * hoedown: 5.0.0 -> 6.0.0 * itertools: 0.5 -> 0.6 * lazy_static: 0.1.15 -> 0.2 * regex: 0.1 -> 0.2 * semver: 0.5 -> 0.8 * url: 1.2 -> 1.5 * uuid: 0.3 -> 0.5 (This list is most surely not complete)
2017-09-04Remove dedicated result modules, use error chain generated Result typesMatthias Beyer
2017-09-03Remove "IntoError" trait, use error_chain functionalityMatthias Beyer
2017-09-03libimagentryview: Rewrite error handlingMatthias Beyer
2017-09-03Impl IntoError for error kindsMatthias Beyer
2017-09-03Add recursion limits to cratesMatthias Beyer
2017-09-03Add dependency to crates: error_chain = 0.10Matthias Beyer