onthisday
Simple library that retrieves the historical events that happened on current day.
At the moment the events do not include birth/death of famous people.
Event sources
- Wikipedia 🇮🇹🇺🇸🇬🇧🇫🇷🇩🇪🇪🇸🇵🇹 (other countries may work, not tested)
- Accadde Oggi 🇮🇹
Install
pip install onthisday
Usage
As a standalone script
In the root directory:
> python -m onthisday --help
Usage: main.py [OPTIONS] COMMAND [ARGS]...
Commands:
all Print all the events of today
last Print last n events of today
list List the available sources (valid shorter names in brackets)
random Print random event of today
For the specific command options:
> python -m onthisday all --help
Usage: main.py all [OPTIONS]
Print all the events of today
Options:
--source TEXT [default: wiki]
--locale TEXT
--help Show this message and exit.
As a library
see the example file provided
Possible usages
Shell greeting
Display a random event as the terminal emulator loads up.
For example, for the fish shell, one can add the following greeting function:
> function fish_greeting
python -m onthisday random
end
> funcsave fish_greeting
Close and reopen the terminal emulator and
[2005] In Iraq inizia il processo all'ex-dittatore Saddam Hussein
~ via 🐍 v3.9.7
➜
known issue: the script is not optimized and makes no use of caches. The user experience with this kind of greeting message might not be the best as the command will take around 1 second to run.
Issues
Please open issue on this GitHub repository for any error, suggestion or feature request.
Metadata
Release files for onthisday 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| onthisday-1.1.0.tar.gz | 4.9 kB | Without provenance | Details for onthisday-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| onthisday-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for onthisday-1.1.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / onthisday-1.1.0.tar.gz
| Download URL | onthisday-1.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38f1e7713eba25f8f5ab3ba1a5be60badab47d799e7b08aafb15e96709f1ce40
|
|
BLAKE2b-256 checksum How to use checksums |
7698eb092d5ab823ec3f35c552e9ad5b82d2e1ec4998e3fdbd2a722a06c4443d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / onthisday-1.1.0-py3-none-any.whl
| Download URL | onthisday-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a7f8ca94b2908e2fd4eb01e1fccc243e065ab69c58bcf32276e14eca801b4a9
|
|
BLAKE2b-256 checksum How to use checksums |
5202163b5f857b42c37c227936371504d03bc61b5af5601288a9051b232762c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for onthisday 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.