Giter VIP home page Giter VIP logo

time-tracker-cli's Introduction

Tiny Time tracker

Greenkeeper badge NPM

npm version

Dependency Status Support link

Installation

npm install -g time-tracker-cli

or

yarn global add time-tracker-cli

Now you can start to call timercommand

Usage

asciicast

└┘#! timer

  Usage: timer [options] [command]

  Tiny time tracker for projects


  Options:

    -V, --version  output the version number
    --updateDB     Bool to update the db
    -h, --help     output usage information


  Commands:

    start|s <task_key> [description]               Start task with a description.
    pause|p <task_key>                             Pause task
    unpause|up <task_key>                          Unpause task
    finish|f <task_key> [description]              Stop task, you can add a description
    description|d <task_key> <descriptionText...>  Add description to your task.
    add <task_key> <stringTime>                    Adds time to a task. Example: "1h2m3s"
    subtract|sub <task_key> <stringTime>           Subtract time to a task. Example: "1h2m3s"
    report|r [task_string] [rate]                  Report time of the tasks, empty for select all tasks. Can pass a rate (1h).
    log|l <task_key>                               Logs the time of the task
    export|e [options] [task_string]               Export the tasks in json (default) or md format
    delete|del [task_string]                       Remove tasks from the list. Empty for select all tasks
    configure <key> <value>                        Configure the value of the config passing a key
    configuration                                  Output configuration
  • To start a task run:
$ timer start <key of the task> <description>
  • To finish a task run:
$ timer finish <key of the task> <description>
  • You can add a description adding:
$ timer description <key of the task> <description>
  • You can also see the timer running:
$ timer log <key of the task>

How it works

The data are stored inside ~/.config/time-tracker-cli.json The config need to be updated if you have the 1.x to the 2.x to do that, to update config run timer --updateDB If you open you should see:

{
    "tasks": {
        "work1.website.design": {
            "description": "If you added one",
            "timings": [{
                "start": "2016-02-19T10:00:36.393Z",
                "stop": "2016-02-19T18:01:50.921Z"
            }],
            "log": [
                "start#2016-02-19T10:00:36.393Z",
                "stop#2016-02-19T18:01:50.921Z"
            ]
        },
        "work1.website.deployServer": {
            "timings": [{
                "start": "2016-02-19T10:01:59.116Z",
                "stop": "2016-02-19T10:32:10.687Z"
            }],
            "log": [
                "start#2016-02-19T10:01:59.116Z",
                "stop#2016-02-19T10:32:10.687Z"
            ]
        },
        "work2.api.develop.userController": {
            "timings": [{
                "start": "2016-02-19T10:04:23.060Z",
                "stop": "2016-02-19T20:04:36.836Z"
            }],
            "log": [
                "start#2016-02-19T10:04:23.060Z",
                "stop#2016-02-19T20:04:36.836Z"
            ]
        },
        "work2.api.develop.loginController": {
            "timings": [{
                "start": "2016-02-19T10:09:41.848Z",
                "stop": "2016-02-19T13:11:54.059Z"
            }],
            "log": [
                "start#2016-02-19T10:09:41.848Z",
                "stop#2016-02-19T13:11:54.059Z"
            ]
        }
    },
    "config": {
        "format.output": "DD/MM",
        "config.version": 2
    }
}

Method

Start (start|s)

Start a new task.

$ timer start <key of the task> <description>

Pause (pause|p)

Pause a task

$ timer pause <key of the task>
$ timer p <key of the task>

Unpause (unpause|up)

Unpause a task

$ timer unpause <key of the task>
$ timer up <key of the task>

Finish (finish|f)

Stop a task, also can add a description

$ timer finish <key of the task> <description>

Description (description|d)

Add a description to the task

$ timer description <key of the task> <description>
$ timer d <key of the task> <description>

Add (add)

Add time to the task selected

$ timer add <key of the task> <stringTime>
$ timer add <key of the task> 1h2m3s

Subtract (subtract|sub)

Subtract time to the task selected

