todo

package
v0.0.0-...-53831fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyDate = time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC)

Functions

func ParseDates

func ParseDates(raw string) string

Types

type ByDate

type ByDate []Task

func (ByDate) Len

func (a ByDate) Len() int

func (ByDate) Less

func (a ByDate) Less(i, j int) bool

func (ByDate) Swap

func (a ByDate) Swap(i, j int)

type Task

type Task struct {
	Completed      bool      // If this task is completed
	Priority       string    // Priority for this task if set
	CompletionDate time.Time // Date this task was completed
	CreationDate   time.Time // Date this task was created
	Description    string    // Task description, including all tags and contexts
	// Tags           []string		// All tags in the task description
	// Contexts       []string		// All contexts in the task description
	DueDate time.Time // Key value pair holding the due date for this task
	// Data           map[string]string	// All key value pairs in the task
	Deleted bool   // If the task was deleted (exclude the task from the list)
	Hash    string // Unique identifier for this task
}

func ParseAll

func ParseAll(contents string) []Task

func ParseTask

func ParseTask(raw string) Task

Formatting rules can be found at https://github.com/todotxt/todo.txt

func SortByDate

func SortByDate(raw []Task) []Task

func (Task) String

func (t Task) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL