This patch fixes a bug where entries where created with
`Store::retrieve()` rather than with the API from libimagdiary.
This caused headers to be missing.
Now, the CLI is parsed for the values passed and a NaiveDateTime object
is crafted from that, which is then passed to libimagdiary.
The problem was that the used `Diary::diary_names()` iterator does not
call `unique()` on its output.
That decision was made because the return type would get more
complicated with that feature.
Now that rustc 1.26 with Impl Trait is out, we can refactor the return
types of these functions (so also with `Diary::diary_names()`) to
automatically do this.
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.
The edit command of imag-diary gets removed by this patch.
The rationale is that imag-edit is way more powerful and thus, not every
other imag module should implement an edit command. Chaining
`imag-diary list` and `imag edit -I` is encouraged.
We still need the edit functionality in imag-diary, as `imag diary
create` shall spawn an editor, still. We only remove the ability for
editing of existing entries with this patch.
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.
This patch also removes the (unused) "compile" subcommand and replaces
it with a flag "-c" / "--compile" which prints the output in formatted
to the terminal.
Compiling the output from markdown to HTML and showing in the browser is
not yet possible.