1.3.1 • Published 5 years ago

@markusylisiurunen/timeline v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

build status npm version github issues license

Timeline

A CLI tool for flexible time tracking.

  1. Installation
  2. Setup
  3. Commands
  4. Development
    1. Running commands
    2. Google services
  5. License

Installation

$ npm install -g @markusylisiurunen/timeline

or

$ yarn global add @markusylisiurunen/timeline

Setup

This tool uses Google services to save and display the logged time. Google Sheets is used for storing the logged entries and Google Calendar is used to display them. You need to grant permissions to these services before you can start using this tool.

To grant the required permissions, you can run the following command and follow the instructions.

$ timeline google init

This process will set up Google Sheets and Google Calendar for the tool. You should create a new Google Sheet document and it's also recommended to create a new Google Calendar calendar in order to separate your personal calendar events from the events created by this tool.

Tip: The Google Sheet document id can be found in the URL bar of your browser.

To revoke the access token granted to this tool, you can run the following command.

$ timeline google reset

Commands

Here is a list of all available commands.

CommandDescription
event addAdd a new event to your timeline.
event report labelShow a report of your events by label.
event report typeShow a report of your events by type.
google initGrant the application access to your Google services.
google resetRevoke the application's access to your Google services.
google syncSynchronize your timeline with your Google Calendar.
work addAdd a new work event to your timeline.
work liveShow a live report of your work events.
work reportShow a report of your work events.

You can run the following command to get a more detailed description.

$ timeline <command> --help

Development

This section contains the instructions to develop this package.

Running commands

You could run npm link to install the package globally but that would conflict with the real published package from npm. Instead, you should run commands by doing npm start -- <command>. This will make sure you are "sandboxed" in the development environment.

$ npm start -- event add

Google services

Currently this package relies only on Google services to store events. You should setup the development version in a same way as described in the setup section.

Note! You should use the npm start -- <command> versions of the commands.

License

MIT