clocked

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: MIT Imports: 3 Imported by: 0

README

Clocked: A simple time-tracker

Welcome to clocked, a small, simple task-based time tracker. The motivation for creating this was that I wanted to have something I could use to track my working time offline and at the end of the day easily sync up to JIRA. I've tried taskwarrior and OrgMode in the past but none of them offered me the UX and flexibility I wanted. So here we are ;-)

How to get started

Getting started with clocked is quite simple. Just install it and start adding tasks to it. Every screen will show you a list of all the available keyboard commands. If you don't want to sync your tasks with JIRA, then there is even nothing for you to configure :-)

Synchronizing your work-time with JIRA worklogs

If you do want to sync with JIRA, you will have to create a $HOME/.clocked/config.yml file and put your JIRA's URL and username into it:

jiraURL: https://jira.company.com
jiraUsername: jdoe

When you start clocked for the next time then it will ask you for your JIRA password and store it into a macOS keychain.

Once that is all done, make sure to create tasks that have the same code as the tasks you have in JIRA. Then hit ^s to enter the summary view to see all the tasks you've worked on today. From there hit ^j to enter the sync-view and s to actually start the synchronization.

This will delete all your worklogs of the selected date and create new ones for your tasks as tracked by clocked.

If you don't want specific tasks not to be synchornized you can assign them the tag "offline". These tasks will be shown on the sync-view as offline tasks.

Backups using restic

If you have restic installed, clocked will create a snapshot after every change to a task. If you create a new task, a snapshot will be made. If you clock in or out, a new snapshot will be made. By default the backup repository is stored in $HOME/.clocked_backups and its password is saved in $HOME/.clocked/backups.passwd

If you want to keep your backups somewhere else (e.g. inside a Dropbox folder) you have to do two things:

  1. Move ~/.clocked_backups to its target location.

  2. Inside ~/.clocked/config.yml add the following line:

    backups_path: /Users/yourname/Dropbox/clocked_backups
    

    Replace /Users/yourname/Dropbox/clocked_backups with whatever path you moved the backups to in step 1 🙂

Command-line arguments

  • --log-file <path/to/file> specifies a path to a logfile clocked should write to.
  • --store <path/to/folder> specifies where clocked should store its files. Default: $HOME/.clocked

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Booking

type Booking struct {
	Start string `yaml:"start"`
	Stop  string `yaml:"stop"`
}

func (*Booking) SetStart

func (b *Booking) SetStart(t time.Time)

func (*Booking) SetStop

func (b *Booking) SetStop(t time.Time)

func (*Booking) StartTime

func (b *Booking) StartTime() *time.Time

func (*Booking) StopTime

func (b *Booking) StopTime() *time.Time

type ByCode added in v1.1.0

type ByCode []Task

func (ByCode) Len added in v1.1.0

func (l ByCode) Len() int

func (ByCode) Less added in v1.1.0

func (l ByCode) Less(i int, j int) bool

func (ByCode) Swap added in v1.1.0

func (l ByCode) Swap(i int, j int)

type Task

type Task struct {
	Code     string    `yaml:"code"`
	Title    string    `yaml:"title"`
	Tags     []string  `yaml:"tags"`
	Bookings []Booking `yaml:"bookings"`
}

func (*Task) HasTag

func (t *Task) HasTag(tag string) bool

func (Task) Label

func (t Task) Label() string

func (*Task) Start

func (t *Task) Start(tm time.Time) error

func (*Task) Stop

func (t *Task) Stop(tm time.Time) error

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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