diff --git a/pagecontents.sh b/pagecontents.sh index 360c914..6de7180 100755 --- a/pagecontents.sh +++ b/pagecontents.sh @@ -1,5 +1,7 @@ #!/usr/bin/bash +#this script prints the terminal output which will be piped to aha to generate the webpage. terminal styling will be preserved + script -qc 'hyfetch -p transgender --distro wii-linux-ngx' | sed 's|'"${USER}"'|\r'"${USER}"'|' | grep -v 'Local IP' printf '\n%s\n' 'The above output is actually generated by hyfetch on my Wii! It updates every 15 minutes.' printf '%s\n\n' "last updated: $(date)" diff --git a/update-readme.sh b/update-readme.sh index 72a5138..280909e 100755 --- a/update-readme.sh +++ b/update-readme.sh @@ -1,4 +1,6 @@ #!/usr/bin/bash +#this script generates an ansi-encoded readme.txt which can be printed to the terminal so style encodings are preserved without needing to rerun the below script for every page update + #sudo mkdir -p /etc/wii-server script -qc '~/venv/bin/rich README.md 2> /dev/null' | unbuffer -p cat | tee readme.txt diff --git a/update-webpage.sh b/update-webpage.sh index a4335a4..b1b3dc4 100755 --- a/update-webpage.sh +++ b/update-webpage.sh @@ -1,3 +1,5 @@ #!/usr/bin/bash -~/wii-server-setup/pagecontents.sh | aha -b -t 'Wii Linux Static Webpage Demo' | sed 's|'"$USER"'\@|
'$USER'\@|' | tee /usr/local/share/nginx/html/index.html +#This script prints converts the output of pagecontents.sh to an html file at the local nginx root + +~/wii-server-setup/pagecontents.sh | aha -b -t 'Wii Linux Static Webpage Demo' | tee /usr/local/share/nginx/html/index.html