Browse Source

Updated readme

master
Ben Ashton 2 years ago
parent
commit
5063197c0b
  1. 8
      README.md

8
README.md

@ -40,26 +40,26 @@ printf '%s\n' '<!doctype html>';
printf '%s\n' '<html>';
printf '%s\n' ' <head>';
printf '%s' ' <title>';
printf '%s' "$title" | jq -Rrj @html;
printf '%s' "$title" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;s/'\''/\&#39;/g'
printf '%s\n' '</title>';
printf '%s\n' ' </head>';
printf '%s\n' ' <body>';
printf '%s' ' <h1>Welcome to ';
printf '%s' "$title" | jq -Rrj @html;
printf '%s' "$title" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;s/'\''/\&#39;/g'
printf '%s\n' '</h1>';
printf '%s\n' ' <p>From the following restaurants:</p>';
printf '%s\n' ' <ul>';
# Loop through restaurants and display each one
while read -r restaurant; do
printf '%s' ' <li>';
printf '%s' "$restaurant" | jq -Rrj @html;
printf '%s' "$restaurant" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;s/'\''/\&#39;/g'
printf '%s\n' '</li>';
done <restaurants.txt
printf '%s\n' ' </ul>';
printf '%s\n' ' <p>';
printf '%s\n' ' The fates have decided that you shall eat at:';
printf '%s' ' <strong>';
printf '%s' "$(shuf -n 1 restaurants.txt)" | jq -Rrj @html;
printf '%s' "$(shuf -n 1 restaurants.txt)" | sed 's/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/g;s/"/\&quot;/g;s/'\''/\&#39;/g'
printf '%s\n' '</strong>';
printf '%s\n' ' </p>';
printf '%s\n' ' </body>';

Loading…
Cancel
Save