Skip to main content

Automatically update hours card on TimeWatch

Project description

TimeWatcher

Automatically update hours card on TimeWatch

Python CLI program to help you automate filling up Timewatch card. Integrate with launchd to make this fully automated process every month. NOTE: This program should only be used on MacOS currently.

Usage

First install the package to your machine

pip install timewatcher

And execute the program when you want to fill the time

timewatcher

The first time you run it, you will go through the process of setting up the configuration file. enter image description here After you set it up for the first time, it will be save to ~/Library/Preferences/TimeWatcher/config.ini and it can be changed in any time.

Furthermore, if you set the auto_execute parameter to True it will also add a launchdagent to automatically execute the program at specific date and time.

Configuration

This is the list of the user configuration options:

  • company_number- Mandatory, your company number in Timewatch
  • employee_number - Mandatory, you employee number used in Timewatch
  • employee_password - Mandatory, password used to Timewatch, by default this is your ID number
  • auto_execute - Do you want to automatically execute this program at specific date and time? Default is 'True'
  • day_to_execute - If you chose 'True' to the previous one, you can set the day of the month to run on. Input only digit. E.g: 12 will make the program execute on the 12th day of each month.
  • hour_to_execute - If you chose 'True' to the previous one, you can set the time in the day you want to execute the program. Input only digit. E.g: 11 will make the program execute on 11 A.M.
  • start_time - Optional, the time to set as your start time in Timewatch. Default to 0900 (9 A.M)
  • end_time - Optional, the time to set as your end time in Timewatch. Default to 1800 (6 P.M)
  • auto_end_time - Optional, if set to True it will calculate the end_time based on the needed hours for each date in Timewatch. This mean the program can handle half days automatically using this option. The default is True.

Development

If you want to run this program locally, clone the repo to your machine

https://github.com/birkagal/timewatcher
cd timewatcher

Initialize environment using poetry

poetry install --no-root && pre-commit install

You can make any changes you want. To execute run the timewatcher command inside the directory

timewatcher

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timewatcher-2.2.1.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

timewatcher-2.2.1-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page