This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


fortune is a stripped-down implementation of the classic BSD Unix fortune command. It combines the capabilities of the strfile command (which produces the fortune index file) and the fortune command (which displays a random fortune). It reads the traditional fortune program’s text file format.



fortune [OPTIONS] /path/to/fortunes


-h, --help      Show usage and exit.
-u, --update    Update the index file.
-q, --quiet     When updating the index file, do so quietly.
-V, --version   Show version and exit.

If you omit the path, fortune looks at the FORTUNE_FILE environment variable. If that environment variable isn’t set, fortune aborts.

The Index File

For efficiency and speed, fortune uses an index file to store the offsets and lengths of every fortune in the text fortune file. So, before you can use fortune to read a random fortune, you have to generate the data file. With the traditional BSD fortune program, you used the I{strfile}(8) command to generate the index. With I{this} fortune program, however, you simply pass a special argument to the fortune command:

fortune -u /path/to/fortunes

That command will generate a binary /path/to/fortunes.dat file that contains the index. You should run fortune -u whenever you change the text fortune file.

Generating a Random Fortune

Once you have an index file, you can generate a random fortune simply by running the fortune utility with the path to your text fortunes file:

fortune /path/to/fortunes


This version of fortune does not provide some of the more advanced capabilities of the original BSD program. For instance, it lacks:

  • the ability to mark offensive and inoffensive fortunes
  • the ability to separate long and short quotes
  • the ability to print all fortunes matching a regular expression

It does, however, provide the most important function: The ability to display a random quote from a set of quotes.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sv_fortune-1.1.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 Source Sep 26, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting