New fml module added.
This commit is contained in:
parent
a21b0c5228
commit
75b0b6f0ef
9
modules/fml/fml.sh
Executable file
9
modules/fml/fml.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user