Commit graph

27 commits

Author SHA1 Message Date
3ac30c0944 imag-contact: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
e96fb53677 Fix: Use "retrieve" instead of "create" when importing
This fixes a bug where a re-import of the contacts directory failed
because some entries already exist.
With this change, one can import the contact directory after things
changed in there and the imag database is updated accordingly, but not
altered. So links and notes are persisting.

For completeness: before, the workflow was to
`cd $IMAG_RTP && git rm store/contacts -r && imag contact import /path/to/contacts`
which is of course not optimal.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-07 10:56:56 +02:00
6bf49aa6b5 Fix: 'imag-contact show' should increase output counter 2018-09-27 08:09:39 +02:00
f85dc02db6 Revert "Deny non-absolut import pathes"
This reverts commit b90abfb868.

Because `libimagcontact` is not based on `libimagentryref` anymore (as
of 2b10ab0b36), and thus does not put
pathes into the header, we can allow non-absolute pathes here.
2018-05-02 19:42:38 +02:00
713621337f Adapt for new libimagcontact interface 2018-04-27 16:57:48 +02:00
d6f8751f6e Reimplement imag-contact 2018-04-25 13:45:00 +02:00
b90abfb868 Deny non-absolut import pathes 2018-04-25 10:33:12 +02:00
3dfb17aabd Add functionality to find contacts and print the storeid/file path 2018-04-06 15:42:15 +02:00
8c1b4124c0 Handle unknown subcommands in binaries with Runtime::handle_unknown_subcommand 2018-04-04 19:34:13 +02:00
e755bfd9de Add JSON output support 2018-03-12 17:46:06 +01:00
cbe30fa9c2 Add "find" command
This patch adds a "find" command to imag-contact which can either list
or show the found contacts (defaults to "list").
2018-03-12 15:23:37 +01:00
50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
9ced9008b5 Refactor imag-contact for new libimagentryref API 2018-02-19 12:15:40 +01:00
eb2f6fbbe2 Fix for broken pipe errors 2018-02-19 10:40:26 +01:00
3341e3640c
Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
2018-02-18 20:03:09 +01:00
9469693763 Use new make_imag_version!() macro for building version string 2018-02-13 11:38:34 +01:00
94cad804e1 Use ErrFromStr convenience extension 2018-02-12 21:25:51 +01:00
ee23f432de Fix imag-contact for new error interface 2018-02-12 21:19:48 +01:00
9f48071e48 Do not print "Ok" after successful execution 2018-02-10 16:41:27 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
7731b88c97 Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap() 2018-01-29 09:38:32 +01:00
f0e8e89c15 imag-contact: Replace read with typed read 2018-01-13 01:14:03 +01:00
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
e211aba341 Implement create subcommand
The complexity of the create() routine justifies the move to another file.

This commit implements the create() functionality which creates a TOML
tempfile which the user should edit and then reads the contents to build
the Vcard object which then gets written to either stdout or the
destination file.

Besides that:

* Move helper function to util module
* Rewrite and fix tests
2017-11-09 11:20:32 +01:00
ab8c8e4e41 Add new required dependencies 2017-11-09 11:19:17 +01:00
d0ec7e26dc Add implementation for imag-contact
* Implement contact listing with formatting via commandline or config
* Implement importer functionality for contact
* Implement "show" subcommand
* imagrc.toml: Add explanation which fns are supported in templates
2017-11-09 11:19:17 +01:00
0540ae9392 Initial import of imag-contact 2017-11-09 11:15:04 +01:00