Commit Briefs

dce3ee7356 Thomas Böhler

Add build manifest (master)

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


3a1962417f Thomas Böhler

Add CI manifests for Arch Linux and OpenBSD

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


b7118f1e9b Thomas Böhler

Add .mailmap

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


1c780a5edc Thomas Böhler

Quote extension due date format properly

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


1f4ddc96eb Thomas Böhler

Use HTML comments for README.md license header

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


062b8f7a7f Thomas Böhler

Change copyright owner

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


e0043a0e59 Thomas Böhler

Use `()` instead of `_` for closure

If the function argument to a closure is of type `()` clippy wants this to be captured with a `()`, even if the argument isn't used. Signed-off-by: Thomas Böhler <witcher@wiredspace.de>


bc6fb9a917 witcher

Implement respecting the strict rule of `rec`

The `next_due` and `next_due_with_rec` methods now respect the strict attribute of the recurring rule. To still be able to test the method, a third method, `next_due_with_rec_and_date` has been created which, instead of internally computing the current date, explicitly takes the supposedly current date. The `next_due_with_rec_and_date` method is public for now but might be made private, depending on how useful it might be. Implements: https://todo.sr.ht/~witcher/todotxt/4


c25ff820f4 witcher

Clarify WIP library


c8d456ebaa witcher

Expand on README.md a little


d74e882f5b witcher

Fix `rec` regex not escaping literal `+`


157d7b0f7b witcher

Add methods relating to recurring tasks

Basic recurring task functionality has been implemented in this patch, but the strict recurring rule is still missing and needs to be implemented. This is quite hard to do while keeping the methods testable as the strict rule relies on the current date, which currently is not being taken via a parameter. References: https://todo.sr.ht/~witcher/todotxt/4


2b4c6992a6 witcher

Be pedantic about references in doc comments


4846caa86f witcher

Add getter/setter to `Task`

The attributes of the `Task` struct will remain private and access is granted through getter and setter. Additionally, methods for adding tags have been added.


82d62f1006 witcher

Derive `Copy` on `Completion`


249da5d44e witcher

Implement `Display` for some types


01ba7a35eb witcher

Remove field `tags` from struct `Task` altogether

As the `tags` field is essentially just a view into the `description` field and keeping both fields synchronised can be a burden, the `tags` field has been removed and tags will now be computed on the fly, if necessary. Additionally, `description` has been changed to a `Cow` since it can change and thus needs to be able to be an owned type. It nothing is changed, however, the description will still only be a slice of the original one, avoiding multiple copies being stored in memory. If the description of the task needs to be changed, `description` will become an owned field.


e79ffd7b92 witcher

Restrict field access on `Task`

The `Task` struct has 2 fields that rely on each other: `description` and `tags`. Changing one will most likely mean a change in the other, and changing `tags` by itself probably makes no sense. Both fields have been made private, forcing instantiation with `Task::new` and forcing changes to go through the `set_description` method, both computing the `tags` from the description.


a607851631 witcher

Make fields of types public, strict completion

All fields in all structs in `types.rs` have been made public. The `completed` field in `Tag` has been replaced with a `completion` field with type `Completion`. This encodes in the type system that a task can only ever has a date of completion if it is actually complete.


c6bbc32edc witcher

Add example for listing todo tasks from file


bb8c745424 witcher

Mark `Tag` as `non_exhaustive`

Since it is planned to add more tags later on, `Tag` is now marked as `non_exhaustive`.


56a34cab2c witcher

Add integration test for `types.rs`


bda18df0aa witcher

Add TryFrom implementation for Task and unit tests

`Task` can now be created from `&str` via `TryFrom`. The `new_key_value` method on `Tag` now has unit tests.


caf5a2e434 witcher

Verify recurring amount is at least 1


921165feb6 witcher

Add more clippy lints and fix them