Skip to main content

Yet another Python fortune implementation

Project description

vaticinator(6)

v0.0.7

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(**kwargs):
	vaticinator.set_default_options()
	vaticinator.process_options(**kwargs)
	return vaticinator.fortune

And the template::

<span>{% random_fortune 'short' 'all' %}</span>

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

vaticinator-0.0.7.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

vaticinator-0.0.7-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file vaticinator-0.0.7.tar.gz.

File metadata

  • Download URL: vaticinator-0.0.7.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vaticinator-0.0.7.tar.gz
Algorithm Hash digest
SHA256 9261efdef2e7106cd220da624c835bd9147d53f6f99599eb2a8f8dcabd14dffa
MD5 f6abba460d393ca521de013c6cfef8dc
BLAKE2b-256 f5ddd2290054fa8d87df0bd90f147bbaf98896dbc401e6a0a420dc51bfa0b0b4

See more details on using hashes here.

File details

Details for the file vaticinator-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: vaticinator-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vaticinator-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 212f462e52043569503029664cefb5ee519ea0b848555e57280529673da95c1f
MD5 909dd346171051f88510473c05baff67
BLAKE2b-256 26af986e84295973e650fe75f31a632ecf0f22f124d84f00cf4da6362d979cf1

See more details on using hashes here.

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