#task-list #parser #priority #status #date #fields #description

bin+lib task_list_parser

A Rust-based parser for task lists with priority, status, date, and description fields

6 releases

0.1.5 Nov 16, 2024
0.1.4 Nov 15, 2024

#1285 in Parser implementations

Download history 252/week @ 2024-11-08 192/week @ 2024-11-15 6/week @ 2024-11-22 6/week @ 2024-11-29 1/week @ 2024-12-06

302 downloads per month

MIT license

9KB
93 lines

Task List Parser in Rust

Overview

This project is a task list parser written in Rust using the pest parsing library. It can read and interpret structured task lists, with fields like priority, completion status, start date, optional tags, time estimate, and description.

Grammar Rules

  • Priority: Indicates importance using !, !!, or !!!.
  • Status: [ ] for incomplete, [x] for completed.
  • Date: {YYYY-MM-DD} format.
  • Tags: Hashtags for categorization (e.g., #urgent).
  • Time Estimate: Time estimate in hours (h) or minutes (m).

Example Input

  • !! [ ] {2024-11-05} #shopping 1h Buy groceries
  • !!! [x] {2024-12-01} #work 2h Finish Rust project
  • ! [ ] {2025-01-15} #learning 5h Prepare presentation

Running the Parser

cargo run -- --file tasks.txt

Dependencies

~4MB
~74K SLoC