Coder Social home page Coder Social logo

jamischarles / time-tracker-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danibram/time-tracker-cli

0.0 1.0 0.0 63 KB

Super tiny and ligthway time tracker for all cli lovers

Home Page: http://danibram.github.io/project/time-tracker-cli/

JavaScript 100.00%

time-tracker-cli's Introduction

Differences in fork:

  • More conveniences in commands (shorter, less verbose commands)
  • Assumes only 1 timer is running at a time.
  • Output shows min tally

Tiny Time tracker

NPM

npm version

Dependency StatusDevDependency Status

Support link

Usage

asciicast

±❩❩❩ timer --help

    Usage: timer [options]

    Tiny time tracker for projects

    Options:

      -h, --help                         output usage information
      -V, --version                      output the version number
      -s, --start <task> <description>   Start the timer task.
      -f, --finish <task> <description>  Stops the timer task.
      -d, --description <description>    Adds a description for the task only in start/stop methods.
      -a, --add <task> <timeString>      Adds time to a task. Example: "1h2m3s"
      --remove <task> <timeString>       Subtract time from a task. Example: "1h2m3s"
      -l, --log <task>                   Logs the timer task.
      -r, --report <task> <rate>         Report time of the tasks, searched by key, you can report all using all as key. Also you can pass a rate to calc an amount ex: 20h, calc the hours and multiply by 20
      -e, --export                       Prints the json of all tasks.
  • To start a task run:
$ timer -s <key of the task> -d  <description>
  • To finish a task run:
$ timer -s <key of the task> -d  <description>
  • You can add a description adding:
$ timer -s <key of the task> -d  <description>
$ timer -h <key of the task> -d  <description>
  • You can also see the timer running:
$ timer -l <key of the task>

How it works

The data are stored inside ~/.config/time-tracker-cli.json If you open you should see:

{
	"tasks": {
		"work1.website.design": {
			"start": "2016-02-19T10:00:36.393Z",
			"stop": "2016-02-19T18:01:50.921Z"
		},
		"work1.website.deployServer": {
			"start": "2016-02-19T10:01:59.116Z",
			"stop": "2016-02-19T10:32:10.687Z"
		},
		"work1.api.develop.userController": {
			"start": "2016-02-19T10:04:23.060Z",
			"stop": "2016-02-19T20:04:36.836Z"
		},
		"work1.api.develop.loginController": {
			"start": "2016-02-19T10:09:41.848Z",
			"stop": "2016-02-19T13:11:54.059Z"
		}
	}
}

The -r method, simply finds by regex and count the time.

Development

Run npm install;npm run dev to watch the proyect, and compile the code automatically. Run npm build to build the module.

License

Licensed under the MIT license. 2015

time-tracker-cli's People

Contributors

danibram avatar jamischarles avatar kohei-takata avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.