summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-contact
AgeCommit message (Collapse)Author
2019-04-22Rewrite imag-contact to handle reference storingMatthias Beyer
This patch rewrites the imag-contact binary to be able to work with the new libimagcontact interface, which now uses libimagentryref for storing references to the actual vcard files. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Adapt to new all_contacts() return typeMatthias Beyer
because we return `libimagstore::iter::Entries` here now, we do not have to pass the store anymore. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Fix: Also print if runtime ignores IDsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap callsMatthias Beyer
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-11Optimize: Do not attempt to print if output is a pipeMatthias Beyer
This is a small optimization so that we do not print the information if the output is a pipe anyways. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Change id reporting API to return ExitCodeMatthias Beyer
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-01-03Update copyright yearsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-11Forbid unsafe code in all cratesMatthias Beyer
2018-11-10Update version stringsMatthias Beyer
...for the next release, which will be imag 0.10.0! Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09Update dependencies from git versions to proper versions.Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-07Rewrite iteration without collecting inbetweenMatthias Beyer
Because why not? Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06Add id reporting in imag-contactMatthias Beyer
2018-11-06Optimize implementationMatthias Beyer
This does optimize the implementation of the list command implementation (code-structure wise, not performance wise). Functionality not altered. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-01Use new "ask" function interface with input/output stream paramsMatthias Beyer
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-10-30imag-contact: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-07Fix: Use "retrieve" instead of "create" when importingMatthias Beyer
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-06Update dependenciesMatthias Beyer
walkdir: 1 -> 2 uuid: 0.6 -> 0.7
2018-09-27Fix: Use VcardBuilder instead of Vcard itselfMatthias Beyer
The current implementation does not panic on VcardBuilder::build(), so we unwrap() that directly. Should be fixed in future versions of either rust-vobject or here, so that we error appropriately. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27Update dependency: handlebars: 0.29.0 -> 1.0Matthias Beyer
2018-09-27Temporarily set vobject to custom fork until we have a new releaseMatthias Beyer
2018-09-27Update dependency: vobject: 0.{4,5} -> 0.6Matthias Beyer
2018-09-27Revert "Update dependency: handlebars: 0.29.0 -> 1.0"Matthias Beyer
This reverts commit a1f0872486995b80216e8a08a2176debdef3752a. As updating handlebars needs some more involvement, we roll back to the version we use currently and schedule the update for later. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27Update dependency: handlebars: 0.29.0 -> 1.0Matthias Beyer
2018-09-27Update dependency: toml-query: 0.6 -> 0.7Matthias Beyer
2018-09-27Fix: 'imag-contact show' should increase output counterMatthias Beyer
2018-05-09Update version string: 0.8.0 -> 0.9.0Matthias Beyer
2018-05-02Revert "Deny non-absolut import pathes"Matthias Beyer
This reverts commit b90abfb86814142b1483d9e540298607cf6894de. Because `libimagcontact` is not based on `libimagentryref` anymore (as of 2b10ab0b3627ea73cf4101112c035a81e2f1bd37), and thus does not put pathes into the header, we can allow non-absolute pathes here.
2018-04-27Adapt for new libimagcontact interfaceMatthias Beyer
2018-04-27Set extension or warn if none thereMatthias Beyer
In case of auto-generating the file name, we should add an extension. If we do not auto-generate the file name, we should warn that the extension for the file is missing.
2018-04-26Merge pull request #1453 from matthiasbeyer/imag-contact/create-uidMatthias Beyer
Fix: Generate UID when creating a contact
2018-04-26Fix: Generate UID when creating a contactMatthias Beyer
2018-04-26Fix: Make most fields optionalMatthias Beyer
2018-04-25Reimplement imag-contactMatthias Beyer
2018-04-25Remove feature usageMatthias Beyer
2018-04-25Deny non-absolut import pathesMatthias Beyer
2018-04-19Update version numbers: 0.7.0 -> 0.8.0Matthias Beyer
2018-04-18Merge pull request #1380 from matthiasbeyer/minorMatthias Beyer
Minor patches
2018-04-17Fix documentation in crate metadataMatthias Beyer
2018-04-14Add lintsMatthias Beyer
2018-04-13Use clap with wrap_help featureMatthias Beyer
2018-04-13Use clap "^2.29" instead of ">=2.29"Matthias Beyer
2018-04-06Add functionality to find contacts and print the storeid/file pathMatthias Beyer
2018-04-06Merge pull request #1375 from matthiasbeyer/imag-contact/find-formatMatthias Beyer
imag-contact: Add format argument
2018-04-06Fix formatted output, use seperator for listsMatthias Beyer
The formatted output should use ", " as seperator for lists of values
2018-04-06Add format argumentMatthias Beyer
2018-04-04Handle unknown subcommands in binaries with Runtime::handle_unknown_subcommandMatthias Beyer
2018-03-12Add JSON output supportMatthias Beyer
2018-03-12Merge pull request #1336 from matthiasbeyer/imag-contact/find-showMatthias Beyer
imag-contact: Add "find" command
2018-03-12Add "find" commandMatthias Beyer
This patch adds a "find" command to imag-contact which can either list or show the found contacts (defaults to "list").
2018-03-12Join mails with commaMatthias Beyer