random quotes from chanakya, thirukkural and malayalam proverbs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
libindic/fortune
.gitignore
.testr.conf
.travis.yml
Makefile
README.md
circle.yml
setup.cfg
setup.py
test-requirements.txt
tox.ini

README.md

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