Punchcard

Minimal time tracking tool for cli

Build Status

Requirements

  • ruby 2.1+

Install

  $ gem install punched

Usage

Start Project

  $ punched start "Punchcard (programming)"

Wildcard

Save keystrokes by using wildcard. The first last active project, which matches the pattern (case insensitive) will be selected:

  $ punched start "Punch*"

Stop Project

  $ punched stop "Punch*"

Toggle

Toggle between start and stop:

  $ punched toggle "Punch*"

Status

  $ punched status "Punch*"

    Punchcard (programming)
    01:10:09

List details

  $ punched details "Punch*"

    Punchcard (programming) (stopped)

    00:00:08    2017-05-07 08:16:06 - 2017-05-07 08:16:14
    00:04:35    2017-05-07 08:22:02 - 2017-05-07 08:26:37
    ...
    ========
    01:10:04    (total)

Set Hourly Rate

  $ punched set "Punch*" hourlyRate 250€

Total time in seconds

  $ punched total "Punch*"

Rename and delete Project

  $ punched rename "Old Title" "New Title"
  $ punched remove "Punchcard (programming)"

Help

List all available actions:

  $ punched help
    Usage: punched all|csv|details|remove|rename|set|start|status|stop|toggle|total 'Name of my project'

List all projects with total time

  $ punched all

    |========================================|=========|=====================|================|=============|==========|
    | project                                | status  |   last active on    | total duration | hourly rate | earnings |
    |========================================|=========|=====================|================|=============|==========|
    | Website                                | stopped | 2017-05-07 15:50:00 |    00:04:40    | 95.0 €      | 380.00 € |
    |----------------------------------------|---------|---------------------|----------------|-------------|----------|
    | Punchcard (programming)                | stopped | 2017-07-11 12:47:42 |    01:10:04    |             |          |
    |========================================|=========|=====================|================|=============|==========|

To use md or csv as output format:

  $ punched all csv

    "project","status","last active on","total duration","hourly rate","earnings"
    "Website","stopped","2017-05-07 15:50:00","04:06:00","95.0 €","380.00 €"
    "Punchcard (programming)","stopped","2017-07-11 12:47:42","01:10:04","",""

You can use all with any other action as well, e.g. punched all stop to stop all running projects.

Store projects files in a custom folder and sync them between computers

By default, PunchCard will store the data in ~/.punchcard/. Define your custom destination with:

  export PUNCHCARD_DIR=~/Nextcloud/punchcard

Tests

  $ bundle exec rspec