Skip to content

tifa/timeoff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

timeoff ๐Ÿ

pypi license python ci

Track your hours accrued and set goals and reminders to take a break!

$ timeoff list

  |    o               ,---.,---.
  |--- .,-.-.,---.,---.|__. |__.
  |    || | ||---'|   ||    |
  `---'`` ' '`---'`---'`    `

  Current schedule: SemiMonthly
                    4 hours on the 1st and 15th of the month
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚   Start    โ”‚  End  โ”‚   Type   โ”‚   Hours โ”‚   Remaining โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            โ”‚       โ”‚ Initial  โ”‚     100 โ”‚         100 โ”‚
โ”‚ 2023-05-12 โ”‚   -   โ”‚ Vacation โ”‚      -8 โ”‚          92 โ”‚
โ”‚ 2023-05-15 โ”‚   -   โ”‚ Accrued  โ”‚       4 โ”‚          96 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Features

  • Automaticaly updates PTO hours over time.
  • Define schedules to set accrued PTO rates.
  • View the remaining hours of PTO available to you.

Installation

To install timeoff:

$ pip install timeoff

Usage

Documentation is in the works! Please run the -h help flag in the meantime. The interactive prompts will guide you through further instructions.

$ timeoff -h
usage: timeoff [-h] {add,list,rm,settings} ...

Timeoff CLI

positional arguments:
  {add,list,rm,settings}
                        sub-command help
    add                 Add an absence
    list                List absences
    rm                  Remove an absence
    settings            Manage settings

optional arguments:
  -h, --help            show this help message and exit

The data is stored in ~/.timeoff.

Python API

You can also use this as a Python library.

Retrieve a list of all PTO hours remaining and absenses taken.

import timeoff
timeoff.get()

Return the number of hours of PTO remaining as of today.

timeoff.available_hours()

You can also pass in a future date to see how many hours you'll have accumulated by then.

from datetime import date
timeoff.available_hours(date(2023, 9, 4))

About

๐Ÿ Track vacation hours accrued.

Resources

License

Stars

Watchers

Forks