Is it a public holiday?
Project description
python-publicholiday
A cli utility to help run things or not run things based on if it is a public holiday. The command exits 0 if today is a public holiday and exits 1 if not.
Installation: pip install publicholiday
Examples usage:
$ publicholiday --help
Usage: publicholiday [OPTIONS]
Is it a public holiday?
Options:
-c, --country TEXT Supported country name or code.
--help Show this message and exit.
# Run a script on a public holiday
$ publicholiday && /thing/to/run.sh
# Don't run a thing on public holidays
$ publicholiday || /thing/to/run.sh
By default publicholiday
will check against UK public holidays. You can change
this by passing a supported country:
# Run a script on a Argentinian public holiday
$ publicholiday -c Argentina && /thing/to/run.sh
# Don't run a thing on US public holidays
$ publicholiday -c US || /thing/to/run.sh
This utility uses the holidays
pip package, to find out if your country is
supported see: https://pypi.org/project/holidays/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
publicholiday-0.1.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for publicholiday-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bdbe2a29bf84981f5135a1c78d3fc273f8f16d6e97c2d2d598d5d0b51cfda7e |
|
MD5 | 58efdaf78f2ea795582c6a5eea23edb4 |
|
BLAKE2b-256 | 0f766a302bfc55cf3f6d904aec10bad16c65164c2c139a9fc99a3854dbce571f |