Skip to main content

Populates Leave Forms from the Command Line

Project description

Leave Populator

Asks the minimum amount of questions to populate a leave request form.

Installation

Recommended

pip install popleave

Local installation

  1. Install poetry following the official guidelines for your system.

  2. Clone the repository.

  3. Install the dependencies.

poetry install

Usage

First run

Run the program with

popleave

On the first run, you will be asked for your name:

Enter name (press Enter to use Samwise Gamgee): 

and your department:

Enter department (press Enter to use The Shire):

and the current amount of days holiday you have remaining:

Enter remaing_days_leave (press Enter to use 26):

If you ever need to change or correct these details, pass the --init flag when running the script:

popleave --init

and you will be able to update the values accordinly.

Populating a form

When run you will then be prompted for:

  • The start date of your leave.
  • The duration of your leave.
  • The reason for your leave.

If you'd rather, you can use commandline arguments. A full list of commandline arguments can be found by using the --help flag.

usage: popleave    [-h] [-i] [-s START_DATE] [-e END_DATE] [-d DURATION]
                   [-r REASON] [-t]

Populates the leave of absence form with a CLI

options:
  -h, --help            show this help message and exit
  -i, --init            Forces reinitialisation of config file.
  -s START_DATE, --start_date START_DATE
                        Start date in YYYY-MM-DD format.
  -e END_DATE, --end_date END_DATE
                        End date in YYYY-MM-DD format.
  -d DURATION, --duration DURATION
                        Duration in days.
  -r REASON, --reason REASON
                        Reason for leave.
  -t, --toil            Fills out Time Off In Leu instead of annual leave.

All resulting forms will be stored in the current directory in the format INITIALS_ANNUAL_STARTDATE.docx. Thus Samwise Gamgee requesting some leave starting on 1969-12-31 will result in:

SG_ANNUAL_31121969.docx

License

This project is licensed under the GPLv3 license.

Contributing

All contributions welcome. Submit a pull a request or create an issue to start the ball rolling.

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

popleave-0.1.2.tar.gz (35.6 kB view hashes)

Uploaded Source

Built Distribution

popleave-0.1.2-py3-none-any.whl (34.6 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