Commit graph

337 commits

Author SHA1 Message Date
1ce780795a Do not use StoreId::local() here 2018-11-26 18:19:10 +01:00
496c06d15a Update lazy_static to 1.2
1.2 of lazy_static brings functionality to have no panics in the code,
which is what we try to have.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-11 13:05:55 +01:00
9fca66aa89 Forbid unsafe code in all crates 2018-11-11 13:05:55 +01:00
4e516ee19d Update version strings
...for the next release, which will be imag 0.10.0!

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-10 11:56:37 +01:00
17d4123898 Update dependencies from git versions to proper versions.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09 22:14:11 +01:00
d1f087eb57 Change libimag{bookmark, entrylink} external linking
...to report newly created entries, so that we can re-use these new
entries in the library-using code (for example for ID reporting).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06 20:33:30 +01:00
a45691ef27 Change test output to use debug!() 2018-11-01 20:37:02 +01:00
1f5b490dd7 Change test output to use debug!() 2018-11-01 20:37:02 +01:00
83876b7c2c Change test output to use debug!() 2018-11-01 20:37:02 +01:00
366ca62eb9 Update dependency: mdcat: 0.8 -> 0.11 2018-10-31 17:15:29 +01:00
a1c65603dc libimagentrydatetime: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
f3e7f677b0 libimagentryutil: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
e553d20a8f libimagentrymarkdown: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
ebe2a9a110 libimagentryview: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
9b48dc27cd libimagentryref: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
5a7def4c8e libimagentryedit: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
7f04eb2bff libimagentrygps: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
0cbc6741a7 libimagentrytag: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
32e8c43ccb libimagentrylink: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
7357f1c985 libimagentryannotation: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
a8daeb851d libimagentrycategory: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
49ec0702fd libimagentryfilter: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
a0730c0ca9 Roll back mdcat update
Because 0.8 -> 0.10 has changed the API, we cannot update trivially.
Revert the update because of that.
2018-10-06 12:22:15 +02:00
5d901ae411 Update dependencies
regex: 0.2 -> 1
semver: 0.8 -> 0.9
2018-10-06 12:22:15 +02:00
0069463e46 Update dependencies
mdcat: 0.8 -> 0.10
textwrap: 0.9 -> 0.10
2018-10-06 12:21:20 +02:00
155a6aeca9 Update dependency: regex: 0.2 -> 1 2018-10-06 12:21:20 +02:00
1fa9b86531 Update dependency: lazy_static: 0.2 -> 1 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
newpavlov
04b3e7243d replaced rust-crypto with RustCrypto crates 2018-07-18 19:51:05 +03:00
2e41656d1a Fix comment for rustc 1.26 2018-05-11 14:55:23 +02:00
664edc7943 Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
2e2bce77a0 Add functionality to remove categories 2018-05-04 11:09:20 +02:00
84f426297e Add debug output 2018-05-01 22:29:46 +02:00
2f0a557068 Fix for passing Arc<_> to store interface instead of Box<_> 2018-05-01 21:08:57 +02:00
6ee3f4a3f6 Refactor libimagentrycategory to fit new store iterator interface 2018-05-01 17:44:01 +02:00
6f81d02445 Refactor libimagentryannotation to fit new store iterator interface 2018-05-01 17:44:01 +02:00
fc92cfc36f Move header filters to FailableFilter 2018-04-29 11:43:32 +02:00
30ac77d626 Add error module 2018-04-29 11:43:32 +02:00
e08ec34893 Remove empty module 2018-04-29 11:43:32 +02:00
6d21d8eb49 Update dependency: filters: 0.2 -> 0.3 2018-04-29 10:46:36 +02:00
93c3bb5862 Upgrade variables to 64 bit 2018-04-28 23:27:12 +02:00
5870fa0785 Fix: Use 16 bit variables for GPS degree/minute/second 2018-04-28 23:18:02 +02:00
82867f3ff6 Fix tests for new interface 2018-04-27 13:24:59 +02:00
f0969db47c Rewrite
This patch rewrites the whole libimagcategory and brings it to a nice
standard (the code before was rather messy).

