New fml module added.

This commit is contained in:
Storm Dragon 2020-08-12 20:08:25 -04:00
parent a21b0c5228
commit 75b0b6f0ef
1 changed files with 9 additions and 0 deletions

9
modules/fml/fml.sh Executable file
View File

@ -0,0 +1,9 @@
[ -f functions.sh ] && source functions.sh
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | pandoc -f html -t plain | tr '[:space:]' ' ')"
if [[ ${#fml} -gt 10 ]]; then
msg "$2" "${fml}"
else
msg "$2" "I couldn't get any fmls. fml"
fi