Giter Site home page Giter Site logo

tim's Introduction

Work day calculator

Console app that can be built as a nuget package and installed as a global tool.

There's no other intended users than myself. The repo is public because I need to access it from computers where I do not want to provide my github credentials. The business logic is tightly coupled to input requirements of a specific time reporting system.

Installation

cd Tim.CLI
dotnet pack
dotnet tool install --global --add-source ./nupkg Tim.CLI

To install a new version of the tool. (Keeping it as simple as possible. Not using versioning for this app.)

dotnet tool uninstall --global Tim.CLI
cd Tim.CLI
dotnet pack
dotnet tool install --global --add-source ./nupkg Tim.CLI

Usage

Once installed as a global tool, the program is executed by the name tim (as specified by the relevant csproj setting).

$ tim 0700 1800 0,5 MainProject -f -1 --OtherProject 2,5 ++Training 2 ++MainProject 0,5 -b 7
[ MainProject 7.5 | OtherProject 2.5 | Training 2 | Flex in 5 | Total 12 ]

Above means:

  • You've worked from 07:00 to 18:00, with 0.5 hour lunch, mainly billing towards MainProject.
  • During the day, you took one hour from your flex-account (-f -1) instead of working towards the MainProject.
  • During the day, you worked 2.5 hours which should be billed towards OtherProject instead of MainProject (--OtherProject 2.5)
  • After 18:00, you did 2 hours of Training, which should not be deducted from the MainProject hours, but which should add towards your flex-account
  • After 18:00, you worked half an hours towards the MainProject (++MainProject 0.5), which should also add towards your flex-account
  • The basis for flex calculations is the workday length, which defaults to 8 hours but is in this case manually overridden to 7 hours (-b 7)
  • The output states that you worked 12 hours total, of which 7.5 hours should be billed towards MainProject, 2.5 hours towards OtherProject, 2 hours should be reported as Training. This workday yielded 5 hours towards the flex account.

Help

tim --help

See unit tests for more examples.

tim's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.