Increase performance further by storing rendered output

This commit is contained in:
Michael De Roover 2020-10-25 06:04:42 +01:00
parent 7251cefc94
commit 9f8786dd39
Signed by: vim
GPG Key ID: 075496E232CE04CB
1 changed files with 8 additions and 1 deletions

9
cv
View File

@ -59,7 +59,7 @@ frame(){
bot) printf "╚ %-${w}s ═ %-${w}s ═ %-${w}s ╝\n" | sed "s/\ /═/g" ;;
esac
}
result(){
parse(){
frame top
title "Queried at $date for $(get country)."
frame up
@ -98,6 +98,13 @@ result(){
frame down
fi
}
result(){
if [ ! -f "$data/$date-$country-out" ]
then
parse > "$data/$date-$country-out"
fi
cat "$data/$date-$country-out"
}
# Main code starts here.
if [ ! -z "$country" ]