todo

package
v0.0.0-...-cf25c86 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(path string, name string, date string) error

AddTask adds the tasks to the file

func BackupTasks

func BackupTasks(path string, doneOnly bool) error

BackupTasks reads from the original task file and append the content to the backup file If doneOnly flag is provided, only the finished tasks will be back up

func ChangeTaskStatus

func ChangeTaskStatus(path string, ids []int, status string) error

ChangeTaskStatus changes the task status with done[x]/undone[ ]

func ConvertID

func ConvertID(args []string) (int, error)

ConvertID converts the input id to int Handle multiple values with format 2-4, 2,3,4

func ConvertIDs

func ConvertIDs(args []string) ([]int, error)

ConvertID converts the input id to []int. Similar to ConvertID Handle multiple values with format 2-4, 2,3,4

func Dev

func Dev() error

Dev for development purposes

func EditTask

func EditTask(path string, id int, name string, date string) error

EditTask edits the corresponsing task to a new one

func ListTasks

func ListTasks(path string, tag string, undoneOnly bool) error

ListTasks lists all the tasks

func ParseInputDate

func ParseInputDate(in string) (string, error)

ParseInputDate parse the task date into right format Support now package and mmdd, dd/mmformat

func PrettyPrint

func PrettyPrint(i interface{}) string

PrettyPrint to print struct in a readable way

func RemoveTask

func RemoveTask(path string, ids []int) error

RemoveTask removes a task by ids

func SummarizeTask

func SummarizeTask(path string, tag string, bygroup bool) error

SummarizeTask summarizes the man-day used for different tasks Tag is used as a search terms to filter the result TODO: bygroup is used to print the result by project group first. Now use [xxx] format.

func WipeTasks

func WipeTasks(path string, doneOnly bool) error

WipeTasks removes all the tasks If doneOnly flag is provided, only the finished tasks will be wiped

func WriteTasks

func WriteTasks(path string, tasks []Task, overwrite bool) error

WriteTasks writes or append the struct to the file

Types

type Task

type Task struct {
	Date string
	Name string
	Done string // x as Done, empty as not done
}

Task is the task specified in the todo file

func ReadTasks

func ReadTasks(path string) ([]Task, error)

ReadTasks reads all the tasks from the todofile

Jump to

Keyboard shortcuts

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