Commit Graph

725 Commits

Author SHA1 Message Date
Matthias Beyer 5ec1a8a2d4 Merge branch 'refactor-runtime' into master-ff 2019-07-26 23:47:45 +02:00
Matthias Beyer f1e14a0d46 Remove use of Runtime functions, hardcode strings
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-26 23:20:28 +02:00
flip1995 aa23fb485c Fix match same arms bug found by clippy
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-26 23:05:09 +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
Matthias Beyer 6ac6db57d1 Add imag-timetrack shell
This patch adds a subcommand to imag-timetrack which allows a user to
start a $SHELL and start a timetracking with it and as soon as the shell
exits, the timetracking is stopped.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-25 20:32:33 +02:00
Matthias Beyer d5fd773da8 Change imag-wiki interface to be consistent with other commands
Use "list" instead of "ids" for listing ids in a wiki.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-25 19:59:01 +02:00
Matthias Beyer 1196f5395d Add debug output
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-25 19:53:41 +02:00
Matthias Beyer 5f10ab976f Rewrite get_rtp_match() to not panic
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-24 21:32:21 +02:00
Matthias Beyer 03fec5f4db List diaries only if output is not a pipe
Beforehand, this command:

    imag diary -d foo list | cat

listed each entry twice because the reporting feature of libimagrt
forwarded the list to stdout and the normal output was written to
stderr.

With this patch, we get the output only once in this case.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-21 10:42:27 +02:00
Matthias Beyer d53e306459 Merge branch 'imag-diagnostics-more-output' into master 2019-07-14 13:40:28 +02:00
Matthias Beyer ce9fb3c370 Fix for update to latest itertools
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-07-14 12:07:41 +02:00
Matthias Beyer be0436064c Remove uneccessary call to iter()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 19:47:28 +02:00
Matthias Beyer b5d439cef7 Add imag-diagnostics --more output switch
For more output, which is right now: List unverified entries.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 19:38:50 +02:00
Matthias Beyer 2185d44011 Update all dependencies
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-06-30 16:44:23 +02:00
Matthias Beyer 6b8c236b67 Merge branch 'libimaghabit-dont-copy-comment-to-instance' into master 2019-06-30 13:14:36 +02:00
Matthias Beyer a9bde370a3 Merge branch 'imag-log-show-multiple-sort-by-date' into master 2019-06-30 13:14:24 +02:00
Matthias Beyer 62d6b54542 Adapt imag-habit impl for `HabitInstance::get_comment()`
The implementation of `HabitInstance::get_comment()` was changed and
therefore its semantics were changed.

This patch adapts the call to the function for the new signature and
implications.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 11:31:56 +02:00
Matthias Beyer 82c2beafbb Add "done" marker in "list" output
This patch adds a marker in the table when using the "list" command
which marks when the task is already done for the list entry.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 11:09:18 +02:00
Matthias Beyer 32c5ec1e00 Fix: Sort by date, not by id
This patch fixes a bug. We stated in the helptext of the "show" command
that when showing several logs, we sort by date. This was not true as we
sorted by Id, which also included the name of the log, hence we
effectively sorted by name.

This patch fixes that. Output is not sorted by date.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 10:57:21 +02:00
Matthias Beyer 3eff42be5a Update dependency: toml-query: 0.9.2 for index-out-of-bounds fixes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer 99da4b777a Rename module: timetrackingstore -> store 2019-06-26 20:27:06 +02:00
Matthias Beyer 34d5a3d62c Add option to imag-log to ignore newlines
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-26 20:26:59 +02:00
Matthias Beyer 5dc6829354 Rename module: linker -> linkable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:48 +02:00
Matthias Beyer ef17930c29 Rename interface
With this patch, the libimagentrylink library interface gets renamed.

The trait gets renamed to the more descriptive name "Linkable", the
functions get renamed to not contain any notion of "internal" anymore.

This patch also adapts the whole source tree for the new libimagentrylink
interface, also renaming variables to not contain "_internal_" anymore.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:47 +02:00
Matthias Beyer f21b6e53a2 Merge branch 'libimagentrylink-split' into master 2019-06-15 16:48:50 +02:00
Matthias Beyer 901502b67e Split "internal" module into several submodules
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer d2a5e8fb59 Rename functions: *_external_link -> *_url
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer 14ea375ca4 Fix imag-link for new url library 2019-05-31 12:48:00 +02:00
Matthias Beyer c33c29e8e2 Fix import for new libimagentryurl lib
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
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 a157b23258 Fix imag-view to ignore broken pipes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:46 +02:00
Matthias Beyer cee7689e77 Replace deprecated functioncall
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 10:09:45 +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
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 911133818c Fix: Negation error
We have to check whether the configuration is _not_ a String type.
Dump fail.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-23 17:13:10 +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 5fa6b07b9e Fix: Delete links to bookmark collection entry before deleting collection
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 02:36:02 +02:00
Matthias Beyer 49c7c81ff3 Remove unimplemented argument
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 01:59:39 +02:00
Matthias Beyer c4aa8dd5d5 Make "urls" positional argument
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 01:58:39 +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 51daf28509 Merge branch 'imag-timetrack-duration' into master 2019-05-18 00:20:55 +02:00
Matthias Beyer 3884d7319c Add duration listing in imag-timetrack
This patch adds the -d / --show-duration feature to the "list"
subcommand, which makes imag-timetrack list the duration of the
timetracking in the output.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-17 22:28:42 +02:00
Matthias Beyer df62e6f1b3 Add support to only list links
This patch adds support in imag-markdown to only list links that are
found in the markdown.

The list format includes the link title, which I consider convenient in
this case, but still easily scriptable.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-17 21:59:15 +02:00
Matthias Beyer 632062caed Add imag-markdown
This patch adds a tool to process one or more entries as markdown and
print them as html.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-17 21:54:43 +02:00
Matthias Beyer fad684daf2 Merge branch 'imag-contact-edit-retry' into master-ff 2019-05-11 13:29:37 +02:00
Matthias Beyer aa23a51a2f Remove unused constant
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-11 12:26:50 +02:00
Matthias Beyer 8b0f187f7d Add support for looping over edit
This patch adds a imag-contact feature where we loop as long as we
cannot parse the vcard. If the `--no-retry` flag is passed, we fail immediately.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-11 12:25:41 +02:00
Matthias Beyer 0ec080fc7d Merge branch 'imag-ref-list-dead-refs' into master 2019-04-27 02:04:59 +02:00
Matthias Beyer 989624cc5e Merge branch 'minor' into master 2019-04-27 02:00:49 +02:00