Now, categories are represented by an entry in the store and all entries
which have this category are linked to that entry.
2018-04-26 12:05:28 +02:00
9fc9e7fe17 Outsource iterator in iter module 2018-04-26 12:05:28 +02:00
ab15d89e64 Rewrite CategoryRegister as CategoryStore 2018-04-26 12:05:28 +02:00
5f305ef7a7 Add module for category handling 2018-04-26 12:05:28 +02:00
c26f1aae2a This module should be named "entry" 2018-04-26 11:20:40 +02:00
f321aa82a1 Make sure category is linked when setting it 2018-04-26 11:20:09 +02:00
ea80a5a09b Derive Default for InMemoryFileAbstraction, remove constructor 2018-04-25 19:15:07 +02:00
d12844aff0 Add markdown viewer functionality 2018-04-24 18:06:45 +02:00
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
190da895f9 Do not use Store::retrieve_for_module() anymore here 2018-04-24 13:40:42 +02:00
007c02c2f1 Rewrite all_category_names() for removed Store::retrieve_for_module() 2018-04-24 13:40:42 +02:00
91a72709f8 Add wrapping functionality to StdoutViewer 2018-04-19 21:54:39 +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
98f8366e4c Fix documentation in crate metadata 2018-04-17 15:55:08 +02:00
40b85f13b5 Add lints 2018-04-14 00:41:31 +02:00
76c8443e50
Merge pull request #1395 from matthiasbeyer/clap-text-wrap
Clap text wrap
2018-04-13 22:46:09 +02:00
3819dabff1 Remove attribute
This fixes a crash with the (beta) compiler rustc 1.26.
2018-04-13 16:41:42 +02:00
aeec10bf76 Use clap with wrap_help feature 2018-04-13 16:19:10 +02:00
b59c234588 Use clap "^2.29" instead of ">=2.29" 2018-04-13 16:17:43 +02:00
731b97cccb Fix: Pass the right path variable here
The ref library passed the wrong variable as path which caused the
setting in the entries to be wrong.

This patch fixes this.
2018-04-13 14:06:15 +02:00
e61ccc9561 Fix: Entry::to_str() should return Result<_>
Because serializing might fail.

Also fixes all usages of the API.
2018-03-26 14:24:42 +02:00
7429754665 Rewrite edit_in_tmpfile() for new Runtime::editor() signature 2018-03-23 23:55:11 +01:00
13af364b76 Add header editing support 2018-03-23 17:16:40 +01:00
6f33e4e322 Add debug output 2018-03-23 10:05:58 +01:00
3d7be3a1e0
Merge pull request #1349 from matthiasbeyer/libimagentryref/fixes
Fix: Allocating of buffer does not work as expected with Vec::with_ca…
2018-03-21 18:04:37 +01:00
d2eb4936b1 Fix: Allocating of buffer does not work as expected with Vec::with_capacity() 2018-03-20 16:51:19 +01:00
5ceeacd6c8 Provide Ref::make_ref() for making a ref out of an existing entry 2018-03-19 14:18:02 +01:00
6055520519 Provide unlink() to remove all links 2018-02-25 18:59:02 +01:00
5773e8a6c8 Remove libimagentrylist 2018-02-20 15:02:46 +01:00
027c4b3287 Remove usage of libimagentrylist 2018-02-20 15:02:46 +01:00
c36250e42f Adapt to new libimagentryref API 2018-02-19 12:15:31 +01:00
1153fb180b Add function to delete a reference header entry 2018-02-19 12:14:32 +01:00
fd6a7f877a Remove private macro 2018-02-19 12:14:32 +01:00
a1a85f40d0 Add default generators 2018-02-19 12:14:32 +01:00
2328c8b2b0 Take AsRef<str> rather than &String 2018-02-19 12:14:32 +01:00
cbb47cffcb Implement Ref functions 2018-02-19 12:14:32 +01:00
ed69fd4b35 Enrich error types 2018-02-19 12:14:32 +01:00
81a8826740 Add impl for RefStore::{get,create,retrieve}_ref() 2018-02-19 12:14:32 +01:00
1014f58cfc Rewrite interface 2018-02-19 12:14:32 +01:00
73af121882 Remove old concepts 2018-02-19 12:14:32 +01:00
30d2c28a22 Update version string: 0.6.0 -> 0.7.0 2018-02-11 14:22:24 +01:00
8656a38c50 Update dependency: clap: 2.17 -> 2.29 2018-02-10 16:40:34 +01:00
9d2900a7dc Compile clap with suggestions and color support 2018-02-10 16:40:34 +01:00
3b710e082d Add missing Cargo.toml metadata 2018-02-10 14:11:46 +01:00
d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
de613c9ebd
Merge pull request #1227 from matthiasbeyer/libimagentryutil/filtered-iterators
libimagentryutil: filtered iterators
2018-02-01 20:22:12 +01:00
3aa2e6edec Add iterator helper for filtering 2018-02-01 16:46:57 +01:00
eb6ab8f029 Add IsInCollection helper type 2018-02-01 16:46:57 +01:00
3c1a0a51c9 Transform iterator to forget Store reference here 2018-02-01 16:46:38 +01:00
8e931cd79f Change calls to into_get_iter() to not take argument 2018-02-01 16:46:38 +01:00
7ecaad830c Refactor to use Iterator::fold() 2018-01-29 09:38:32 +01:00
4bd156fdb3 Remove unecessary String instantiation 2018-01-29 09:38:32 +01:00
fcfc397fc8 env_logger: 0.5.0-rc.2 -> 0.5 2018-01-18 14:15:40 +01:00
8d9c7dce4f env_logger: 0.5.0-rc.1 -> 0.5.0-rc.2 2018-01-15 11:22:09 +01:00
635d000344 log: 0.4.0-rc.1 -> 0.4.0 2018-01-15 11:21:52 +01:00
c45130ddd0 env_logger: 0.4.* -> 0.5.0-rc.1 2018-01-15 11:20:27 +01:00
f209e12410 Update dependency: log: 0.3.* -> 0.4.0-rc.1 2018-01-15 11:20:07 +01:00
68fedfb13a libimagentryutil: Replace read with typed read 2018-01-13 01:14:03 +01:00
a34cae03e5 libimagentryref: Replace read with typed read 2018-01-13 01:14:03 +01:00
e9ae81a2ce libimagentrylink: Replace read with typed read 2018-01-13 01:14:03 +01:00
18a6e9b64e libimagentryfilter: Replace read with typed read 2018-01-13 01:14:03 +01:00
6c36c97895 libimagentrydatetime: Replace read with typed read 2018-01-13 01:14:03 +01:00
7176c130ff libimagentrycategory: Replace read with typed read 2018-01-13 01:14:03 +01:00
163bf249ff libimagentryannotation: Replace read with typed read 2018-01-13 01:14:03 +01:00
0c4be78223 Update dependency: toml-query -> 0.6 2018-01-13 01:14:03 +01:00
7fb13acf15 Add Ref::is_ref() 2018-01-08 23:46:36 +01:00
00d09e618e Use libimagentryutil::isa::Is in libimagentryannotation 2018-01-08 23:31:10 +01:00
a7c8fa1212 Add Is::set_isflag() helper function 2018-01-08 23:31:10 +01:00
a246144c26 Add Is helper trait 2018-01-08 23:31:10 +01:00
2d83796ef2 Initial import: libimagentryutil 2018-01-08 23:31:10 +01:00
824f88e4fd Refactoring: Use function chaining rather than matching 2018-01-05 13:32:31 +01:00
66b0611103 Refactoring: Use function chaining rather than matching 2018-01-05 11:37:09 +01:00
dac817f318 Refactor: Use function chaining and new error type link 2018-01-05 11:37:09 +01:00
1e2ac14d3b Refactoring: Use function chaining rather than matching 2018-01-05 11:37:09 +01:00
c92e459e3a Refactoring: Use function chaining rather than matching 2018-01-05 11:37:09 +01:00
5db3d0c278 Refactor: Use function chaining rather than matching
And use a helper function for common functionality
2018-01-05 11:37:09 +01:00
feaa32196b Refactoring: Use function chaining rather than matching
Also introduce error links for this.
2018-01-05 11:37:09 +01:00
3294a77346 Refactoring: Use function chaining rather than matching 2018-01-05 11:37:09 +01:00
02f38fb209 Fix comments: Use two instead of three slashes 2018-01-04 19:34:55 +01:00
e518598351 Remove unneeded "mut" 2018-01-04 19:34:43 +01:00
3c8dd19d11 Update version strings: 0.5.0 -> 0.6.0 2017-12-25 19:17:07 +01:00
0ed636bb06 Refactor libimagrt+libimagstore to pass whole configuration object
Before we extracted the store configuration from the configuration
toml::Value object and passed it to the store.

