add votd
This commit is contained in:
13
scripts/votd
Executable file
13
scripts/votd
Executable file
@ -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)"
|
||||
Reference in New Issue
Block a user