Project

time-sheet

0.0
Low commit activity in last 3 years
No release in over a year
a time tracking solution based on spreadsheets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 13.0
~> 3.0
~> 2.2.16

Runtime

 Project Readme

TimeSheet

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

Changelog

v0.9.0

  • introduced employee data column: To use it, add a column "employee" to the spreadsheets and use flag -e to filter by it. If employee is not set, it falls back to "Me".

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