Matthias Beyer
9fc9e7fe17
Outsource iterator in iter module
2018-04-26 12:05:28 +02:00
Matthias Beyer
ab15d89e64
Rewrite CategoryRegister as CategoryStore
2018-04-26 12:05:28 +02:00
Matthias Beyer
5f305ef7a7
Add module for category handling
2018-04-26 12:05:28 +02:00
Matthias Beyer
c26f1aae2a
This module should be named "entry"
2018-04-26 11:20:40 +02:00
Matthias Beyer
f321aa82a1
Make sure category is linked when setting it
2018-04-26 11:20:09 +02:00
Matthias Beyer
0bacfb0a88
Merge pull request #1446 from matthiasbeyer/travis-clippy
...
Travis: clippy
2018-04-26 10:25:45 +02:00
Matthias Beyer
ea80a5a09b
Derive Default for InMemoryFileAbstraction, remove constructor
2018-04-25 19:15:07 +02:00
Matthias Beyer
6a34e7a8fd
Derive Default for FSFileAbstraction, reduces boilerplate
2018-04-25 19:15:07 +02:00
Matthias Beyer
bf363c4748
Use "if let" if matching on a single pattern
2018-04-25 19:15:07 +02:00
Matthias Beyer
f1142c414d
Use ok_or_else() instead of ok_or()
2018-04-25 19:15:07 +02:00
Matthias Beyer
22170a0d55
Do not String::from(String)
2018-04-25 19:13:51 +02:00
Matthias Beyer
6f5590713a
Use single quotes here
2018-04-25 19:13:51 +02:00
Matthias Beyer
44521a7c8c
Dont use "return" keyword at end of function
2018-04-25 19:13:51 +02:00
Matthias Beyer
dc18e650bb
Collapse nested if-else-if
2018-04-25 19:13:51 +02:00
Matthias Beyer
67675b2ab2
Remove unecessary clone
2018-04-25 19:13:51 +02:00
Matthias Beyer
a25f650ca0
Be more ergonomic here
2018-04-25 19:13:51 +02:00
Matthias Beyer
84249e3fb5
Be less verbose when constructing an object
...
The rust compiler does some fancy things for us: It automatically finds
the right fields if the name of the variable and the file is the same.
Lets use that to reduce boilerplate with this patch.
2018-04-25 19:13:50 +02:00
Matthias Beyer
154c2e482b
Change generate_variants() helper to use base by ref
2018-04-25 19:13:50 +02:00
Matthias Beyer
42c4186dec
Use or_else() instead of or()
2018-04-25 19:13:50 +02:00
Matthias Beyer
80c07171aa
Make sure we can deserialize
...
Use default values when field is not there when we deserialize. This
does automatically the right thing.
2018-04-25 13:45:00 +02:00
Matthias Beyer
56c1b78d93
Add getters for DeserVcard helper type
2018-04-25 13:45:00 +02:00
Matthias Beyer
abc142f4b5
Rewrite library
...
libimagcontact stores all contact information in the entry header now.
2018-04-25 12:54:01 +02:00
Matthias Beyer
3eab3af7b0
Remove all libimagentryref usage
2018-04-25 11:30:42 +02:00
Matthias Beyer
775508a6ed
Refactor: Use AsRef<str> instead of String as arg type
2018-04-24 23:12:14 +02:00
Matthias Beyer
488ce9fe91
Clippy fixes
2018-04-24 23:12:14 +02:00
Matthias Beyer
524c391ee0
Remove unused dependency
2018-04-24 22:16:40 +02:00
Matthias Beyer
563c76c375
Remove "stdio" file abstraction from store implementation
2018-04-24 22:16:40 +02:00
Matthias Beyer
19e0471f5b
Remove tests with JsonMapper in backend
2018-04-24 22:16:40 +02:00
Matthias Beyer
ba453323ba
Remove support for changing store backend
2018-04-24 22:16:40 +02:00
Matthias Beyer
d12844aff0
Add markdown viewer functionality
2018-04-24 18:06:45 +02:00
Matthias Beyer
55d9b5456f
Adapt to new libimagentryview interface
...
And properly implement Viewer for DiaryViewer
2018-04-24 16:46:15 +02:00
Matthias Beyer
780dd90c8f
Rewrite libimagentryview interface
...
In the previous versions, the sink (where the entries should be written
to) was not passed.
This did conflict with the libimagrt holding the stdout/stderr handles,
because it automatically writes to stdout (which we don't want to do in
some cases).
Passing the sink is way nicer. This patch changes libimagentryview so
that the sink is passed to the viewer.
2018-04-24 16:46:15 +02:00
Matthias Beyer
5666ef12d0
Rewrite to not use Store::retrieve_for_module()
2018-04-24 14:01:40 +02:00
Matthias Beyer
2c52957b63
Replace call to retrieve_for_module() with entries()
...
The iterator type handles everything else.
2018-04-24 13:40:42 +02:00
Matthias Beyer
190da895f9
Do not use Store::retrieve_for_module() anymore here
2018-04-24 13:40:42 +02:00
Matthias Beyer
22fb26dc12
Replace Store::retrieve_for_module() with own iterator type
2018-04-24 13:40:42 +02:00
Matthias Beyer
007c02c2f1
Rewrite all_category_names() for removed Store::retrieve_for_module()
2018-04-24 13:40:42 +02:00
Matthias Beyer
255f4211c9
Rewrite use of iterator with own iterator implementation
2018-04-24 13:40:42 +02:00
Matthias Beyer
bae9188a08
Remove GlobStoreIdIterator helper iterator type
2018-04-24 13:40:42 +02:00
Matthias Beyer
d70092d691
Remove: Store::retrieve_for_module
2018-04-24 13:40:42 +02:00
Matthias Beyer
9303a72a28
Merge pull request #1436 from matthiasbeyer/imag-log/show-ordered
...
Fix: imag-log show should order by datetime
2018-04-22 15:55:25 +02:00
Matthias Beyer
93226ce987
Merge pull request #1434 from matthiasbeyer/libimagdiary/fix-youngest-entry
...
Fix: get_youngest_entry_id()
2018-04-22 15:06:26 +02:00
Matthias Beyer
ee75d2309c
Fix: imag-log show should order by datetime
2018-04-22 14:33:53 +02:00
Matthias Beyer
86b60295ee
Fix: get_youngest_entry_id()
...
We need to reverse the iterator for getting the _youngest_ entry here.
Also seems to fix the issue that imag-diary edit -d <date> did not work
properly.
2018-04-22 14:11:19 +02:00
Matthias Beyer
19940d3e1c
Set version string by hand here if we do not build with cargo
2018-04-22 13:38:24 +02:00
Matthias Beyer
8262de29fe
Update dependency: log: 0.4.0-rc.1 -> 0.4
2018-04-20 20:19:02 +02:00
Matthias Beyer
d08a5ab536
Merge pull request #1417 from matthiasbeyer/libimagrt/suggest-imag-init
...
Suggest imag-init if no config is found
2018-04-20 09:24:44 +02:00
Matthias Beyer
91a72709f8
Add wrapping functionality to StdoutViewer
2018-04-19 21:54:39 +02:00
Matthias Beyer
808689cc05
Suggest imag-init if no config is found
2018-04-19 10:57:13 +02:00
Matthias Beyer
d2dceb6640
Update version numbers: 0.7.0 -> 0.8.0
2018-04-19 10:05:53 +02:00