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


Branches

Tags

This repository contains no tags

Tree

.build.ymlcommits | blame
.builds/
.gitignorecommits | blame
.mailmapcommits | blame
Cargo.tomlcommits | blame
LICENSES/
README.mdcommits | 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).