Skip to content

rlkennedyreid/fill-working-hours

Repository files navigation

Fill working hours

Basic script to assist in the logging/tracking of my working hours

How it works

Create a file called projects.json in this directory, detailing project codes with the total hours you're allocating to that project. See the example file for format.

Then just run the script from this directory. The script sequentially fills days with project times until all hours are spent, and outputs the result.

Example

## projects.json
{
    "project-a": 57.0,
    "project-b": 43.2
}

poetry install

fill-time

## output
╒═══════╤═════════════════╤═══════════════╕
│   Day │ Allocations     │   Total Hours │
╞═══════╪═════════════════╪═══════════════╡
│ 0     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 1     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 2     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 3     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 4     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 5     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 6     │ project-a: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 7     │ project-a: 5.20 │           7.4 │
│       │ project-b: 2.20 │               │
├───────┼─────────────────┼───────────────┤
│ 8     │ project-b: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 9     │ project-b: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 10    │ project-b: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 11    │ project-b: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 12    │ project-b: 7.40 │           7.4 │
├───────┼─────────────────┼───────────────┤
│ 13    │ project-b: 4.00 │           4   │
╘═══════╧═════════════════╧═══════════════╛

Notes

7.4 hour day is hardcoded.

Requirements

Poetry is used to manage dependencies and virtual environments.

About

Simple project to assist in tracking/logging my working hours

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages