Commit graph

218 commits

Author SHA1 Message Date
c162856a21 Update dependencies
regex: 0.2 -> 1
semver: 0.8 -> 0.9
walkdir: 1 -> 2
2018-10-06 12:21:20 +02:00
d9e4eaad3c Update kairos to master branch
Because of the new error-chain version which kairos can depend on, for
which kairos is not yet released.
2018-09-27 15:05:45 +02:00
1fa9b86531 Update dependency: lazy_static: 0.2 -> 1 2018-09-27 15:05:45 +02:00
f97d9e0d96 Temporarily set vobject to custom fork until we have a new release 2018-09-27 15:05:45 +02:00
946d9891e4 Update dependency: vobject: 0.{4,5} -> 0.6 2018-09-27 15:05:45 +02:00
c65e73acc8 Update dependency: kairos: 0.1 -> 0.2 2018-09-27 15:05:45 +02:00
764a019817 Update dependency: log: 0.3 -> 0.4 2018-09-27 15:05:45 +02:00
3d12998603 Update dependency: toml-query: 0.6 -> 0.7 2018-09-27 15:05:44 +02:00
0a7afee454 Update dependency: error-chain: 0.11 -> 0.12 2018-09-27 15:05:25 +02:00
d4872f6da3 Optimize the Store::entries() interface
The previous iterator was implemented to simply fetch _all_ pathes from
the filesystem, no matter what.

With this implementation, this changes. The iterator now has
functionality to optimize the iteration, if only a subdirectory of the
store is required, for example `$STORE/foo`.

This is done via functionality where the underlying iterator gets
altered.

First of all, the interface was changed to return a `Entries` object,
which itself only covers the libimagstore-internal `PathIterator` type.
This type was changed so that the backend implementation provides an
"PathIterBuilder`, which builds the actual iterator object for the
`PathIterator` type.

The intermediate `StoreIdConstructingIterator` was merged into
`PathIterator` for simplicity.

The `Entries` type got functionality similar to the
`StoreIdIteratorWithStore` type for easier transition to the new API.
This should probably be removed at a later point, though.

As the `walkdir::WalkDir` type is not as nice as it could be, iterators
for two collections in the store could be built like this (untested):

    store
        .entries()?
        .in_collection("foo")
        .chain(store.entries()?.in_collection("bar"))

Functionality to exclude subdirectories is not possible with the current
`walkdir::WalkDir` implementation and has to be done during iteration,
with filtering (as usual).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 12:19:18 +02:00
22d63f0946 Add functionality to create entry at a certain time 2018-07-20 01:37:36 +02:00
664edc7943 Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
2f0a557068 Fix for passing Arc<_> to store interface instead of Box<_> 2018-05-01 21:08:57 +02:00
40688a3c2d Refactor libimagwiki to fit new store iterator interface 2018-05-01 17:44:01 +02:00
715753ed25 Refactor libimagtodo to fit new store iterator interface 2018-05-01 17:44:01 +02:00
72c83ae3f7 Refactor libimagtimetrack to fit new store iterator interface 2018-05-01 17:44:01 +02:00
08114bbf36 Refactor libimagnotes to fit new store iterator interface 2018-05-01 17:44:00 +02:00
e643f36fa3 Refactor libimaghabit to fit new store iterator interface 2018-05-01 17:44:00 +02:00
bf0bef058d Refactor libimagdiary to fit new store iterator interface 2018-05-01 17:44:00 +02:00
8f03b4a71a Refactor libimagcontact to fit new store iterator interface 2018-05-01 17:44:00 +02:00
b3cf96d88b Refactor error handling, use more error chaining 2018-04-30 17:29:27 +02:00
6d21d8eb49 Update dependency: filters: 0.2 -> 0.3 2018-04-29 10:46:36 +02:00
5f3b7b31e7 Add support for storing email properties
We have to move the `Email` type at the bottom of the DeserVcard type
because it contains a table and we must emit tables as last values when
de/serializing.

Maybe this will shoot us in the foot later, but only with TOML I guess.
We'll see. For now, this is good.

For that we need to update a dependency: vobject -> 0.5
2018-04-27 16:57:37 +02:00
0bacfb0a88
Merge pull request #1446 from matthiasbeyer/travis-clippy
Travis: clippy
2018-04-26 10:25:45 +02:00
ea80a5a09b Derive Default for InMemoryFileAbstraction, remove constructor 2018-04-25 19:15:07 +02:00
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
56c1b78d93 Add getters for DeserVcard helper type 2018-04-25 13:45:00 +02:00
abc142f4b5 Rewrite library
libimagcontact stores all contact information in the entry header now.
2018-04-25 12:54:01 +02:00
3eab3af7b0 Remove all libimagentryref usage 2018-04-25 11:30:42 +02:00
55d9b5456f Adapt to new libimagentryview interface
And properly implement Viewer for DiaryViewer
2018-04-24 16:46:15 +02:00
5666ef12d0 Rewrite to not use Store::retrieve_for_module() 2018-04-24 14:01:40 +02:00
2c52957b63 Replace call to retrieve_for_module() with entries()
The iterator type handles everything else.
2018-04-24 13:40:42 +02:00
22fb26dc12 Replace Store::retrieve_for_module() with own iterator type 2018-04-24 13:40:42 +02:00
255f4211c9 Rewrite use of iterator with own iterator implementation 2018-04-24 13:40:42 +02:00
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
ee75d2309c Fix: imag-log show should order by datetime 2018-04-22 14:33:53 +02:00
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
d2dceb6640 Update version numbers: 0.7.0 -> 0.8.0 2018-04-19 10:05:53 +02:00
4568b1f625
Merge pull request #1380 from matthiasbeyer/minor
Minor patches
2018-04-18 16:46:41 +02:00
9daf2cae86 Update dependency: task-hookrs: master -> 0.5 2018-04-18 14:59:26 +02:00
adede7bf26 Remove notion of "main page" 2018-04-18 14:32:23 +02:00
6f16924514 Remove functionality to delete whole wiki 2018-04-18 14:32:09 +02:00
98f8366e4c Fix documentation in crate metadata 2018-04-17 15:55:08 +02:00
816708a1aa Add documentation for type 2018-04-16 10:53:23 +02:00
8928f9cb94 Automatically create "index" and link new pages 2018-04-16 10:53:23 +02:00
5e51a77b3f Add logging output 2018-04-15 10:27:33 +02:00
918d7a76b6 Add Wiki::delete_entry() 2018-04-15 10:27:09 +02:00
2b8a83d9a7 Add entry getter function 2018-04-15 10:27:09 +02:00
c242a362e4 Add id iterator 2018-04-15 10:27:09 +02:00
bb0d4319c3 Initial import: libimagwiki 2018-04-15 10:27:09 +02:00