timenote

package module
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

timenote

timenote is a tool to take notes with timestamps using Toggl as a backend.

Essentially this is a commandline client to track your time

Configuration

There is one main option:

  1. dsn

For toggl use your toggl token.

You can Use a configuration file in your home directory, .timenote.yaml.

A sample looks like this:

---
dsn: /

State

This is in an early phase but used regularly with the toggl backend and from time to time with MySQL.

Development

Dependencies with go modules

History

Version Description
0.8.1 update Dependencies
0.8.0 Add caching layer
0.7.0 Better formating of time values
Make append separator configurable
Display client for time entry
Display project for time entry
0.6.0 add support for projects (add,delete and list
remove MySQL support
Workspace flag
Grouping for timenote today
reduce code complexity
0.5.0 add support for daily summary
better output for entry duration
0.4.0 add project command
0.3.0 Add cli
Open in browser
0.2.0 Add projects
0.1.0 Initial version
0.2.0 Add support for projects

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.0

type Client struct {
	ID          int
	Name        string
	Description string
}

func (Client) String added in v0.4.0

func (c Client) String() string

type Project added in v0.6.0

type Project struct {
	ID          int
	WorkspaceID int
	ClientID    int
	Name        string
	Billable    bool
	IsPrivate   bool
}

type TimeEntry

type TimeEntry struct {
	// ID is a system id which may be set from a persistor
	ID int
	// Tag is used for grouping
	Tag string
	// Some text attached to entry
	Note string
	// When has the author started working on the note
	Start time.Time
	// End time
	Stop *time.Time
	// time entry duration in seconds. If the time entry is currently running, the duration attribute contains a negative value, denoting the start of the time entry in seconds since epoch (Jan 1 1970). The correct duration can be calculated as current_time + duration, where current_time is the current time in seconds since epoch.
	Duration int64
	// TimeEntry belongs to project
	Project string
	// // TimeEntry belongs to client
	Client string
}

TimeEntry represents a simple note

func (*TimeEntry) String added in v0.4.0

func (te *TimeEntry) String() string

type TogglDuration added in v0.5.0

type TogglDuration struct {
	// contains filtered or unexported fields
}

TogglDuration is used to pretty print a toggl duration

func NewTogglDuration added in v0.5.0

func NewTogglDuration(duration int64) (*TogglDuration, error)

NewTogglDuration creates a new instance

func TogglDurationFromTime added in v0.5.0

func TogglDurationFromTime(t time.Time) (*TogglDuration, error)

TogglDurationFromTime formats a time like the duration

Known caveat: this forgets about days

func (*TogglDuration) GetDuration added in v0.5.0

func (td *TogglDuration) GetDuration() int64

func (*TogglDuration) OmitSeconds added in v0.5.0

func (td *TogglDuration) OmitSeconds()

OmitSeconds tells the converter to not print seconds

func (*TogglDuration) ShowSeconds added in v0.5.0

func (td *TogglDuration) ShowSeconds()

ShowSeconds tells the converter to print seconds

func (*TogglDuration) String added in v0.5.0

func (td *TogglDuration) String() string

String returns a properly readable string for a duration in seconds

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

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