Yet another Python fortune implementation
Project description
vaticinator(6)
v0.1.0
Vaticinator is yet another Python implementation of the
ancient and (in)famous fortune program from the
bsdgames package.
My motivation for writing it was more to have a portable library I could use to fetch fortunes for use in other projects. It's possible that one or more of the existing ones have this (I looked albeit briefly), but it was an itch I didn't mind scratching.
It is still alpha maturity level, though the majority
of fortune behavior is implemented at the moment.
Example integration
This is a the code for a Django template tag that displays a random fortune inside a template (with all the options from the command line available). This is basically why I created this project::
from django.template import Library
from vaticinator.vaticinator import Vaticinator
register = Library()
vaticinator = Vaticinator()
@register.simple_tag
def random_fortune(*args, **kwargs):
vaticinator.set_default_options()
vaticinator.process_options(*args, **kwargs)
return vaticinator.fortune
And the template::
<span>{% random_fortune 'short' 'all' %}</span>
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vaticinator-0.1.0.tar.gz.
File metadata
- Download URL: vaticinator-0.1.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8745e6d1abc5a7a74c34a0d46d66dfd67e3e4eadaf61e200d12e333b22084a63
|
|
| MD5 |
5a554bd0bb4b1b3bfc487e33e93c9ca0
|
|
| BLAKE2b-256 |
48c3a9de66c35d590a2cda0ea0ebe2762d12aaae77c9c03da1e68fe11bd71532
|
File details
Details for the file vaticinator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vaticinator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acacb9c44db23008dc80d363ef9dfa6a72cbb3398b4631996baae79641b8cf06
|
|
| MD5 |
8ee1cb2ebcc3d79448abd49b91376471
|
|
| BLAKE2b-256 |
1e1b9f1080087aa8adb02345d3c724eb56f56768bf27144d7b6cbf0476ee2f7b
|