Last active
May 3, 2023 01:50
-
-
Save BelegCuthalion/f31d0dc1fe00fc2faec9fb578ee33f7e to your computer and use it in GitHub Desktop.
Farsi poetry to brighten up your day... of course not! Not over here. Try your luck with... French maybe.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
response=`curl -s "http://c.ganjoor.net/beyt-json.php"` | |
m1=`echo $response | jq -r ".m1"` | |
m2=`echo $response | jq -r ".m2"` | |
poet=`echo $response | jq -r ".poet"` | |
# fribidi still monkeys with the output tho | |
echo -e "$m1\n$m2\n$poet" | fribidi | |
# Works on my machine: | |
# Debian Stretch x86_64 | |
# GNU bash, version 4.4.12 | |
# curl 7.52.1 | |
# jq-1.5-1-a5b5cbe | |
# fribidi (GNU FriBidi) 0.19.7 | |
# Powered by ganjoor.ir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment