Uses the Escriva.org API available online.
One way to get a random quote converted to a JSON string is as follows.
curl -s -X GET "https://escriva.org/api/v1/points/random/?book_type=camino&book_type=surco&book_type=forja&site_id=1" \
-H 'accept: application/json'
I created a file
webquotes.sh
to be placed in $HOME directory and be pulled by your RC file (in my case I'm using .zshrc).
It is then read via a line in the .zhrc as follows
source ~/webquotes.sh
Requires internet connection to escriva.org to work.
- Copy the file
webquotes.shinto your$HOMEdirectory. From the this directory you can usecp webquotes.sh ~/. - Add the following line into the last line of your
~/.zhprofile. Since I'm usingzsh, I have~/.zshprofile. If you are usingbash, you should have~/.bash_profile,~/.bash_loginor~/.profile. - You may need to restart your terminal.