{ "info": { "author": "Brian M. Clapper", "author_email": "bmc@clapper.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Games/Entertainment", "Topic :: Text Processing :: Filters" ], "description": "Introduction\r\n============\r\n\r\n``fortune`` is a stripped-down implementation of the classic BSD Unix\r\n``fortune`` command. It combines the capabilities of the ``strfile`` command\r\n(which produces the fortune index file) and the ``fortune`` command (which\r\ndisplays a random fortune). It reads the traditional ``fortune`` program's\r\ntext file format.\r\n\r\nUsage\r\n=====\r\n\r\nUsage::\r\n\r\n fortune [OPTIONS] /path/to/fortunes\r\n\r\n OPTIONS\r\n\r\n -h, --help Show usage and exit.\r\n -u, --update Update the index file.\r\n -q, --quiet When updating the index file, do so quietly.\r\n -V, --version Show version and exit.\r\n\r\nIf you omit the path, ``fortune`` looks at the ``FORTUNE_FILE`` environment\r\nvariable. If that environment variable isn't set, ``fortune`` aborts.\r\n\r\nFortune Cookie File Format\r\n==========================\r\n\r\nA fortune cookie file is a text file full of quotes. The format is simple:\r\nThe file consists of paragraphs separated by lines containing a single '%'\r\ncharacter. For example::\r\n\r\n A little caution outflanks a large cavalry.\r\n -- Bismarck\r\n %\r\n A little retrospection shows that although many fine, useful software\r\n systems have been designed by committees and built as part of multipart\r\n projects, those software systems that have excited passionate fans are\r\n those that are the products of one or a few designing minds, great\r\n designers. Consider Unix, APL, Pascal, Modula, the Smalltalk interface,\r\n even Fortran; and contrast them with Cobol, PL/I, Algol, MVS/370, and\r\n MS-DOS.\r\n -- Fred Brooks, Jr.\r\n %\r\n A man is not old until regrets take the place of dreams.\r\n -- John Barrymore\r\n\r\n\r\nThe Index File\r\n==============\r\n\r\nFor efficiency and speed, ``fortune`` uses an index file to store the offsets\r\nand lengths of every fortune in the text fortune file. So, before you can use\r\n``fortune`` to read a random fortune, you have to generate the data file. With\r\nthe traditional BSD ``fortune`` program, you used the I{strfile}(8) command\r\nto generate the index. With I{this} fortune program, however, you simply\r\npass a special argument to the ``fortune`` command::\r\n\r\n fortune -u /path/to/fortunes\r\n\r\nThat command will generate a binary ``/path/to/fortunes.dat`` file that\r\ncontains the index. You should run ``fortune -u`` whenever you change the text\r\nfortune file.\r\n\r\nGenerating a Random Fortune\r\n===========================\r\n\r\nOnce you have an index file, you can generate a random fortune simply by\r\nrunning the ``fortune`` utility with the path to your text fortunes file::\r\n\r\n fortune /path/to/fortunes\r\n\r\nDifferences\r\n===========\r\n\r\nThis version of ``fortune`` does not provide some of the more advanced\r\ncapabilities of the original BSD program. For instance, it lacks:\r\n\r\n- the ability to mark offensive and inoffensive fortunes\r\n- the ability to separate long and short quotes\r\n- the ability to print all fortunes matching a regular expression\r\n\r\nIt does, however, provide the most important function: The ability to display\r\na random quote from a set of quotes.\r\n\r\nLicense and Copyright Info\r\n==========================\r\n\r\nCopyright (c) 2008 Brian M. Clapper\r\n\r\nThis is free software, released under the following BSD-like license:\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are met:\r\n\r\n - Redistributions of source code must retain the above copyright notice,\r\n this list of conditions and the following disclaimer.\r\n\r\n - The end-user documentation included with the redistribution, if any,\r\n must include the following acknowlegement:\r\n\r\n This product includes software developed by Brian M. Clapper\r\n (bmc@clapper.org, http://www.clapper.org/bmc/). That software is\r\n copyright (c) 2008 Brian M. Clapper.\r\n\r\n Alternately, this acknowlegement may appear in the software itself, if\r\n and wherever such third-party acknowlegements normally appear.\r\n\r\nTHIS SOFTWARE IS PROVIDED B{AS IS} AND ANY EXPRESSED OR IMPLIED WARRANTIES,\r\nINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\r\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRIAN M.\r\nCLAPPER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\nPOSSIBILITY OF SUCH DAMAGE.", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/packages/source/f/sv_fortune/sv_fortune-1.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://software.clapper.org/fortune/", "keywords": "", "license": "BSD-style license", "maintainer": "", "maintainer_email": "", "name": "sv-fortune", "package_url": "https://pypi.org/project/sv-fortune/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sv-fortune/", "project_urls": { "Download": "http://pypi.python.org/packages/source/f/sv_fortune/sv_fortune-1.1.tar.gz", "Homepage": "http://software.clapper.org/fortune/" }, "release_url": "https://pypi.org/project/sv-fortune/1.1/", "requires_dist": null, "requires_python": null, "summary": "Python version of old BSD Unix fortune program, python3-patched", "version": "1.1" }, "last_serial": 3407433, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "4a5d5656c106dc9de738c696b7ad0411", "sha256": "e4ce69a7a2cf4257dd2928a167ac8e0edc2ac6235c25da2f137cdb9f0cd8a9a1" }, "downloads": -1, "filename": "sv_fortune-1.1.tar.gz", "has_sig": false, "md5_digest": "4a5d5656c106dc9de738c696b7ad0411", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5921, "upload_time": "2016-09-26T10:24:48", "url": "https://files.pythonhosted.org/packages/2a/10/65fb9682151429c625c94ff872f859114fc63e7b1f74a34acdf41847afd1/sv_fortune-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a5d5656c106dc9de738c696b7ad0411", "sha256": "e4ce69a7a2cf4257dd2928a167ac8e0edc2ac6235c25da2f137cdb9f0cd8a9a1" }, "downloads": -1, "filename": "sv_fortune-1.1.tar.gz", "has_sig": false, "md5_digest": "4a5d5656c106dc9de738c696b7ad0411", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5921, "upload_time": "2016-09-26T10:24:48", "url": "https://files.pythonhosted.org/packages/2a/10/65fb9682151429c625c94ff872f859114fc63e7b1f74a34acdf41847afd1/sv_fortune-1.1.tar.gz" } ] }