Commit Graph

68 Commits

Author SHA1 Message Date
Matthias Beyer 725848713b libimagentrylink: Remove EntryHeader type, use toml::Value 2017-02-05 13:10:39 +01:00
Matthias Beyer f1c1a1f9be Eliminate EntryHeader type
Therefor introduce the "Header" trait which is implemented on Value for
backwards compatibility.

Make the default_header() function publicly available as
Entry::default_header()
2017-02-05 13:10:38 +01:00
Matthias Beyer 3e426b87cf Fix docu typo 2016-12-05 17:17:26 +01:00
Matthias Beyer e4e5fafce2 Make fn pub 2016-10-20 14:11:47 +02:00
Matthias Beyer 7806cf34c1 Refactor FilterCompareLinkCountIter into FilterLinksIter 2016-10-20 14:11:47 +02:00
Matthias Beyer 19b60c3776 Refactor Filter{More,Less}ThanIter into FilterCompareLinkCountIter 2016-10-19 14:34:11 +02:00
Matthias Beyer d54666894d Add FilterMoreThanIter 2016-10-19 14:34:11 +02:00
Matthias Beyer c55ad42e59 Rewrite FilterUnlinkedIter to a FilterLessThanIter 2016-10-19 14:34:11 +02:00
Matthias Beyer 1e008f26a2 Add FilterUnlinkedIter 2016-10-19 14:34:11 +02:00
Matthias Beyer 3e7f245278 Rename: RemoveUnlinkedIter -> DeleteUnlinkedIter 2016-10-19 14:34:10 +02:00
Matthias Beyer efce42b394 Remove DeleteIter 2016-10-19 14:34:10 +02:00
Matthias Beyer 0eda8e2d04 Initial add iterators for link library 2016-10-19 14:34:10 +02:00
Matthias Beyer db17b4f858 Rewrite ExternalLinker::get_external_links() to return iterator 2016-10-19 13:03:17 +02:00
Matthias Beyer 3aa05c3ecc Add warning on type names 2016-10-19 13:03:17 +02:00
Matthias Beyer 4ca501c03e Add SelectExternal LinkIter extension trait 2016-10-19 13:03:17 +02:00
Matthias Beyer 647f25a904 Add module documentation 2016-10-19 13:03:17 +02:00
Matthias Beyer 378951a16b Add module external::iter 2016-10-19 13:03:17 +02:00
Matthias Beyer a796de322a Fix bug: Links were swapped 2016-10-15 11:36:25 +02:00
Matthias Beyer b64eae9654 Add multi-link test 2016-10-15 11:35:01 +02:00
Matthias Beyer 6d31913321 Fix bug: We have to compare StoreId objects without their base 2016-10-15 11:24:42 +02:00
Matthias Beyer 9c29bf19da Add debugging output 2016-10-15 11:24:14 +02:00
Matthias Beyer 4e2bcf7d58 Add env-logger for test logging 2016-10-15 11:23:31 +02:00
Matthias Beyer 36b77f4e38 Add test for linking+unlinking 2016-10-15 11:23:30 +02:00
Matthias Beyer d27c8ced34 Add first internal-linking test 2016-10-15 11:23:30 +02:00
Matthias Beyer 02a2034d8b Fix usage of libimagentrylink interface 2016-10-14 13:27:06 +02:00
Matthias Beyer b70564f2ce Change InternalLinker to return iterator objects 2016-10-14 13:27:06 +02:00
Matthias Beyer 2db79ada71 libimagentrylink: Add copyright notice to all files 2016-10-01 17:35:06 +02:00
Matthias Beyer 40014051ec Bugfix: unique()ing the list of links
That should happen _after_ they are all in the same format.
This commit introduces overhead, as we clone() each string here for
comparison and that should clearly be fixed.

Though the bug-fix is more important at this point.
2016-09-06 15:30:26 +02:00
Matthias Beyer 1dfe877cd9 Fix typo in is_external_link_storeid() helper fn 2016-09-05 18:52:42 +02:00
Matthias Beyer c23a11060f Add debug output 2016-09-05 18:51:35 +02:00
Matthias Beyer 2956df81f1 Fix: We save the url at imag.content.url, not imag.content.uri 2016-09-05 18:49:12 +02:00
Matthias Beyer ccffeb91a2 Remove StoreId::is_in_collection(), add StoreId::local()
Having a ::is_in_collection() is a nice thing, though it is _way_ better
if we just give the user of the `StoreId` object access to the local
part of the ID.

Using this new function, one can do all the actions one might need on
the Path for the actual entry without nasty copying or such.

`StoreId::is_in_collection()` can be replaced by
`StoreId::local().starts_with()` and everything is fine, as we do not
have to move a `PathBuf` object into the function anymore.
2016-09-04 10:40:38 +02:00
Matthias Beyer 4da331f990 Use new StoreId::is_in_collection() interface 2016-09-02 17:16:03 +02:00
Matthias Beyer 46bf387fc3 Make internal linking only have store-relative links 2016-08-31 09:20:09 +02:00
Matthias Beyer 3e4b0e4bb8 Rewrite internal link handling, returning Result<_> rather than Option<_> 2016-08-31 09:20:09 +02:00
Matthias Beyer d594b7c6a2 Reimplement libimagentrylink::external::is_external_link_storeid() using StoreId::is_in_collection() 2016-08-31 09:20:08 +02:00
Matthias Beyer 82f08c6021 Remove version argument from module_entry_path_mod!() macro 2016-08-30 11:40:56 +02:00
Matthias Beyer 522d73e6df Fix libimagentrylink::{error, internal}::* for new StoreId interface 2016-08-28 18:41:55 +02:00
Matthias Beyer aeb95b1e11 Fix libimagentrylink::external::* for new StoreId interface 2016-08-28 18:41:55 +02:00
Matthias Beyer 5935d43f09 Replace map(unwrap()) with fold() 2016-08-03 11:30:23 +02:00
Matthias Beyer 41bf063a71 Replace map(unwrap()) with fold() 2016-08-03 11:29:38 +02:00
Matthias Beyer 80491ff0b7 Replace map(unwrap()) with fold() 2016-08-03 11:27:26 +02:00
Matthias Beyer f46e8ac597 Replace unwrap with try!() 2016-08-03 11:27:25 +02:00
Matthias Beyer ca08f6d273 Export MapErrInto trait 2016-08-03 11:27:25 +02:00
Matthias Beyer 6f07359416 Merge pull request #534 from matthiasbeyer/libimagentrylink/tmp-fix-external-link-checking
Temporary fix: Check whether an StoreId is an external link by str::c…
2016-07-15 11:21:44 +02:00
John Sirois a1bf76ed79 Remove unused `Link::retrieve` helper. 2016-07-14 20:07:30 -06:00
Matthias Beyer 3f2ababdb0 Add more robust version of is_external_link_storeid() helper function 2016-07-14 21:27:36 +02:00
Matthias Beyer 1dd40ca8b9 Temporary fix: Check whether an StoreId is an external link by str::contains()
This is a temporary fix as long as we do not have a clear model how we
handle internal/external StoreId types
2016-07-14 21:04:46 +02:00
Matthias Beyer 9337a14cdd Update all version strings: 0.1.0 -> 0.2.0 2016-07-12 11:51:20 +02:00
Matthias Beyer f542fafec2 Remove unneccessary block 2016-06-14 11:35:42 +02:00