14 lines
446 B
Bash
14 lines
446 B
Bash
|
#!/bin/bash
|
||
|
DIR="$HOME/.config/quoter"
|
||
|
mkdir -p "$DIR"
|
||
|
|
||
|
export Q=$(curl -s "http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en" | sed 's|\\||g' )
|
||
|
QUOTE=$(echo $Q | jq .quoteText)
|
||
|
AUTOR=$(echo $Q | jq .quoteAuthor | tr -d '"')
|
||
|
echo "${QUOTE}|${AUTOR}" >> "${DIR}"/forismatic.txt
|
||
|
|
||
|
printf "\${font Droid Sans:size=18}\${color}"
|
||
|
echo ${QUOTE} | fmt -80
|
||
|
printf "\${font Droid Sans:size=12}\${alignr}\${color0}"
|
||
|
echo "— ${AUTOR}"
|