time_crunch
Convert a TPD file from a digital timeclock into an Excel workbook. A few caveats:
- The TPD format is, as far as I know, not a standard format.
- The TPD format is already CSV. This gem cleans up the CSV and adds it as a worksheet to the workbook. It also adds a summary worksheet with each employee's total time.
Installation
Add it to your Gemfile:
gem 'time_crunch'
TPD Format
The accepted format looks like this:
3,0001,2017-12-16,08:00
3,0002,2017-12-16,08:01
2,0002,2017-12-16,12:03
2,0001,2017-12-16,12:05
In this format, 3
means In
and 2
means Out
. The second column references the employee. A mapping between ID and name is accepted by this gem to output names in the worksheets. The third column is the date, and the fourth column is the 24-hour time (physical clock's timezone). Ideally each In
should pair with an Out
, but since this is not always the case, each day with an odd number of entries has the oddity discarded for purposes of the summary calculation. In the future, the worksheets may be updated to include formulas so that the manual addition of time entries on one worksheet would update the summary worksheet.