Commit Graph

82 Commits

Author SHA1 Message Date
Matthias Beyer bb4f0ace6b Fix imag-diary to ignore broken pipes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:47 +02:00
Matthias Beyer a7d53e47d1 Update toml-query to 0.9.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer 1482f70320 Update dependency: toml: 0.4 -> 0.5
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer b7d91f0905 Remove buildscripts
When installing (a subcrate) from crates.io, it fails because it cannot
find the buildscript. This is the quickfix, simply remove the
buildscript itself and the setup of the buildscript in all Cargo.toml
files.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-22 22:18:57 +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 90eaeb642a Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap calls
This patch removes the magic constant we used when calling
`trace_unwrap_exit()` or `map_err_trace_exit_unwrap()`.
We used to call it with `1` as parameter, where the number was the exit
code to use. Now the implementation of the function does it
automatically (using 1 (one) as exit code).

All calls of these functions were fixed. Thanks to vim this was easy.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11 03:52:04 +01:00
Matthias Beyer f1a639ea8c Change id reporting API to return ExitCode
Because this API only errors when write!() errors occur, we can return
the exit code as an error here.

This way the user of the API can immediately exit if there was an IO
error, but the API automatically takes care of the right return value,
returning (exiting) with zero (0) if there was an "Broken pipe" error
and with one (1) otherwise, which is the expected behaviour here.

All calls to that API were changed accordingly.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11 03:22:56 +01:00
Matthias Beyer 9185abcfa5 Update copyright years
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03 18:41:36 +01:00
Matthias Beyer 9fca66aa89 Forbid unsafe code in all crates 2018-11-11 13:05:55 +01:00
Matthias Beyer 4e516ee19d Update version strings
...for the next release, which will be imag 0.10.0!

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-10 11:56:37 +01:00
Matthias Beyer 17d4123898 Update dependencies from git versions to proper versions.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09 22:14:11 +01:00
Matthias Beyer a2eae99a39 Rewrite debug calls with DebugOption extension 2018-11-09 21:48:26 +01:00
Matthias Beyer c767e6239e Remove unused parameter
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09 21:48:26 +01:00
Matthias Beyer 2ca6be8322 Add id reporting in imag-diary 2018-11-06 20:35:18 +01:00
Matthias Beyer 1321f49428 Optimize implementation
Code-wise, the functionality was not changed. The changes only make the
code much more pretty.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06 14:48:49 +01:00
Matthias Beyer d004c667fd Optimize implementation
Code-wise, the functionality was not changed. The changes only make the
code much more pretty.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06 14:48:49 +01:00
Matthias Beyer 8223f846b4 Use new "ask" function interface with input/output stream params
In the imag-contact crate we had to rewrite the ask_continue!{} macro
as a function for less headache, but besides that this is a rather
straight-forward patch for adapting to the new interface.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-01 20:33:24 +01:00
Matthias Beyer 4486abed84 imag-diary: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
Matthias Beyer 3d12998603 Update dependency: toml-query: 0.6 -> 0.7 2018-09-27 15:05:44 +02:00
Matthias Beyer b896bc2657 Fix: Do not create entries with Store::retrieve()
This patch fixes a bug where entries where created with
`Store::retrieve()` rather than with the API from libimagdiary.
This caused headers to be missing.

Now, the CLI is parsed for the values passed and a NaiveDateTime object
is crafted from that, which is then passed to libimagdiary.
2018-07-20 01:37:36 +02:00
Matthias Beyer 22d63f0946 Add functionality to create entry at a certain time 2018-07-20 01:37:36 +02:00
Matthias Beyer 664edc7943 Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
Matthias Beyer 11f9a9027e Refactor imag-diary to new store iterator interface 2018-05-01 17:44:09 +02:00
Matthias Beyer 58a6eea573 Remove the edit command
The edit command of imag-diary gets removed by this patch.

The rationale is that imag-edit is way more powerful and thus, not every
other imag module should implement an edit command. Chaining
`imag-diary list` and `imag edit -I` is encouraged.

We still need the edit functionality in imag-diary, as `imag diary
create` shall spawn an editor, still. We only remove the ability for
editing of existing entries with this patch.
2018-04-30 14:04:16 +02:00
Matthias Beyer 279f7ef2aa Fix: Pass output stream to view_entries() 2018-04-24 16:46:23 +02:00
Matthias Beyer 6e80f603d6 Add functionality to list diaries 2018-04-19 21:36:22 +02:00
Matthias Beyer d2dceb6640 Update version numbers: 0.7.0 -> 0.8.0 2018-04-19 10:05:53 +02:00
Matthias Beyer b690925e01 Fix: Use fill storeid when listing 2018-04-18 18:32:11 +02:00
Matthias Beyer 4568b1f625
Merge pull request #1380 from matthiasbeyer/minor
Minor patches
2018-04-18 16:46:41 +02:00
Matthias Beyer 98f8366e4c Fix documentation in crate metadata 2018-04-17 15:55:08 +02:00
Matthias Beyer 51b9b5c0db Fix: Use qualification 2018-04-14 00:58:40 +02:00
Matthias Beyer 76c8443e50
Merge pull request #1395 from matthiasbeyer/clap-text-wrap
Clap text wrap
2018-04-13 22:46:09 +02:00
Matthias Beyer aeec10bf76 Use clap with wrap_help feature 2018-04-13 16:19:10 +02:00
Matthias Beyer b59c234588 Use clap "^2.29" instead of ">=2.29" 2018-04-13 16:17:43 +02:00
Matthias Beyer 532de484f2 Fix: List ids sorted 2018-04-13 13:51:56 +02:00
Matthias Beyer 8c1b4124c0 Handle unknown subcommands in binaries with Runtime::handle_unknown_subcommand 2018-04-04 19:34:13 +02:00
Matthias Beyer ee6e766c8d Use generate_runtime_setup() to create Runtime object 2018-03-04 13:57:44 +01:00
Matthias Beyer 50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
Matthias Beyer f88884c321
Merge pull request #1321 from matthiasbeyer/libimagdiary/not-on-retrieve-for-module
libimagdiary: Do not rely on Store::retrieve_for_module
2018-03-03 13:53:18 +01:00
Matthias Beyer cedbaf1b5c Add "daily" support 2018-03-02 23:10:53 +01:00
Matthias Beyer 776e1dac91 Fix: Hourly/Minutely should set minute/second to zero 2018-03-02 23:10:53 +01:00
Matthias Beyer affd15a890 Rewrite imag-diary for new Diary::entries() interface 2018-03-02 21:28:40 +01:00
Matthias Beyer c2b754dbec
Merge pull request #1303 from matthiasbeyer/imag-diary/fix-list-diary-name-passing
Fix order of evaluation
2018-02-20 18:37:55 +01:00
Matthias Beyer 0cde88d661 Fix order of evaluation
We need to evaluate the commandline argument first and if there is none,
we use the default.

This patch fixes that bug.
2018-02-20 17:27:42 +01:00
Matthias Beyer 027c4b3287 Remove usage of libimagentrylist 2018-02-20 15:02:46 +01:00
Matthias Beyer e501f66dac Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 876c1cb9af Fix broken pipe panics 2018-02-19 11:14:18 +01:00
Matthias Beyer 10e7a82a45 Refactor imag-diary 2018-02-18 20:03:50 +01:00
Matthias Beyer 3341e3640c
Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
2018-02-18 20:03:09 +01:00
Matthias Beyer 9469693763 Use new make_imag_version!() macro for building version string 2018-02-13 11:38:34 +01:00