JSPM

  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q68689F
  • License MIT

Helps you to fill in your hours with taxi

Package Exports

  • cabdriver

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cabdriver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status Coverage Status

cabdriver

cabdriver is a small helper application that helps you to fill in your hours in taxi. It currently support various sources to get entries in a taxi-friendly format:

Installation

Make sure you have Node.js >= 4.0.0 installed.

To check the node version number, use the following command:

node --version

Install cabdriver globally:

npm install -g cabdriver

Usage

$ cabdriver -n 10 -d yesterday

02/02/2016 # Tuesday
xxx    09:00-10:00   Go-Live Planning
xxx    09:30-09:45   Jazz Daily Stand-Up
xxx    10:05-10:30   Weiteres Vorgehen Staging
xxx    13:30-14:00   IPA-Besprechung
xxx    16:00-19:00   Byebye Apero Lukas

03/02/2016 # Wednesday
xxx    09:30-09:45   Jazz Daily Stand-Up
xxx    10:00-10:30   Support Backlog
xxx    10:45-11:45   Sprint 3 Planning 2
$ cabdriver --hours -d 03.02.2016

03/02/2016 # Wednesday
xxx    0.25 Jazz Daily Stand-Up
xxx    0.5  Support Backlog
xxx    1    Sprint 3 Planning 2

Entries from 01.03.2016 until 05.03.2016, max. 100 results

$ cabdriver -d 01.03.2016-05.03.2016 -n 100

Google Calendar

$ cabdriver --calendar

This uses the primary calendar associated with the Google account.

But you can specify another one, if you want (check the "Calendar ID" on the settings page):

$ cabdriver --calendar private@example.com

Google Mail

$ cabdriver --mail

Slack

Text entries:

$ cabdriver --slack

Graphic (pie chart):

$ cabdriver --slack --pie

cabdriver with slack pie chart

Jira

Note: the Liip-specific Jira instance is pre-defined as host.

$ cabdriver --jira

Unfortunately the JIRA API does not provide the activitiy stream of a user, so that the issue search is used to find recently updated issues, that are related to the logged in user. In those issues the changelog and worklog are evaluated to generate taxi entries.

Git

Find my commits in all git repositories in /home/odi/projects:

$ cabdriver -g /home/odi/projects

If you omit the path all git repositories in the current working directory (recursively) are used. Depending on the size of your file system, this might take some time. You can use --verbose to get an indicator of the progress.

$ cabdriver -g --verbose

Zebra

Find zebra entries that you've already committed:

$ cabdriver -z -d last-week

Pie chart:

$ cabdriver -z -p

This might be helpful to get a double check of the entries that are already in Zebra and to see if something is missing or to update your local taxi file with entries that you made on the web interface of Zebra. Because all those entries were already commited to zebra, they are commted out by default.

Github

Generate entries based on GitHub activity this week:

$ cabdriver --github -d this-week

Gitlab

Generate entries based on GitLab activity:

$ cabdriver --gitlab

Logbot

Find entries from Logbot:

$ cabdriver -l

Options

For a complete help run cabdriver --help.

  • -n --number number of entries to return (default: 250)
  • -d --date supports date strings or ranges (default: today):
    • 31.12.2016
    • 01.12.2016-31.12.2016
    • yesterday
    • last-week
    • past-week (7 days)
    • last-month (month before the current)
    • past-month (30 days)
    • last-year (year before the current)
    • past-year (365 days)
    • today (up to current time)
    • this-week (up to current time)
    • this-month (up to current time)
    • this-year (up to current time)
  • -c --calendar choose the calendar for the entries (default: primary)
  • -m --mail generate entries from mails
  • -s --slack generate entries from slack
  • -l --logbot generate entries from logbot
  • -j --jira generate entries from jira
  • -z --zebra generate entries from zebra
  • -g --git <path> generate entries from your local git repositories (defaults to current directory)
  • -G --github generate entries from github activities
  • -L --gitlab generate entries from gitlab activities
  • -p --pie generate pie chart instead of text (currently only for slack and zebra)
  • -H --hours prefer output in hours instead of start/end date
  • -v --verbose verbose output

Configuration File

Instead of typing all options, you can specify your default options in a YAML file, which must be in your home directory under ~/.cabdriver/cabdriver.yml. The file looks like this:

defaults:
    jira: true
    slack: true
    calendar: primary
    zebra: false
    git: /home/metaodi
    github: true
    gitlab: true

If you have the config file in place and you type cabdriver these values will be applied. You can use all comand line options in config file, simply use their long name.

NOTE: if you specify a source on the command line, the config file is not used, e.g. with cabdriver -z will only list zebra entries

The config file is really just meant as a place to write down your default values.

Tests

To run the tests use the following command:

npm test

Release

To create a new release follow these steps:

  1. Update the version number in package.json
  2. Update the CHANGELOG.md
  3. Create a new release/tag on GitHub
  4. Publish the release with npm: npm publish