diff --git a/scripts/votd b/scripts/votd new file mode 100755 index 0000000..4e80e34 --- /dev/null +++ b/scripts/votd @@ -0,0 +1,13 @@ +#!/bin/bash + +# Make the curl request and store the JSON response in a variable +response=$(curl -s --request GET \ + --url 'https://beta.ourmanna.com/api/v1/get?format=json&order=daily' \ + --header 'accept: application/json') + +# Use jq to parse the JSON and extract the required fields +text=$(echo "$response" | jq -r '.verse.details.text') +reference=$(echo "$response" | jq -r '.verse.details.reference') +version=$(echo "$response" | jq -r '.verse.details.version') + +echo "\"$text\" - $reference ($version)"