summaryrefslogtreecommitdiffstats
path: root/lib/entry
AgeCommit message (Collapse)Author
2019-02-20Add function to get relative file pathMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20Fix: Strip the prefix of the pathMatthias Beyer
The previous implementation did not strip the prefix of the "relpath" header value, which resulted in the whole path being in the header, which is obviously wrong. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-19Fix: Use "ref.relpath" as path to header valueMatthias Beyer
The header value for the relative path is at "ref.relpath". This fixes the wrong selector. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17Reimplement LinkProcessor::process() for new libimagentryref APIMatthias Beyer
The documentation of the function kind of explains why this change is necessary. It might get changed in the future so that the user has more flexibility. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17Rewrite libimagentrymarkdown importsMatthias Beyer
2019-02-17Rewrite libraryMatthias Beyer
* Remove old code * Rewrite with tests This implements a fassade pattern for ref library With the fassade, we can specify the hasher in a rather easy way, which is not possible with default generics for traits. The "default" part in "default generic type" is not properly implemented yet (as visible in the tests), as I don't know how to realize this. For simplicity, the `hasher` module exports a `default` module with a `DefaultHasher` type, which resolves to the `Sha1Hasher`. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17Add trace outputMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17Fix: If the field is not available, return falseMatthias Beyer
The function is for checking whether a flag is set. If the flag is not available, the flag is obviously not set. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Fix for new StoreId::new() interfaceMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Adapt to new libimagstore::iter::Entries APIMatthias Beyer
Use Entries::into_storeid_iter() for transforming iterator into right type. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Adapt to new libimagstore::iter::Entries APIMatthias Beyer
Use Entries::into_storeid_iter() for transforming iterator into right type. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Adapt to new libimagstore::iter::Entries APIMatthias Beyer
Use Entries::into_storeid_iter() for transforming iterator into right type. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Change signature: Link::exists(&Store)Matthias Beyer
This change is necessary because we need the store now to check whether a StoreId exists. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Fix libimagentrylink for new StoreId APIMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Rewrite: StoreId::new_baseless() -> StoreId::new()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15Rewrite Store::new* API: libimagstore does not export backend typesMatthias Beyer
With this change applied, libimagstore does not export backend representing types anymore. This change is necessar because when we want to switch the `StoreId` implementation from "complex and stateful" to "Stateless and Cow<'_, &str>", we need to be able to have a type which represents a "`StoreId` plus the path of the Store itself". This "the path of the Store itself" is passed around as reference, to minimize runtime impact. Because such a type should not be exported by the libimagstore crate, we make it `pub(crate)` internally. But because the backend APIs also have to use this type, we would export the (private) type in the APIs of the backend. Because of that we make the backend API also non-visible to crate users, which also decreases the surface of the libimagstore API itself. Besides: Remove function `Link::with_base()` which is not needed anymore (was used in tests only). Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Add feature to trim content on the rightMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Add Is::remove_isflag() for removing header flagsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-10Merge branch 'unnamed-annotations' into master-ffMatthias Beyer
This merge adds several patches to improve libimagannotation and imag-annotate.
2019-02-10Remove iterator typesMatthias Beyer
With this patch, libimagentryannotation does not have special iterator types anymore. This makes the whole thing more comfortable to use. In imag-annotate, the parameter for the functioncall was removed. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-10Make annotations unnamed (automatically UUID named)Matthias Beyer
It makes no sense to name annotations, a user only cares about whether there are annotations or not, or their contents. A name has no meaning in this context. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-09Fix: Do not use deprecated StoreId::exists() functionMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03Update copyright yearsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-26Do not use StoreId::local() hereMatthias Beyer
2018-11-11Update lazy_static to 1.2Matthias Beyer
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-11Forbid unsafe code in all cratesMatthias Beyer
2018-11-10Update version stringsMatthias Beyer
...for the next release, which will be imag 0.10.0! Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09Update dependencies from git versions to proper versions.Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06Change libimag{bookmark, entrylink} external linkingMatthias Beyer
...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-01Change test output to use debug!()Matthias Beyer
2018-11-01Change test output to use debug!()Matthias Beyer
2018-11-01Change test output to use debug!()Matthias Beyer
2018-10-31Update dependency: mdcat: 0.8 -> 0.11Matthias Beyer
2018-10-30libimagentrydatetime: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryutil: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentrymarkdown: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryview: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryref: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryedit: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentrygps: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentrytag: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentrylink: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryannotation: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentrycategory: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30libimagentryfilter: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-06Roll back mdcat updateMatthias Beyer
Because 0.8 -> 0.10 has changed the API, we cannot update trivially. Revert the update because of that.
2018-10-06Update dependenciesMatthias Beyer
regex: 0.2 -> 1 semver: 0.8 -> 0.9
2018-10-06Update dependenciesMatthias Beyer
mdcat: 0.8 -> 0.10 textwrap: 0.9 -> 0.10
2018-10-06Update dependency: regex: 0.2 -> 1Matthias Beyer
2018-09-27Update dependency: lazy_static: 0.2 -> 1Matthias Beyer