Commit Graph

403 Commits

Author SHA1 Message Date
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 78fe9b8cc5 Change "imag" impl to not instantiate Runtime object
Adapt libimagrt interface to export the functions we need to do this.
This is not that nice, but the best approach without rewriting large
parts of libimagrt.
2018-02-26 22:10:23 +01:00
Matthias Beyer 35ac7ba927 Provide unlink() CLI interface 2018-02-25 18:59:02 +01:00
Matthias Beyer b2048b3dcf
Merge pull request #1306 from matthiasbeyer/minor
Minor patches
2018-02-20 20:23:41 +01:00
Matthias Beyer f38a4eb723
Merge pull request #1304 from matthiasbeyer/imag-init/imag-version-generator
Use the make_imag_version!() helper
2018-02-20 19:21:08 +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 c4b33005fd Increase gap size 2018-02-20 17:46:50 +01:00
Matthias Beyer 59ea31a077 Use the make_imag_version!() helper 2018-02-20 17:45:14 +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 f5df7cf332 Revert "Dump all StoreIds"
This reverts commit 1f84643486.
2018-02-20 13:40:52 +01:00
Matthias Beyer dd8d4e6fa4 Add imag-ids core command 2018-02-20 13:37:10 +01:00
Matthias Beyer 2dc23c8101 Merge branch 'imag-ref/rewrite-libimagref-api-usage' into libimagentryref/refactor 2018-02-19 12:17:58 +01:00
Matthias Beyer 9ced9008b5 Refactor imag-contact for new libimagentryref API 2018-02-19 12:15:40 +01:00
Matthias Beyer d3d6b80b8b Redesign of the CLI 2018-02-19 12:15:13 +01:00
Matthias Beyer b9d04730db Fix for broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer e8f8969ded Fix broke pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 36e511d39b Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 380aeccdc7 Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 125eebe1ce Fix broken pipe panic 2018-02-19 11:14:19 +01:00
Matthias Beyer fc0610b77f Fix broken pipe panic 2018-02-19 11:14:19 +01:00
Matthias Beyer 872b300b9c Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 632d68e0e0 Fix broken pipe panic 2018-02-19 11:14:19 +01:00
Matthias Beyer 09da5cc21e Fix for broken pipe panic 2018-02-19 11:14:19 +01:00
Matthias Beyer 427ad89e55 Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer 849229eec6 Fix broken pipe panics 2018-02-19 11:14:19 +01:00
Matthias Beyer e501f66dac Fix broken pipe panics 2018-02-19 11:14:19 +01:00
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