$ timer subtract <key of the task> <stringTime>
$ timer sub <key of the task> <stringTime>
$ timer subtract <key of the task> 1h2m3s
$ timer sub <key of the task> 1h2m3s

Report (report|r)

This method outputs via cli a table. Some examples:

$ timer report
$ timer r -f md
$ timer r -f markdown
$ timer r -f markdown > report.md
$ timer r -f md > report.md
$ timer r > report.json
$ timer export <key of the task>
$ timer r <key of the task> -f md
$ timer r <key of the task> -f markdown
$ timer r <key of the task> -f markdown > report.md
$ timer r <key of the task> -f md > report.md
$ timer r <key of the task> > report.json

Log (log|l)

Log a task if you want to have the real timer on one console.

$ timer log <key of the task>

Export (export|e)

This method output a json or markdown with all the tasks or all the selected tasks.

Options:

  • -f --format: define the format (default is json). Ex. json|markdown|md
  • -s --start: filter by start date. Ex. 2017/05/28
  • -e --end: filter by start date. Ex. 2017/05/28
  • -x --expanded: If you have mutiple days in a task, expands shows this as a independant entry on the table. Default is false

In 2.5.0 its included an export option that has json and markdown as valid outputs, this are some examples:

$ timer export
$ timer e -f md
$ timer e -f markdown
$ timer e -f markdown > report.md
$ timer e -f md > report.md
$ timer e > report.json
$ timer export <key of the task>
$ timer e <key of the task> -f md
$ timer e <key of the task> -f markdown
$ timer e <key of the task> -f markdown > report.md
$ timer e <key of the task> -f md > report.md
$ timer e <key of the task> > report.json
$ timer e <key of the task> -f md -x -e 2017/08/26
$ timer e <key of the task> -f md -x -s 2017/08/26
$ timer e <key of the task> -f md -e 2017/08/26
$ timer e <key of the task> -f md -s 2017/08/26

Thanks @MarAvFe and @mlndz28 for its contribution.

Delete (delete|del)

delete|del [task_string] Remove tasks from the list. Empty for select all tasks

Configure (configure)

configure Configure the value of the config passing a key

Configure (configure)

configuration

Notes

To use the autocomplete run timer --setupCLI If you have the version 1.x and you want to conserve the DB, run timer --updateDB to update the DB to version 2.x

Development

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

Contributors

License

Licensed under the MIT license. 2015

time-tracker-cli's People

Contributors

danibram avatar greenkeeper[bot] avatar kohei-takata avatar maravfe avatar mlndz28 avatar ryanzim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

time-tracker-cli's Issues

An in-range update of babel-cli is breaking the build 🚨

Version 6.26.0 of babel-cli just got published.

Branch Build failing 🚨
Dependency babel-cli
Current Version 6.24.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As babel-cli is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Dependencies 1 failing dependency. Details
  • bitHound - Code 14 failing files. Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of inquirer is breaking the build 🚨

Version 3.1.0 of inquirer just got published.

Branch Build failing 🚨
Dependency inquirer
Current Version 3.0.6
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

inquirer is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Dependencies 1 failing dependency. Details
  • bitHound - Code 14 failing files. Details

Release Notes v3.1.0
  • password prompt can now rendered hidden input (Unix style)
  • filter function now also receive the current answers as argument
  • Smaller package size
Commits

