- Description:
- A parser for the todo.txt file format
- Owner:
- Thomas Böhler
- Last Change:
- Clone URL:
ssh://anonymous@got.wtchr.de:61459/todotxt_parser.git
Commit Briefs
Add build manifest (master)
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Add CI manifests for Arch Linux and OpenBSD
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Add .mailmap
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Quote extension due date format properly
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Use HTML comments for README.md license header
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
Change copyright owner
Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
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>
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
Branches
Tree
| .build.yml | commits | blame |
| .builds/ | |
| .gitignore | commits | blame |
| .mailmap | commits | blame |
| Cargo.toml | commits | blame |
| LICENSES/ | |
| README.md | commits | blame |
| assets/ | |
| contrib/ | |
| examples/ | |
| src/ | |
| tests/ | |
README.md
<!--
SPDX-FileCopyrightText: 2023 Thomas Böhler <witcher@wiredspace.de
SPDX-License-Identifier: CC0-1.0
-->
# todotxt_parser
A (WIP) parsing and manipulation library for the todo.txt format. It supports some tag
extensions.
This library is currently a work in progress. Version numbers are not updated
and breaking changes will be made quite often. Use with caution.
Parsing is done with [nom](https://lib.rs/crates/nom), enabling zero-copy
parsing from the input wherever no new types are created (e.g. dates are parsed
into
[`NaiveDate`](https://docs.rs/chrono/0.4.23/chrono/naive/struct.NaiveDate.html)
structs). Should a task be created or modified, a new copy will be created.
## Features
The following features are currently supported:
- Creating, reading and modifying tasks
- Recognised tag extensions (see below)
The following features are planned, in no particular order:
- [`Read`](https://doc.rust-lang.org/stable/std/io/trait.Read.html) support
[(#3)](https://todo.sr.ht/~witcher/todotxt/3)
- Archived priority support [(#1)](https://todo.sr.ht/~witcher/todotxt/1)
- Filtering tasks [(#6)](https://todo.sr.ht/~witcher/todotxt/6)
## Tag Extensions
The following tag extensions are supported. The format for each tag is given as
a regular expression:
- `due:\d{4}-\d{2}-\d{2}`: Specify a due date in `YYYY-MM-DD` format
- `rec:\+?\d+[dwmy]`: Allow recurring tasks. `+` marks strict, `d`, `w`, `m`, and
`y` resemble day, week, month, and year.
The following tag extensions are planned:
- `t`: Threshold in the same format as `due` that only shows tasks that passed
the specified date (achieved with filters)
- `tmr`, `spent`: Keeping track of time spent on a task
## Resources
Send patches to
[~witcher/todotxt-devel@lists.sr.ht](https://lists.sr.ht/~witcher/todotxt-devel).
Instructions for preparing a patch are available at
[git-send-email.io](https://git-send-email.io/).
Discussion happens at
[~witcher/todotxt-discuss](https://lists.sr.ht/~witcher/todotxt-discuss).
Announcements are posted on
[~witcher/todotxt-announce](https://lists.sr.ht/~witcher/todotxt-announce).
Bugs and todo can be found at
[~witcher/todotxt](https://todo.sr.ht/~witcher/todotxt).
