Crate task_hookrs

Source
Expand description

This crate exports functionality to import and export taskwarrior-compatible JSON by translating the JSON into rust types and vice-versa.

For example:

  use std::io::stdin;

  use task_hookrs::task::{Task, TW26};
  use task_hookrs::import::import;

  if let Ok(tasks) = import::<TW26, _>(stdin()) {
      for task in tasks {
          println!("Task: {}, entered {:?} is {} -> {}",
                    task.uuid(),
                    task.entry(),
                    task.status(),
                    task.description());
      }
  }

Modulesยง

annotation
Module containing types and functions for annotations of tasks
date
Module for wrapping chrono::naive::datetime::NaiveDateTime
error
Definitions for error handling with failure
import
Module containing the import() function
priority
Module containing TaskPriority type
project
Module containing Project type
status
Module containing TaskStatus type and trait impls
tag
Module containing Tag type
task
Module containing Task type as well as trait implementations
tw
This module offers functions to interact with taskwarrior. This will expect the task binary in your path. This will always call task and never interact with your .task directory itself. (This is in accordance with the taskwarrior api guide lines.)
uda
Module containing the types for User Defined Attributes (UDA)
urgency
Module containing Urgency type