“Yada yada hi dharmasya glanirbhavati bharata
Abhyutthanam adharmasya tadatmanam srijamyaham
Paritranaya sadhunam vinashayacha dushktitam
Dharmasangsthapanarthaya samvabami yuge yuge” — Krishna, Srimadbhagvatgita 4-7/4-8
Srimadbhagvatgita's shlokas are scraped from https://shlokam.org/bhagavad-gita/index/. The original Devnagari script, and IAST are preserved along with its meaning. The data folder is structured such that directories represent chapters with verses consolidated into JSON files.
gitasholka.py is provided for randomly sampling a shloka, displaying it to standard output.
$ git clone https://github.com/cynthia2006/smbgita
$ cd smbgita
$ ./gitashloka.py | cowsay
_________________________________________
/ "These three are the gates of hell, \
| destructive of the Self — lust, anger |
| and greed; therefore, one should |
\ abandon these three." /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Note: The
datafolder must be placed adjacent togitashloka.py. In future,~/.local/share/gita(user) or/usr/share/gita(system) paths will be considered as well.