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
-
Install poetry following the official guidelines for your system.
-
Clone the repository.
-
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
Built Distribution
File details
Details for the file popleave-0.1.4.tar.gz
.
File metadata
- Download URL: popleave-0.1.4.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81dd7ddca54c8b497380002970ea3be0d3c49e8da3db50bfc9594c4d4a262223 |
|
MD5 | 2d6ed3131778003b7420292ed3ebaf9f |
|
BLAKE2b-256 | eb3622a5827edb61f61cf10ec8303dfb97479b37e780cda59be4492d8b53b119 |
File details
Details for the file popleave-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: popleave-0.1.4-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a75c6a28275ba676b6156aa385254f9245e7da2485d2a4ee998af8403fb13dd |
|
MD5 | 3dc1e7eacc963305e2fd5bdd61972ff9 |
|
BLAKE2b-256 | 80382f7c01393aac081ebf69f74a44a3b48a9658726bc6de68b3cd08602ff4be |