paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 093d9d1381c112d0869648ecfee0da66378e8b84
parent 375e2c6db3f6e9d5a1c309d44c6b3a60094132f1
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat, 23 May 2020 22:31:44 -0400

Merge branch 'master' of git.sr.ht:~jbauer/paritybit.ca

Diffstat:
Mcompile | 42+++++++++++++++++++++---------------------
Mpages/links.md | 5+++++
2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/compile b/compile @@ -150,28 +150,28 @@ compile_md() set_html_title() { - title=$(head -n1 $file | cut -d' ' -f2-) + title="$(head -n1 "$file" | cut -d' ' -f2-)" print_info_msg "Setting <title>: \"$title\"" - sed -i "s/<title>.*<\/title>/<title>$title - $siteName<\/title>/" \ + sed -i -e "s/<title>.*<\/title>/<title>$title - $siteName<\/title>/" \ "$outputFile" } set_html_meta() { - meta=$(head -n3 $file | tail -n1 \ - | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//') + meta="$(head -n3 "$file" | tail -n1 \ + | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//')" print_info_msg "Setting <meta> description" - sed -i "s/content=\"\"/content=$meta/" "$outputFile" + sed -i -e "s/content=\"\"/content=$meta/" "$outputFile" } set_html_csslink() { - cssList=$(head -n5 $file | tail -n1 \ - | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//') + cssList="$(head -n5 "$file" | tail -n1 \ + | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//')" print_info_msg "Adding CSS <link>s" echo "$cssList" | tr ' ' '\n' | while read cssFile; do cssFile="/css/$(echo "$cssFile" | tr -d '"')" - sed -i "/<title>/a\ \ \ \ <link rel=\"stylesheet\" href=\"$cssFile\">" \ + sed -i -e "/<title>/a\ \ \ \ <link rel=\"stylesheet\" href=\"$cssFile\">" \ "$outputFile" done } @@ -179,15 +179,15 @@ set_html_csslink() # This still feels a bit messy set_html_toc() { - tocList=$(head -n7 $file | tail -n1 \ - | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//' | tr -d '"') + tocList="$(head -n7 "$file" | tail -n1 \ + | cut -d'#' -f2 | sed -e 's/^[[:space:]]*//' | tr -d '"')" print_info_msg "Adding Table of Contents" if [ -z "$tocList" ]; then return 0 fi - sed -i "/TOC/a <div id=\"table-of-contents\" aria-label=\"Table of Contents\">\n<h2 id=\"toc-title\">Table of Contents</h2>" \ + sed -i -e "/TOC/a <div id=\"table-of-contents\" aria-label=\"Table of Contents\">\n<h2 id=\"toc-title\">Table of Contents</h2>" \ "$outputFile" - sed -i "/toc-title/a </ul></div>" "$outputFile" + sed -i -e "/toc-title/a </ul></div>" "$outputFile" echo "$tocList" | tr ';' '\n' \ | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }' \ | while read tocEntry; do @@ -196,30 +196,30 @@ set_html_toc() tocEntry="$(echo "$tocEntry" | cut -d':' -f2-)" tocEntryId="$(echo "$tocEntry" | tr ' ' '-' \ | tr '[:upper:]' '[:lower:]' )" - sed -i "/toc-title/a <ul><ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul></ul>" \ + sed -i -e "/toc-title/a <ul><ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul></ul>" \ "$outputFile" - sed -i "/<h5>$tocEntry<\/h5>/i </section>\n<section>" \ + sed -i -e "/<h5>$tocEntry<\/h5>/i </section>\n<section>" \ "$outputFile" elif echo "$tocEntry" | grep -qi "^sub:"; then tocEntry="$(echo "$tocEntry" | cut -d':' -f2-)" tocEntryId="$(echo "$tocEntry" | tr ' ' '-' \ | tr '[:upper:]' '[:lower:]' )" - sed -i "/toc-title/a <ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul>" \ + sed -i -e "/toc-title/a <ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul>" \ "$outputFile" - sed -i "/<h4>$tocEntry<\/h4>/i </section>\n<section>" \ + sed -i -e "/<h4>$tocEntry<\/h4>/i </section>\n<section>" \ "$outputFile" else tocEntryId="$(echo "$tocEntry" | tr ' ' '-' \ | tr '[:upper:]' '[:lower:]' )" - sed -i "/toc-title/a <li><a href=\"#$tocEntryId\">$tocEntry</a></li>" \ + sed -i -e "/toc-title/a <li><a href=\"#$tocEntryId\">$tocEntry</a></li>" \ "$outputFile" - sed -i "/<h3>$tocEntry<\/h3>/i </section\>\n<section>" \ + sed -i -e "/<h3>$tocEntry<\/h3>/i </section\>\n<section>" \ "$outputFile" fi done - sed -i "/toc-title/a <ul>" "$outputFile" - sed -i "/END OF HEADER FILE/a <section>" "$outputFile" - sed -i "/<\/main>/i </section>" "$outputFile" + sed -i -e "/toc-title/a <ul>" "$outputFile" + sed -i -e "/END OF HEADER FILE/a <section>" "$outputFile" + sed -i -e "/<\/main>/i </section>" "$outputFile" } for file in "$@"; do diff --git a/pages/links.md b/pages/links.md @@ -51,6 +51,11 @@ * [Should I Block Ads?](https://shouldiblockads.com/) +* [Tech’s Masturbatory Historiography](https://medium.com/@enkiv2/techs-masturbatory-historiography-6d7ae12abf1f) - + A criticism of the way we look at the history of technology when, in + reality, we are so far off the mark of what the creator's originally + envisioned. + ### Writing * [George Orwell's Essay: Politics and the English Language](https://www.orwell.ru/library/essays/politics/english/e_polit/) -