Commit Graph

374 Commits

Author SHA1 Message Date
Matthias Beyer 23e0f720e5 Fix broken pipe errors 2018-02-19 11:14:18 +01:00
Matthias Beyer 876c1cb9af Fix broken pipe panics 2018-02-19 11:14:18 +01:00
Matthias Beyer 5e78a43242 Fix for broken pipe panics 2018-02-19 11:14:18 +01:00
Matthias Beyer c2dfb2ef52 Refactor timetrack subcommands output for broken pipe errors 2018-02-19 11:14:18 +01:00
Matthias Beyer 6a341d3723 Abstract exit code as a type 2018-02-19 11:14:18 +01:00
Matthias Beyer eb2f6fbbe2 Fix for broken pipe errors 2018-02-19 10:40:26 +01:00
Matthias Beyer 013fc75d85 Fix output for broken pipe errors 2018-02-19 10:40:26 +01:00
Matthias Beyer 88d21375b9 Refactor "imag store ids" command to not panic on broken pipe 2018-02-19 10:40:26 +01:00
Matthias Beyer 2decc904aa Fix binary name 2018-02-18 20:04:22 +01:00
Matthias Beyer b586e13a98 Add timewarrior import script 2018-02-18 20:03:50 +01:00
Matthias Beyer 10e7a82a45 Refactor imag-diary 2018-02-18 20:03:50 +01:00
Matthias Beyer b61547c2d1 Add debug output what is about to be done 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
Matthias Beyer 94cad804e1 Use ErrFromStr convenience extension 2018-02-12 21:25:51 +01:00
Matthias Beyer 6b0930adec Use ErrFromStr convenience extension 2018-02-12 21:25:33 +01:00
Matthias Beyer efdfb2a308 Fix imag-view for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 63f2c70bed Fix imag-notes for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 8128d3ade9 Fix imag-mail for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer ee23f432de Fix imag-contact for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 86abfb88a4 Fix imag-bookmark error handling 2018-02-12 21:19:48 +01:00
Matthias Beyer c0000b6410 Rewrite .map_err_trace_exit_unwrap()
Necessary because error types changed
2018-02-12 21:19:48 +01:00
Matthias Beyer 50b0ffa6ae Remove calls to trace_error_exit() 2018-02-12 21:19:48 +01:00
Matthias Beyer 3845399fb8 Simplify implementation for new libimagerror interface 2018-02-12 21:19:48 +01:00
Matthias Beyer ba1c6c06fa Add error chaining for compatibility with new libimagerror interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 1f4c0cafe4 Remove calls to trace_error_exit 2018-02-12 21:19:48 +01:00
Matthias Beyer a43232230b Fix error handling for new API 2018-02-12 21:19:48 +01:00
Matthias Beyer 7892782675 Refactor error handling 2018-02-12 21:19:48 +01:00
Matthias Beyer b9800e19e9 Refactor imag-diary to use new error handling interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 77be32d80f Remove "get" iterator, store provides this now 2018-02-11 23:44:27 +01:00
Matthias Beyer cf0f93104d Add kairos support in "list" subcommand
This patch adds kairos support in the "list" subcommand for the "-f" and
"-t" parameters which limit the entries to show.

Something like

    imag timetrack list --from yesterday

is now possible.
2018-02-11 21:27:15 +01:00
Matthias Beyer 4c95625def
Merge pull request #1278 from matthiasbeyer/imag-init/fix-release-build-include-string-path
imag-init: fix release build include string path
2018-02-11 17:55:27 +01:00
Matthias Beyer 9e3c966d84
Merge pull request #1273 from matthiasbeyer/update-version-numbers
Update version string: 0.6.0 -> 0.7.0
2018-02-11 17:50:52 +01:00
Matthias Beyer 938601f4fd
Merge pull request #1267 from matthiasbeyer/imag-link/do-not-link-entry-with-itself
Do not allow linking with entry itself
2018-02-11 16:07:36 +01:00
Matthias Beyer 8a3f2602e0 Fix include_str!() in imag-init
Fixed by symlinking the imagrc.toml file to the crate directory of
imag-init.
2018-02-11 14:43:35 +01:00
Matthias Beyer 30d2c28a22 Update version string: 0.6.0 -> 0.7.0 2018-02-11 14:22:24 +01:00
Matthias Beyer 5e43773158 Do not allow linking with entry itself
Without this check, linking an entry with itself yields the following
error:

    ERROR[   1]: Entry is already borrowed: StoreId { base: Some("/home/m/.imag/store"), id: "notes/test" }
    ERROR[   2]: Error when calling retrieve() -- caused:
    ERROR[   3]: Error when calling get()

