Simplify the chat/answer example

This commit is contained in:
Alexei Sorokin 2016-09-08 23:00:13 +03:00
parent d73e10e76e
commit a41e3051a0
2 changed files with 1 additions and 6 deletions

View File

@ -13,10 +13,6 @@ random() {
cd "$(dirname "$0")"
if (grep -q -- "$1" "ignore"); then
exit 0
fi
printf "%s" "$1: "
from=$(printf "%s\n" "$1" | tr -d '$`|<>')
@ -28,7 +24,6 @@ if [[ ${#string} -gt 750 ]]; then
exit 0
fi
if [[ "$string" == *http*://* ]]; then
amount=$(sed -e '/https*:\/\//!d' ./frs.txt | wc -l)
# Makes it a bit more human (time to find a link?).
@ -39,7 +34,7 @@ if [[ "$string" == *http*://* ]]; then
cl="$(wget --spider -S "$img" 2>&1)"
if [[ $(printf "%s\n" "$cl" | sed -e '/Content-Type/!d;/image\//!d') ]]; then
#echo 'posting'
printf "%s\n" "$img $from" >> ../data/pictures
printf "%s\n" "$img $from" >> ./pictures.txt
fi
else
# Exclude last two entries from the amount.

View File