Matthias Beyer
32c5ec1e00
Fix: Sort by date, not by id
...
This patch fixes a bug. We stated in the helptext of the "show" command
that when showing several logs, we sort by date. This was not true as we
sorted by Id, which also included the name of the log, hence we
effectively sorted by name.
This patch fixes that. Output is not sorted by date.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 10:57:21 +02:00
Matthias Beyer
a21d4b7122
Add DiaryId::get_date_representation() function
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 10:56:55 +02:00
Matthias Beyer
57039654ca
Merge branch 'libimagentrytag-refactor' into master
2019-06-29 22:54:26 +02:00
Matthias Beyer
0d5027051d
Fix: Location of tags should not change in the refactoring
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
bd564ad209
Add tests
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
3eff42be5a
Update dependency: toml-query: 0.9.2 for index-out-of-bounds fixes
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
ae9fbe866f
Add test whether setting tags works
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
c5519da011
Tagable should not be implemented for Value
...
Oh my dear, what was I thinking?
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
51dad94cc9
Simplify implementation of has_tags()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
08ba6c68a6
Remove unused imports
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
59bea23004
Simplify implementation of has_tag()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
87bfb422dc
Simplify implementation of remove_tag()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
e95a4cd15d
Simplify implementation of add_tag()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
061c5beb85
Simplify implementation of set_tags()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
2ef57a69ed
Simplify implementation using toml-query Partial
...
This patch rewrites the get_tags() function to use toml_query::read::Partial.
The helper functions is_tag_str and is_tag are rewritten for
compatiblity.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-29 21:36:59 +02:00
Matthias Beyer
1047a06a64
Add trace output
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-26 20:27:38 +02:00
Matthias Beyer
8912939e29
libimagentrylink: Add debugging output
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-26 20:27:35 +02:00
Matthias Beyer
99da4b777a
Rename module: timetrackingstore -> store
2019-06-26 20:27:06 +02:00
Matthias Beyer
34d5a3d62c
Add option to imag-log to ignore newlines
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-26 20:26:59 +02:00
Matthias Beyer
0eac6d9931
Add support for directional links
...
This patch adds support for directional links in libimagentrylink.
A directional link is added to the same header as the "internal" links,
which are unidirectional.
The "outgoing" link is added in "links.to", the "incoming" links are
added to "links.from".
This way we can always traverse all linkage. The `Linkable::links()`
method is changed to always return _all_ link.
The `Link` type was extended for notions of "to" and "from" links.
Also adds testing.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-26 20:26:41 +02:00
Matthias Beyer
56f8aecdbf
Merge branch 'remove-link-annotation-support' into master
2019-06-26 20:26:29 +02:00
Matthias Beyer
c9414d944d
Fix expected link in test
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:43:07 +02:00
Matthias Beyer
64b1d9c79c
Add more debug output
2019-06-23 21:07:32 +02:00
Matthias Beyer
45d0d2d3bb
Add test whether adding an URL works
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:07:29 +02:00
Matthias Beyer
ad3c2c6249
Rewrite UrlLinker
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:07:13 +02:00
Matthias Beyer
ed8546c7dd
Reimplement link module with header Partial
...
This patch reimplements the "link" module using the
`toml_query::read::Partial` feature.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:06:45 +02:00
Matthias Beyer
cdc90f7be7
Refactor: Remove notion of "external link"s
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 13:11:49 +02:00
Matthias Beyer
59ddb70345
Fix: Make sure links are sorted and deduplicated
2019-06-23 11:06:19 +02:00
Matthias Beyer
d89a700fd1
Remove annotateable linking
...
This patch removes the annotateable linking feature from libimagentrylink.
It was not used anyways.
Also, this patch rewrites the complete linking code to use the
toml-query "typed" feature rather than constructing everything by
itself.
This removes a lot of unmaintainable boilerplate code.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 10:35:14 +02:00
Matthias Beyer
11c2cab916
Allow unused variable here
2019-06-22 12:00:07 +02:00
Matthias Beyer
1ffdb72315
Remove obsolete (internal) function
2019-06-22 12:00:02 +02:00
Matthias Beyer
fd59d6d301
Merge branch 'libimagentrylink-interface-redesign' into master
2019-06-21 23:42:40 +02:00
Matthias Beyer
5dc6829354
Rename module: linker -> linkable
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:48 +02:00
Matthias Beyer
ef17930c29
Rename interface
...
With this patch, the libimagentrylink library interface gets renamed.
The trait gets renamed to the more descriptive name "Linkable", the
functions get renamed to not contain any notion of "internal" anymore.
This patch also adapts the whole source tree for the new libimagentrylink
interface, also renaming variables to not contain "_internal_" anymore.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:47 +02:00
Matthias Beyer
f21b6e53a2
Merge branch 'libimagentrylink-split' into master
2019-06-15 16:48:50 +02:00
Matthias Beyer
a2433f315d
Merge branch 'libimagentryview-propagate-io-errors' into master
2019-06-15 16:48:40 +02:00
Matthias Beyer
2268fd8091
Import toml-query with typed feature
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer
901502b67e
Split "internal" module into several submodules
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer
d02d53594e
Fix debug output message
2019-05-31 12:48:00 +02:00
Matthias Beyer
d2a5e8fb59
Rename functions: *_external_link -> *_url
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer
7f2e4c8442
Adapt tested path
2019-05-31 12:48:00 +02:00
Matthias Beyer
14ea375ca4
Fix imag-link for new url library
2019-05-31 12:48:00 +02:00
Matthias Beyer
8b66672772
Fix libimagentrymarkdown for new url lib
2019-05-31 12:48:00 +02:00
Matthias Beyer
8a5bc09b62
Fix libimagbookmark for new url library
2019-05-31 12:48:00 +02:00
Matthias Beyer
c33c29e8e2
Fix import for new libimagentryurl lib
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer
098d25db89
Move code from external libimagentrylink module to libimagentryurl
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer
5cb641044f
Add libimagentryurl
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 17:51:33 +02:00
Matthias Beyer
bb4f0ace6b
Fix imag-diary to ignore broken pipes
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:47 +02:00
Matthias Beyer
a157b23258
Fix imag-view to ignore broken pipes
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:46 +02:00
Matthias Beyer
3e22fbe352
Fix imports for new viewer interface
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:44 +02:00