indicfortune
A fortune cookie database and generator for indic languages.
Usage
>>> from indicfortune getInstance
>>> f = getInstance()
>>> f.fortune('chanakya')
u' The beauty of a cuckoo is in its notes, that
of a woman\n in her unalloyed devotion to her husband, that of an\n
ugly person in his scholarship, and that of an ascetic\n in his
forgiveness.\n'
API reference
-
class indicfortune.core.Fortune[source]
The fortune class. Instantiate to get access to the methods.
-
fortune(database, pattern=None)[source]
Pick a random fortune from a file
-
fortunes(infile, pattern=None)[source]
Yield fortunes as lists of lines
-
get_info()[source]
returns info on the module
-
get_module_name()[source]
returns the module name.
-
indicfortune.core.getInstance()[source]
returns an instance of the fortune class.
Available fortune databases
- chanakya
- malayalam_proverbs
- thirukkural