The new version differs by 17 commits.

  • e612cc5 3.1.0
  • 148cb71 Update eslint-config-xo-space to the latest version 🚀 (#516)
  • 3b93dd5 call chalk.reset() after message prompt (#544)
  • 3ff39a6 chore(package): update chai to version 4.0.1 (#541)
  • 76f1bfe upgrade external-editor to 2.0.4 (#535)
  • da4eceb pass current answers hash to filter (#533)
  • f99b398 Use rx-lite-aggregates instead of full rx (#532)
  • 20119a2 fix(package): update ansi-escapes to version 2.0.0 (#527)
  • e294e16 Update validate fn param docs (#526)
  • 5b3a4a2 Add masked password example
  • 9de81a8 Fix linting of tests
  • d7db156 Add some tests
  • 50a9beb Switch conditionals
  • 379e0aa Inform user that input is hidden
  • bf28e76 Password prompt should display no characters

There are 17 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of configstore is breaking the build 🚨

Version 3.1.1 of configstore just got published.

Branch Build failing 🚨
Dependency configstore
Current Version 3.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

configstore is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Dependencies 1 failing dependency. Details
  • bitHound - Code 14 failing files. Details

Commits

The new version differs by 3 commits.

  • 35d46bb 3.1.1
  • 7bd5030 Pass options object to makeDir.sync (#55)
  • 0108c44 Update renamed electron-configelectron-store

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of commander is breaking the build 🚨

Version 2.10.0 of commander just got published.

Branch Build failing 🚨
Dependency commander
Current Version 2.9.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

commander is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Dependencies 1 failing dependency. Details
  • bitHound - Code 14 failing files. Details

Release Notes Release V2.10.0
  • Update .travis.yml. drop support for older node.js versions.
  • Fix require arguments in README.md
  • On SemVer you do not start from 0.0.1
  • Add missing semi colon in readme
  • Add save param to npm install
  • node v6 travis test
  • Update Readme_zh-CN.md
  • Allow literal '--' to be passed-through as an argument
  • Test subcommand alias help
  • link build badge to master branch
  • Support the alias of Git style sub-command
  • added keyword commander for better search result on npm
  • Fix Sub-Subcommands
  • test node.js stable
  • Fixes TypeError when a command has an option called --description
  • Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets.
  • Add chinese Readme file
Commits

The new version differs by 50 commits.

  • 8870675 version bump 2.10.0
  • 98e66bc #330 make .option defaultValue and fn and .version flag optional
  • d674384 Merge pull request #639 from abetomo/update_version_to_be_tested
  • 45ce032 Remove io.js
  • b888282 Add version 5
  • 5ac0439 Do not test older versions
  • 579f670 Do not test older versions
  • 4c7c1cf Add new version
  • 8049258 Do not test older versions
  • 9bfc4eb Merge pull request #610 from xcatliu/patch-1
  • 648629f Merge pull request #619 from Nepomuceno/patch-1
  • 20493bb On SemVer you do not start from 0.0.1
  • 8a4f1ad Fix require arguments in README.md
  • 3367806 Merge pull request #585 from simeg/simeg-patch-1
  • ff501a1 Merge pull request #593 from junajan/patch-1

There are 50 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

postinstall: `timer --updateDB`

Ubuntu npm install results in

sh: 1: timer: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `timer --updateDB`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

An in-range update of configstore is breaking the build 🚨

Version 3.1.0 of configstore just got published.

Branch Build failing 🚨
Dependency configstore
Current Version 3.0.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

configstore is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Dependencies 1 failing dependency. Details,- ❌ bitHound - Code 14 failing files. Details

Commits

The new version differs by 3 commits0.

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of omelette is breaking the build 🚨

Version 0.4.2 of omelette just got published.

Branch Build failing 🚨
Dependency omelette
Current Version 0.4.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

omelette is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Code 14 failing files. Details,- ❌ bitHound - Dependencies 1 failing dependency. Details

Commits

The new version differs by 32 commits0.

There are 32 commits in total.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of update-notifier is breaking the build 🚨

Version 2.2.0 of update-notifier just got published.

Branch Build failing 🚨
Dependency update-notifier
Current Version 2.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

update-notifier is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Code 14 failing files. Details
  • bitHound - Dependencies 1 failing dependency. Details

Release Notes v2.2.0

updater-notifier now skip configuration initialization when instructed to skip checks. This can prevent permission issues in some environment where you'd prefer to just skip any update checks.

Commits

The new version differs by 4 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of babel-polyfill is breaking the build 🚨

Version 6.26.0 of babel-polyfill just got published.

Branch Build failing 🚨
Dependency babel-polyfill
Current Version 6.23.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

babel-polyfill is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this 💪

Status Details
  • bitHound - Code 14 failing files. Details
  • bitHound - Dependencies 1 failing dependency. Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.