taskfinder 0.6.0

Find tasks within a particular set of files.
# taskfinder

Keep your project-related tasks where they belong - with your notes on the project! This program 
will then extract and display them.

Install with `cargo install taskfinder` and then run `tf --help` to see all commands available.

See the [changelog](https://codeberg.org/kdwarn/taskfinder/src/branch/main/CHANGELOG.md) for changes with each release.

## Origins/Rationalization

For years, I used a task SaaS app to keep track of what I needed to do. However, I disliked this large amount of data about me and what I do being on someone else's server, and unencrypted to boot. So I started to just use pen and paper, organized by date. However, this doesn't allow for easy capturing of tasks that don't really have to be done on a particular date, or that belong to a single project. So I then started to write down tasks in my digital-file-based note-taking system (you can read more about that [here](https://kdwarn.net/blog/a-zettelkasten-with-vim-and-bash/)), where I also keep project notes. But then I had to start searching for them, and sometimes they were getting lost in the mix. So, `taskfinder` was born. 

## Tasks, files, and configuration

How tasks get identified and extracted from files:
  * the term "TODO" (in caps) must be in the text of the file
  * Excluding whitespace, a line in a file starting with `[ ]` or `[]` identifies an incomplete task
  * Excluding whitespace, a line in a file starting with `[X]` or `[x]` is a completed task
  * Excluding whitespace, a line in a file starting with `[/]` is a partially completed task

By default, files are defined as .md and .txt files in your home directory. However, both the directory and the extensions are configurable. Upon first run, this program will create a configuration file at $HOME/taskfinder/config.toml. Edit the file to change these defaults. Also configurable are:
  * how many days constitutes a file being stale
  * whether to include completed tasks by default
  * the text in a file that indicates a priority level ("priority markers")

## Tags and Priorities

The program looks for these at the level of the file, not the task. 

Tags are actually just whatever string you pass, so you may follow whatever convention you like. I use the form "@sometag": `tf -t @sometag`.

Similar to tags, priorities can be a string you define. By default, they are, from highest to lowest priority: `pri@1`, `pri@2`, `pri@3`, `pri@4`, `pri@5`. To change these, modify the `priority_markers` list in the configuration file. Note, however: **there must be five of them**.

Results will automatically be sorted by these priorities, with the tasks from files without one of these markers shown last.

To view only one group of these priorities, use the `-p` flag: `tf -p 1` to show the highest priority tasks.

## Due dates

There is preliminary support for due dates. If a task (see above on how a task is identified) contains a due date (in the form "due:YYYY-MM-DD"), it will be highlighted. Additionally, if you 
use the `--due` flag, only files/tasks with due dates will be shown.

## Staleness

If a file is considered stale (last modified more than `days_to_stale` days ago, with default of 365 initially set in the config file), no tasks from it will be returned, unless the `--stale` flag is used. A file can also be explicitly marked as stale by including the text "@stale" within it.

## History

The first time during a day that the program is run, it will log the number of complete and incomplete tasks - both overall and by priority. Use the `--history` flag to show this log as
pretty-printed table.