Skip to content

Commit

Permalink
2.2.1 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
flandrade authored Jun 28, 2020
1 parent 9dc7223 commit dfce531
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 22 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2.2.1

* Chore: Improve documentation
* Feature: Add option to print report (-p)
* Feature: Add custom regular working day hours (-h)
* Chore: Migrate to Github Actions
* Chore: Upgrade Node and dependencies.

2.1.1

* Chore: Upgrade Node and dependencies.
Expand Down
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
[![npm version](https://badge.fury.io/js/harvest-overtime.svg)](https://badge.fury.io/js/harvest-overtime)
[![Build Status](https://github.com/flandrade/harvest-overtime/workflows/harvest-overtime/badge.svg)](https://github.com/flandrade/harvest-overtime/actions)

Command-line interface to calculates employee's overtime with Harvest's CSV reports. Built with TypeScript and Node.js.
Command-line interface to calculate employee's overtime with [Harvest's CSV reports](https://www.getharvest.com/features/projects). [Harvest](https://www.getharvest.com/) is a service
that provides time tracking and online invoicing tools for freelancers and small businesses.

Built with TypeScript and Node.js. Star me on GitHub — thanks! ⭐

- [harvest-overtime ⏰](#harvest-overtime-)
- [✨ Features and limitations](#-features-and-limitations)
Expand All @@ -15,26 +18,26 @@ Command-line interface to calculates employee's overtime with Harvest's CSV repo
- [Using the standard regular working day hours](#using-the-standard-regular-working-day-hours)
- [Changing the regular working day hours](#changing-the-regular-working-day-hours)
- [Printing the report to the command line](#printing-the-report-to-the-command-line)
- [🙋 Help and Support](#-help-and-support)
- [📣 Feedback](#-feedback)
- [License](#license)

⭐ Star me on GitHub — thanks!

## ✨ Features and limitations
## ✨ Features and Limitations

- Supports [Harvest's CSV reports](https://help.getharvest.com/harvest/reports/managing-harvest-reports/time-report/).
- Calculates overtime of employees: generates a report or prints to the command line. See an
[example](#printing-the-report-to-the-command-line).
- Supports standard full-time work (40 hours per week: 8 hours per day). You can change this value.
See an [example](#changing-the-regular-working-day-hours).
- Supports any reporting period. It can be a week or several months.
- Includes time per date. See an [example](#-examples).
- Includes total time per day. See an [example](#-examples).
- Includes both weekdays and weekends. See an [example](#-examples).
- It doesn't support national holidays.
- Specific headers are required. See the next section.

## 📌 CSV Requirements

CSV files should include at least the following data:
[CSV reports](https://help.getharvest.com/harvest/reports/managing-harvest-reports/time-report/) should include at least the following data:

- **"Employee?":** whether they are employees or not.
- **"First Name":** the employees' first names.
Expand All @@ -44,7 +47,9 @@ CSV files should include at least the following data:

Please make sure your CSV is using these headers. See an [example](https://raw.githubusercontent.com/flandrade/harvest-overtime/master/harvest-example.csv).

## 🚀 How to install
## 🚀 How to Install

In order for you and your team to use this tool, you'll need to [install Node.js](https://nodejs.org/en/download/).

```bash
# Global so it can be called from anywhere
Expand Down Expand Up @@ -107,7 +112,7 @@ this is an extract from the CSV file.
| Yes | Emily | Bronte | 2018-08-07 | 2 |
| Yes | Emily | Bronte | 2018-08-11 | 1 |

### Using the standard regular working day hours
### Using the Standard Regular Working Day Hours

If `-h` is no included, the overtime report will use the standard regular working day
(8 hours per day):
Expand All @@ -116,34 +121,40 @@ If `-h` is no included, the overtime report will use the standard regular workin
harvest-overtime -i harvest_time_report_from2018-08-06to2018-08-12.csv -o report.csv
```

**CSV report:**

|Employee | Weekdays | Weekends | 2018-08-06 | 2018-08-07 | 2018-08-11 |
|--------------|----------|----------|------------|------------|------------|
| Jane Austen | 2 | 0 | 8.5 | 9.5 | |
| Emily Bronte | 1 | 1 | 7 | 10 | 1 |

### Changing the regular working day hours
### Changing the Regular Working Day Hours

Add `-h` in order to change the regular working hours. For instance, if the regular working
day has 7 hours:
day has 6 hours:

```bash
harvest-overtime -i harvest_time_report_from2018-08-06to2018-08-12.csv -o report.csv -h 7
harvest-overtime -i harvest_time_report_from2018-08-06to2018-08-12.csv -o report.csv -h 6
```

**CSV report:**

|Employee | Weekdays | Weekends | 2018-08-06 | 2018-08-07 | 2018-08-11 |
|--------------|----------|----------|------------|------------|------------|
| Jane Austen | 4 | 0 | 8.5 | 9.5 | |
| Emily Bronte | 3 | 1 | 7 | 10 | 1 |
| Jane Austen | 6 | 0 | 8.5 | 9.5 | |
| Emily Bronte | 5 | 1 | 7 | 10 | 1 |

### Printing the report to the command line
### Printing the Report to the Command Line

Add `-p` in order to print the report. You can also check your report in the
provided `output` file:
Add `-p` in order to print the report. You can also check a detailed report (includes
total time per day) in the provided `output` file.

```bash
harvest-overtime -i harvest_time_report_from2018-08-06to2018-08-12.csv -o report.csv -p
```

**Printed report:**

```bash
harvest-overtime ⏰

Expand All @@ -154,12 +165,26 @@ Output file: report.csv
┌──────────────┬──────────┬──────────┐
│ Employee │ Weekdays │ Weekends │
├──────────────┼──────────┼──────────┤
│ Jane Austen │ 2.0000 │ 0.0000
│ Jane Austen │ 2 │ 0
├──────────────┼──────────┼──────────┤
│ Emily Bronte │ 1.0000 │ 1.0000
└──────────────┴──────────┴──────────┘
│ Emily Bronte │ 1 │ 1
└──────────────┴──────────┴──────────┘
```

**CSV report:**

|Employee | Weekdays | Weekends | 2018-08-06 | 2018-08-07 | 2018-08-11 |
|--------------|----------|----------|------------|------------|------------|
| Jane Austen | 2 | 0 | 8.5 | 9.5 | |
| Emily Bronte | 1 | 1 | 7 | 10 | 1 |

## 🙋 Help and Support
- [Install Node.js](https://nodejs.org/en/download/)
- [Install the npm CLI](https://npme.npmjs.com/docs/cli/installation.html)
- [How to use and generate time reports on Harvest](https://help.getharvest.com/harvest/reports/managing-harvest-reports/time-report/)
- [Using time tracking to prevent burnout on your team](https://www.getharvest.com/resources/using-time-tracking-to-prevent-burnout-on-your-team)
- Open [an issue](https://github.com/flandrade/harvest-overtime/issues)

## 📣 Feedback
If you have any suggestions or want to let me know what you think of this tool, feel free to open [an issue](https://github.com/flandrade/harvest-overtime/issues).

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "harvest-overtime",
"version": "2.1.1",
"version": "2.2.1",
"description": "Track the overtime!",
"keywords": [
"harvest",
Expand Down
2 changes: 1 addition & 1 deletion src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import parseFromReport from "./parser/parser-from-csv";
import parseToReport from "./parser/parser-to-csv";
import report from "./report/scraper";

export const CUR_VERSION: string = "2.1.1";
export const CUR_VERSION: string = "2.2.1";
export const DEF_INPUT: string = "harvest.csv";
export const DEF_OUTPUT: string = "report.csv";
export const DEF_REGULAR_DAY_HOURS: string = "8";
Expand Down

0 comments on commit dfce531

Please sign in to comment.