This is unecessary overhead.

Now we pass the whole configuration object and let the store extract the
required values.
2017-12-24 13:52:18 +01:00
13768322d2 Add flag and check whether to print empty table 2017-12-06 20:31:18 +01:00
b17772041f TableLister: If configured with index, also print index row 2017-12-03 21:20:23 +01:00
d5f537dc4d Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
078936191b Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
81ceb50f4a Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
d60f7d72e6 Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
da391954cc Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
ec3daa1f41 Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
14bacaf01f Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
51a7429283 Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
85ccc482d2 Replace uses of try!() macro with "?" operator 2017-10-31 15:04:50 +01:00
a20871eb5e Add badges in Cargo.toml of all crates 2017-10-31 15:03:30 +01:00
d37de44c94 Add RefStore::find_storeid_by_partial_hash() helper 2017-10-14 14:05:56 +02:00
6c387e893c Add RefStore::get_by_partial_hash() 2017-10-14 13:36:04 +02:00
e74745c9fc Remove RefStore::get() which was simply a wrapper to Store::get() 2017-10-14 13:08:37 +02:00
797b764027 Fix: Return annotation object when found
Before we did not return the annotation object after unlinking it. This
patch fixes this.
2017-10-13 14:53:57 +02:00
a24baca779 Merge pull request #1129 from matthiasbeyer/libimagentryannotation/not-based-on-libimagnotes
Libimagentryannotation/not based on libimagnotes
2017-10-12 23:47:15 +02:00
7978e71bde Rewrite API 2017-10-12 22:15:13 +02:00
ec855fefc7 Remove dependency on libimagnotes 2017-10-12 22:15:13 +02:00
758166637b Update toml-query: 0.3.* -> 0.4
This update is needed for the error-chain update, as the toml-query
0.4.0 release also bumps this dependency.
2017-10-12 22:13:04 +02:00
663242db7e Update dependency: error-chain: 0.10 -> 0.11 2017-10-12 22:12:27 +02:00
013e82f04f Update dependency: filters: 0.1 -> 0.2 2017-10-12 19:48:01 +02:00
67a127f700 Update dependency: itertools: 0.6 -> 0.7 2017-10-12 19:45:50 +02:00