Commit Graph

10 Commits

Author SHA1 Message Date
Leon Schuermann 97c46da599 imag-header: implement ImagApplication
Signed-off-by: Leon Schuermann <leon@is.currently.online>
2019-10-26 14:41:31 +02:00
Matthias Beyer a6bbcd65f4 Change output to not have quotes when printing string, int, float or bool
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-20 15:05:19 +02:00
Matthias Beyer eb85635bef Add trace output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-20 14:48:17 +02:00
Matthias Beyer 74810d9ccc Fix: Print processed IDs if output is not a pipe.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-31 13:44:19 +02:00
flip1995 dfa2c97c8d [Auto] bin/core/header: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:40 +02:00
Matthias Beyer fc5bfb43bf Reimplement behaviour in imag-header
This patch changes imag-header to do not printing of the found values,
but simply filtering.

Chaining can then be used to read the values:

    imag ids | imag header string "imag.version" | imag header read "imag.version"

for example.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-28 12:54:24 +02:00
flip1995 8469fd5596 Fix float comparison bug found by clippy
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-26 23:05:09 +02:00
Leon Schuermann ed457495c8 Introduce proper error handling in IdPathProvider
Prior to this change, the IdPathProvider implementation would be
responsible for exiting the process on insufficient / wrong arguments.
However, such error handling should be performed together with the
business logic and not in CLI-parsing related code.

This change introduces a clear separation: both parsing errors and
insufficient id path arguments can now be return from inside the
`get_ids`-method, and get passed up to the application logic to be
handled.

This change is reflected in all instances of IdPathProvider and their
surrounding code.

Signed-off-by: Leon Schuermann <leon.git@is.currently.online>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-24 21:03:34 +02:00
Matthias Beyer 1d89844613 Run 'cargo fix' for rust-2018
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-05-18 00:20:59 +02:00
Matthias Beyer aa5ea533c7 Add imag-header
imag-header is a tool for querying information of an entry in a defined
format.

imag-header is intended for scripting with imag commands.
The output format is not stable yet, though.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15 20:54:52 +01:00