nonota

package module
v0.0.0-...-fef94c4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 4 Imported by: 0

README

nonota

Nonota is my No Nonsense Tasking command line tool for task and time tracking.

This is a personal tool, that I wrote mostly for personal usage.

Here's an asciinema video on how it works:

asciicast

Use at your own risk.

Building and Running

Use go 1.11+ and build outside $GOPATH (or with GO111MODULES=on).

Install it with:

$ go get https://github.com/matheusd/nonota/cmd/nonota

Then just execute nonota. It will open or create a file named nonota-board.yml on the current dir to store the data. You can manipulate this file with a text editor if you need to do something nonota doesn't support (like deleting tasks).

Exporting tasks

You can export the list of tasks for the previous month by running nonota-csv. By default, it will export the tasks for the previous billable month.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoardToFile

func BoardToFile(filename string, b *Board) error

func EndOfBilling

func EndOfBilling(t time.Time) time.Time

func EndOfDay

func EndOfDay(t time.Time) time.Time

func EndOfWeek

func EndOfWeek(t time.Time) time.Time

func StartOfBilling

func StartOfBilling(t time.Time) time.Time

StartOfBilling returns the time of the start of billing for a given time.

func StartOfDay

func StartOfDay(t time.Time) time.Time

func StartOfWeek

func StartOfWeek(t time.Time) time.Time

Types

type Board

type Board struct {
	Lists []*List
}

func BoardFromFile

func BoardFromFile(filename string) (*Board, error)

func (*Board) AppendNewList

func (b *Board) AppendNewList()

func (*Board) AppendNewTask

func (b *Board) AppendNewTask(list *List)

func (*Board) MoveDown

func (b *Board) MoveDown(list *List)

func (*Board) MoveTaskDown

func (b *Board) MoveTaskDown(task *Task)

func (*Board) MoveTaskUp

func (b *Board) MoveTaskUp(task *Task)

func (*Board) MoveUp

func (b *Board) MoveUp(list *List)

func (*Board) TotalTime

func (b *Board) TotalTime(fromTime, toTime time.Time) time.Duration

type List

type List struct {
	Title string
	Tasks []*Task
}

func (*List) TotalTime

func (l *List) TotalTime(fromTime, toTime time.Time) time.Duration

type Task

type Task struct {
	Title       string
	Description string
	Times       []*TaskTime
}

func (*Task) AddTaskTime

func (t *Task) AddTaskTime(tt *TaskTime)

func (*Task) TotalTime

func (t *Task) TotalTime(fromTime, toTime time.Time) time.Duration

type TaskTime

type TaskTime struct {
	Start time.Time
	End   time.Time
	Note  string

	// Duration is *not* end-start; rather, it's how much work was recorded
	// within that timeframe.
	Duration time.Duration
}

type User

type User struct {
	CurrentWorks []*Work
}

func (*User) ExcludeWork

func (u *User) ExcludeWork(work *Work)

func (*User) StopWork

func (u *User) StopWork(work *Work) error

func (*User) ToggleWorkOnTask

func (u *User) ToggleWorkOnTask(task *Task) *Work

ToggleWorkOnTask either resumes (or starts) working on the given task or pauses it (if already working).

func (*User) WorkForTask

func (u *User) WorkForTask(task *Task) *Work

type Work

type Work struct {
	Task *Task
	// contains filtered or unexported fields
}

func NewWork

func NewWork(task *Task) *Work

func StartWork

func StartWork(task *Task) *Work

func (*Work) AdjustWorkDuration

func (w *Work) AdjustWorkDuration(newDuration time.Duration)

func (*Work) CurrentDuration

func (w *Work) CurrentDuration() time.Duration

func (*Work) PauseWork

func (w *Work) PauseWork()

func (*Work) ResumeWork

func (w *Work) ResumeWork()

func (*Work) SetNote

func (w *Work) SetNote(note string)

func (*Work) StopWork

func (w *Work) StopWork() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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