keeps important secton for formatting in html

This commit is contained in:
Alexander Bocken 2020-09-18 17:34:59 +02:00
parent 9062f1ae8d
commit f8750a1a86
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

2
script/gethtml Normal file → Executable file
View File

@ -5,7 +5,7 @@ cat avl.csv | while read line || [[ -n $line ]];
do do
no="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $1}' )" no="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $1}' )"
word="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $2}' )" word="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $2}' )"
meaning_clean="$(curl --no-progress-meter http://www.ozdic.com/collocation-dictionary/"$word" | sed '6,35d; 37,53d' | tac | sed '4,30d' | tac | tr '\n' ' ' | tr '\t' ' ')" meaning_clean="$(curl --no-progress-meter http://www.ozdic.com/collocation-dictionary/"$word" | sed '6,35d; 38,48d' | tac | sed '6,30d' | tac | tr '\n' ' ' | tr '\t' ' ')"
printf "card:%s\t(%s)\n" "$no" "$word" printf "card:%s\t(%s)\n" "$no" "$word"
printf "%s;\"%s\";\"%s\"\n" "$no" "$word" "$meaning_clean" >> cards.csv printf "%s;\"%s\";\"%s\"\n" "$no" "$word" "$meaning_clean" >> cards.csv
done done