Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.38 KB

README.md

File metadata and controls

35 lines (28 loc) · 1.38 KB

LibIndic Fortune

Build Status Coverage Status

LibIndic's fortune module is a fortune cookie generator that returns random quotes from certain sources. The current list of sources are:

  1. Quotes from Chanakya
  2. Quotes from Thirukkural
  3. Malayalam Proverbs

Installation

  1. Clone the repository git clone https://github.com/libindic/indicfortune.git
  2. Change to the cloned directory cd indicfortune
  3. Run setup.py to create installable source python setup.py sdist
  4. Install using pip pip install dist/fortune*.tar.gz

Usage

>>> from libindic.fortune import Fortune
>>> instance = Fortune()
>>> print(instance.fortune("chanakya"))
 The earth is supported by the power of truth; it is the
 power of truth that makes the sunshine and the winds blow;
 indeed all things rest upon truth.
>>> print(instance.fortune("chanakya", "daughter"))
 Residing in a small village devoid of proper living
 facilities, serving a person born of a low family,
 unwholesome food, a frowning wife, a foolish son, and a
 widowed daughter burn the body without fire.

For more details read the docs