Updated readme

This commit is contained in:
Ben Ashton 2022-09-25 19:03:28 -06:00
parent 70c3c428ac
commit 5063197c0b

View File

@ -40,26 +40,26 @@ printf '%s\n' '<!doctype html>';
printf '%s\n' '<html>'; printf '%s\n' '<html>';
printf '%s\n' ' <head>'; printf '%s\n' ' <head>';
printf '%s' ' <title>'; 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' '</title>';
printf '%s\n' ' </head>'; printf '%s\n' ' </head>';
printf '%s\n' ' <body>'; printf '%s\n' ' <body>';
printf '%s' ' <h1>Welcome to '; 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' '</h1>';
printf '%s\n' ' <p>From the following restaurants:</p>'; printf '%s\n' ' <p>From the following restaurants:</p>';
printf '%s\n' ' <ul>'; printf '%s\n' ' <ul>';
# Loop through restaurants and display each one # Loop through restaurants and display each one
while read -r restaurant; do while read -r restaurant; do
printf '%s' ' <li>'; 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>'; printf '%s\n' '</li>';
done <restaurants.txt done <restaurants.txt
printf '%s\n' ' </ul>'; printf '%s\n' ' </ul>';
printf '%s\n' ' <p>'; printf '%s\n' ' <p>';
printf '%s\n' ' The fates have decided that you shall eat at:'; printf '%s\n' ' The fates have decided that you shall eat at:';
printf '%s' ' <strong>'; 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' '</strong>';
printf '%s\n' ' </p>'; printf '%s\n' ' </p>';
printf '%s\n' ' </body>'; printf '%s\n' ' </body>';