Which is semantically correct, but the user may get confused by that.

Instead, we print a nice error message that the entry cannot be linked
to itself.

This is not fixed in libimagentrylink itself, because libimagentrylink
cannot be called for the same entry.
If this would be possible, we would pass two `Entry` objects
mutably to the link functionality routines. This is not possible with
Rusts borrow semantics and therefor yields above error.

We compare strings to check whether the user accidentially linked an
entry with itself because we cannot get StoreIds from Entries because we
cannot get the Entry two times from the store in the first place. So
this is the best we have.
2018-02-11 13:41:16 +01:00
Matthias Beyer fa8af0c053
Merge pull request #1275 from matthiasbeyer/clap-features
Clap features
2018-02-11 13:29:17 +01:00
Matthias Beyer 4ead39233b
Merge pull request #1280 from matthiasbeyer/imag-init/fix-git-init
Fix: git dir is not worktree dir
2018-02-11 13:29:02 +01:00
Matthias Beyer 7f4cdced4a
Merge pull request #1262 from matthiasbeyer/do-not-print-ok
Do not print "Ok" after successful execution
2018-02-10 21:22:12 +01:00
Matthias Beyer 1f462e4635
Merge pull request #1264 from matthiasbeyer/imag-log/show-alias-list
Alias subcommand "show" to "list"
2018-02-10 21:22:05 +01:00
Matthias Beyer 7bbc379b73
Merge pull request #1266 from matthiasbeyer/imag/list-commands-alphabetically
Sort commands alphabetically
2018-02-10 21:21:57 +01:00
Matthias Beyer faafe6e994
Merge pull request #1265 from matthiasbeyer/imag/help
Add subcommand "help"
2018-02-10 18:56:29 +01:00
Matthias Beyer 3b098069c5 Fix: git dir is not worktree dir 2018-02-10 18:18:39 +01:00
Matthias Beyer 9f48071e48 Do not print "Ok" after successful execution 2018-02-10 16:41:27 +01:00
Matthias Beyer ec2f3a73d7 Do not print stats when listing files with matches 2018-02-10 16:41:23 +01:00
Matthias Beyer 2dfede240e Alias subcommand "show" to "list" 2018-02-10 16:41:20 +01:00
Matthias Beyer c17b256dfd Add subcommand "help" 2018-02-10 16:41:15 +01:00
Matthias Beyer 45cec64575 Sort commands alphabetically 2018-02-10 16:40:53 +01:00
Matthias Beyer 8656a38c50 Update dependency: clap: 2.17 -> 2.29 2018-02-10 16:40:34 +01:00
Matthias Beyer 9d2900a7dc Compile clap with suggestions and color support 2018-02-10 16:40:34 +01:00
Matthias Beyer 35bc1009f2 Revert "Fix include path for release"
This reverts commit c229d7d1fc.
2018-02-10 15:14:03 +01:00
Matthias Beyer c229d7d1fc Fix include path for release 2018-02-10 15:08:40 +01:00
Matthias Beyer 3b710e082d Add missing Cargo.toml metadata 2018-02-10 14:11:46 +01:00
Matthias Beyer d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
Matthias Beyer 1217d88a50 Fix links after moving entry 2018-02-06 23:37:21 +01:00
Matthias Beyer 864e457dce
Merge pull request #1259 from matthiasbeyer/imag-log/no-leading-space
Do not put a leading space in the log
2018-02-06 23:29:22 +01:00
Matthias Beyer da74896248
Merge pull request #1258 from matthiasbeyer/imag-log/dont-list-non-log-entries
Do not list entries which are not "log" entries
2018-02-06 22:39:13 +01:00
Matthias Beyer 1b588172dd
Merge pull request #1255 from matthiasbeyer/imag-notes/fix-list
Fix imag-notes list errors
2018-02-06 21:45:37 +01:00
Matthias Beyer 88b7b43d2c Do not put a leading space in the log 2018-02-06 20:54:11 +01:00
Matthias Beyer f44f13e23a Do not list entries which are not "log" entries 2018-02-06 20:48:47 +01:00
Matthias Beyer 97e613d8c5 Use libimagstore get iterator
Use libimagstore infrastructure to transform iterator in
StoreIdGetIterator for getting entries from store.
2018-02-06 20:41:13 +01:00
Matthias Beyer 8cba4daf20 Print to stderr 2018-02-06 19:28:27 +01:00
Matthias Beyer 85d1c632d3 Print "imag-<tool>" rather than only "<tool>"
The error output should note "imag-<tool> exited with ..." rather than
only "<tool> exited with ..."
2018-02-06 19:28:08 +01:00
Matthias Beyer 3b138ba881
Merge pull request #1231 from matthiasbeyer/update-kairos
Update kairos dependency: 0.1.0-beta-2 -> 0.1.0
2018-02-05 17:30:55 +01:00
Matthias Beyer e2e3b4f6e2 Update kairos dependency: 0.1.0-beta-2 -> 0.1.0 2018-02-05 16:20:05 +01:00
Matthias Beyer d1fc8c3995 Add second support in imag-diary commandline interface 2018-02-04 19:51:07 +01:00
Matthias Beyer ae4ced9587 Show content by default 2018-02-01 21:47:09 +01:00
Matthias Beyer 8e931cd79f Change calls to into_get_iter() to not take argument 2018-02-01 16:46:38 +01:00
Matthias Beyer 030e32e44f Provide StoreId Iterator which has a ref to the Store
This change is needed so we can refactor the "get" iterator to not take
an argument (the store) later, which improves the API.
2018-02-01 15:47:39 +01:00
Matthias Beyer da4b823048
Merge pull request #1219 from matthiasbeyer/minor
Minor patches
2018-02-01 13:18:31 +01:00
Matthias Beyer 4d94791b1f Move date <-> string conversion utility to libimagutil 2018-02-01 09:26:33 +01:00
Matthias Beyer 30ef3bf0d3 Comment type fixed 2018-01-29 09:38:32 +01:00
Matthias Beyer 7731b88c97 Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap() 2018-01-29 09:38:32 +01:00
Matthias Beyer 82b67115e6 Refactor: Minify
Pull in new dependencies for minification
2018-01-29 09:38:32 +01:00
Matthias Beyer 74f58d6c06 Remove unused imports 2018-01-29 09:38:32 +01:00
Matthias Beyer 53bf1a513b Implement stopping all tags which are started 2018-01-28 20:51:20 +01:00
Matthias Beyer 3735fbac2f
Merge pull request #1166 from matthiasbeyer/log-0-4-0
Dependency update: log 0.4.0
2018-01-18 15:40:50 +01:00
Matthias Beyer fcfc397fc8 env_logger: 0.5.0-rc.2 -> 0.5 2018-01-18 14:15:40 +01:00
Matthias Beyer 45ac9b4132 Change list command to use a table for output 2018-01-16 14:48:48 +01:00
Matthias Beyer 8d9c7dce4f env_logger: 0.5.0-rc.1 -> 0.5.0-rc.2 2018-01-15 11:22:09 +01:00
Matthias Beyer 635d000344 log: 0.4.0-rc.1 -> 0.4.0 2018-01-15 11:21:52 +01:00
Matthias Beyer c45130ddd0 env_logger: 0.4.* -> 0.5.0-rc.1 2018-01-15 11:20:27 +01:00
Matthias Beyer f209e12410 Update dependency: log: 0.3.* -> 0.4.0-rc.1 2018-01-15 11:20:07 +01:00
Matthias Beyer 5beadbbf5b Call default command if no command is passed 2018-01-13 14:36:31 +01:00
Matthias Beyer 284f12e8cb Refactor: Split actual list implementation from argument processing 2018-01-13 14:36:31 +01:00
Matthias Beyer 47e98675e7 imag-todo: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer 55d97e565d imag-log: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer f0e8e89c15 imag-contact: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer 137680498c imag-bookmark: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer 0a78d43741 imag-view: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer 0c4be78223 Update dependency: toml-query -> 0.6 2018-01-13 01:14:03 +01:00
Matthias Beyer bfc35e0517 Remove dependency "version"
Because the "version" crate is licensed as GPL, which would us require
to release imag as GPL, we remove the crate now.
2018-01-12 13:33:40 +01:00
Matthias Beyer 8d69e45c0e Add imag-edit command 2018-01-09 11:56:22 +01:00
Matthias Beyer 15cc7d6805
Merge pull request #1210 from matthiasbeyer/imag-after-help
imag: Use App::after_help()
2018-01-08 23:30:51 +01:00
Matthias Beyer 0c2308bd76 Use App::after_help() for printing runtime-generated help output 2018-01-08 16:55:07 +01:00
Matthias Beyer 95e861b5ca Adapt for new API 2018-01-08 15:16:14 +01:00
Matthias Beyer 5aeaacc317
Merge pull request #1190 from matthiasbeyer/imag-init/init
imag-init: initial import
2018-01-04 19:37:50 +01:00
Matthias Beyer 38f8de15bf Revert "Integrate spinner for nicer progress reports"
This reverts commit de7a4d2dfb.
2018-01-04 12:10:07 +01:00
Matthias Beyer a6fd525c0f Add "show" functionality 2018-01-03 21:09:03 +01:00