Skip to content
a time tracking solution based on spreadsheets
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
exe
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
time_sheet.gemspec

README.md

TimeSheet

This gem allows you to parse a spreadsheet with time tracking information to generate various statistics suitable for invoices and project effort estimates.

Installation

gem install time-sheet

Usage

The gem bundles an executable which includes a help command, just run time-sheet.rb --help. As an example spreadsheet, have a look at the sheet we use for tests.

A config file at ~/.time-sheet.conf is read if it exists. The only possible option is location: /path/to/excel/sheets. It can be specified multiple times.

Processing data with other tools

You can simply let the tool output a full list of time entries that are easy to process with other tools. For example a python script process.py like this

import sys
from io import StringIO
import datetime
import pandas as pd

data = sys.stdin.readlines()
data = StringIO("\n".join(data))
df = pd.read_csv(data,
  sep='|',
  names=['date', 'start', 'end', 'minutes', 'project', 'activity', 'description'],
  converters={
    'date': lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(),
    'start': lambda x: datetime.datetime.strptime(x, '%H:%M').time(),
    'end': lambda x: datetime.datetime.strptime(x, '%H:%M').time()
  }
)

# ... your processing

could be used to read the data into a pandas dataframe like this:

time-sheet.rb --trim | ./process.py

Attention: unfortunately, the python debugger pdb (as well as ipdb) doesn't work out of the box with scripts that make use of data via STDIN. If you want to use it, you have to

sys.stdin = open('/dev/tty')
ipdb.set_trace()

We keep a loose collection of scripts in the scripts folder.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/moritzschepp/time-sheet

You can’t perform that action at this time.