commit: e7dfc206c9206b0c30086326ec84f261c1e68206
parent: 55914c4fc513db006dcb95fbed6e2d0358347a50
author: Chris Noxz <chris@noxz.tech>
date: Tue, 4 Jul 2023 11:22:40 +0200
various changes
20 files changed, 229 insertions(+), 50 deletions(-)
diff --git a/build b/build
@@ -26,6 +26,9 @@ CFG_GIT_HEAD_HTML="${CFG_DIR}/git_head.html"
# --------------------- sitemap.xml configuration files --------------------- #
CFG_SITEMAP_XML="${CFG_DIR}/sitemap.xml"
CFG_SITEMAP_XML_ITEM="${CFG_DIR}/sitemap_item.xml"
+# ------------------------ pinned tag configuration ------------------------ #
+CFG_PINNED_TAG="pinned"
+
# helper function to fix dot files if asked to do so
# shellcheck disable=SC2120
@@ -214,7 +217,8 @@ render_main_menu() {
render_main_menu_extra() {
printf '<li><a class="%s" href="%s">%s</a></li>\n' \
- "twtxt" "//[site]/twtxt.txt" "twtxt" \
+ "pin" "//[site]/articles/tags/pinned" "pinned articles" \
+ "twtxt" "//[site]/twtxt.txt" "twtxt" \
"source" "//[site]/git/" "source" \
| awk \
'
@@ -234,23 +238,28 @@ render_main_menu_extra() {
render_articles() {
# copy tag list from tags page
- [ -z "$2" ] && sed -e 's,\.ARTTAG "\([^"]*\)",.ARTTAG "tags/\1",g' \
+ [ -z "${2}" ] && sed -e 's,\.ARTTAG "\([^"]*\)",.ARTTAG "tags/\1",g' \
"${1}"/articles/tags/index.www
echo .DIVS articles
- [ -n "$2" ] && printf '.ULS\n'
- find "$1"/articles -name .metadata | while read -r article
- do
- grep "^.ds YEAR" "$article" | sed 's/^.ds YEAR[^0-9]*//g'
- done | sort -ru | while read -r year
+ [ -n "${2}" ] && printf '.ULS\n'
+ if [ "${2}" != "${CFG_PINNED_TAG}" ]; then
+ find "${1}"/articles -name .metadata | while read -r article
+ do
+ grep "^.ds YEAR" "${article}" | sed 's/^.ds YEAR[^0-9]*//g'
+ done | sort -ru
+ else
+ # merge every year for pinned articles, to sort them alphabetically
+ echo
+ fi | while read -r year
do
- [ -z "$2" ] && printf '.HnS 1\n%s\n.HnE\n\.ULS\n' "$year"
- if [ -z "$2" ]; then
- grep -l "^.ds YEAR.*$year" "$1"/articles/*/.metadata
+ [ -z "${2}" ] && printf '.HnS 1\n%s\n.HnE\n\.ULS\n' "${year}"
+ if [ -z "${2}" ]; then
+ grep -l "^.ds YEAR.*${year}" "${1}"/articles/*/.metadata
else # filter by tag
- grep -l "^${2}$" "$1"/articles/*/.tags \
+ grep -l "^${2}$" "${1}"/articles/*/.tags \
| sed 's/\.tags$/.metadata/g' \
- | xargs -I{} grep -l "^.ds YEAR.*$year" "{}"
- fi | xargs -I{} awk -v name="{}" -v tag="${2}" '
+ | xargs -I{} grep -l "^.ds YEAR.*${year}" "{}"
+ fi | xargs -I{} awk -v name="{}" -v tag="${2}" -v cfg_pinned_tag="${CFG_PINNED_TAG}" '
BEGIN {
title = ""
year = ""
@@ -264,7 +273,7 @@ render_articles() {
for(i=3;i<=NF;i++) {
title = title$i
if (i != NF)
- title = title" "
+ title = title" "
}
}
/^\.ds YEAR.*$/ {
@@ -277,15 +286,21 @@ render_articles() {
day = $3
}
END {
- if (tag != "")
+ if (tag == cfg_pinned_tag)
+ printf ".URL \"../../%s\" \"%s\"\n", name, title
+ else if (tag != "")
printf "%s %s, %s \\(em\\n .URL \"../../%s\" \"%s\"\n", day, month, year, name, title
else
printf "%s %s \\(em\\n .URL \"%s\" \"%s\"\n", day, month, name, title
}
- ' {} | sort -k 3Mr -k 2nr | sed 's/\\n /\n/g'
- [ -z "$2" ] && printf '.ULE\n'
+ ' "{}" | if [ "${2}" = "${CFG_PINNED_TAG}" ]; then
+ sort -k 4
+ else
+ sort -k 3Mr -k 2nr
+ fi | sed -e 's/\\n /\n/g'
+ [ -z "${2}" ] && printf '.ULE\n'
done
- [ -n "$2" ] && printf '.ULE\n'
+ [ -n "${2}" ] && printf '.ULE\n'
echo .DIVE
}
@@ -312,8 +327,10 @@ prerender() {
[ -f "${base_path}"/.tags ] \
&& printf '\n.DIVS wrap-list\n.ULS\n' \
&& while read -r tag; do
- tag_safe="$(echo "${tag}" | tr \ _)"
- printf '.LI\n.CLURL "../tags/%s" art-tag "%s"\n' "${tag_safe}" "${tag}"
+ if [ "${tag}" != "${CFG_PINNED_TAG}" ]; then
+ tag_safe="$(echo "${tag}" | tr \ _)"
+ printf '.LI\n.CLURL "../tags/%s" art-tag "%s"\n' "${tag_safe}" "${tag}"
+ fi
done < "${base_path}"/.tags && printf '.ULE\n.DIVE\n\n'
[ -f "${base_path}"/.edit ] \
@@ -1110,16 +1127,19 @@ main() {
tag_safe="$(echo "${tag}" | tr \ _)"
mkdir -p "${1}"/articles/tags/"${tag_safe}"
touch "${1}"/articles/tags/"${tag_safe}"/.buildignore
+ [ "${tag}" != "${CFG_PINNED_TAG}" ] && \
printf '.URL ../.. Articles\ntagged "%s"\n' "${tag}" > "${1}"/articles/tags/"${tag_safe}"/index.www
echo "{:articles#${tag}:}" >> "${1}"/articles/tags/"${tag_safe}"/index.www
echo "index.html" > "${1}"/articles/tags/"${tag_safe}"/.assemble
echo ".ds TITLE #${tag}" > "${1}"/articles/tags/"${tag_safe}"/.metadata
- # append tag to tags page
- printf '.LI\n.ARTTAG "%s" "%s" "%s"\n' \
- "${tag_safe}" "${tag}" \
- "$(grep "^${tag}$" "${1}"/articles/*/.tags | wc -l)" \
- >> "${1}"/articles/tags/index.www
+ if [ "${tag}" != "${CFG_PINNED_TAG}" ]; then
+ # append tag to tags page
+ printf '.LI\n.ARTTAG "%s" "%s" "%s"\n' \
+ "${tag_safe}" "${tag}" \
+ "$(grep "^${tag}$" "${1}"/articles/*/.tags | wc -l)" \
+ >> "${1}"/articles/tags/index.www
+ fi
done
printf '.ULE\n' >> "${1}"/articles/tags/index.www
printf '.DIVE\n' >> "${1}"/articles/tags/index.www
diff --git a/git.noxz.tech/pub/style.css b/git.noxz.tech/pub/style.css
@@ -100,6 +100,10 @@ pre {
tab-size : 4;
}
+pre a:target {
+ background : #efefef;
+}
+
pre a.line {
display : inline-block;
text-align : right;
@@ -120,16 +124,28 @@ pre a.h {
text-decoration : none;
}
+pre a.h:target {
+ background : #efefff;
+}
+
pre a.i, table span.i {
color : #080;
text-decoration : none;
}
+pre a.i:target {
+ background : #efffef;
+}
+
pre a.d, table span.d {
color : #d00;
text-decoration : none;
}
+pre a.d:target {
+ background : #ffefef;
+}
+
pre b.r {
color : #808;
padding-left : 1em;
diff --git a/noxz.tech/articles/divisibility_theorems_and_fraction_flipping/index.www b/noxz.tech/articles/divisibility_theorems_and_fraction_flipping/index.www
@@ -76,7 +76,7 @@ This theorem is quite easy to remember. Every integer is divisible by 1.
.DIVS theorem
.EQ
-1 ~|~ a ~iff~ a ~\[mo]~ Z\h'-.83m'Z
+1 ~|~ a ~iff~ a ~\[mo]~ "Z\h'-.83m'Z"
.EN
.DIVE
diff --git a/noxz.tech/articles/manual-eduroam-connection/.assemble b/noxz.tech/articles/manual-eduroam-connection/.assemble
@@ -0,0 +1 @@
+index.html
diff --git a/noxz.tech/articles/manual-eduroam-connection/.buildignore b/noxz.tech/articles/manual-eduroam-connection/.buildignore
diff --git a/noxz.tech/articles/manual-eduroam-connection/.metadata b/noxz.tech/articles/manual-eduroam-connection/.metadata
@@ -0,0 +1,6 @@
+.ds YEAR 2023
+.ds MONTH April
+.ds DAY 03
+.ds DATE \*[MONTH] \*[DAY], \*[YEAR]
+.ds TITLE Manual eduroam connection
+.ds AUTHOR Chris Noxz
diff --git a/noxz.tech/articles/manual-eduroam-connection/.tags b/noxz.tech/articles/manual-eduroam-connection/.tags
diff --git a/noxz.tech/articles/manual-eduroam-connection/index.www b/noxz.tech/articles/manual-eduroam-connection/index.www
@@ -0,0 +1,93 @@
+This article is based somewhat on a similar
+.URL https://adamsgaard.dk/au-eduroam.html text
+written by
+.URL https://adamsgaard.dk "Anders Damsgaard" ,
+but has been generalized to fit various universities that use the
+.URL "https://en.wikipedia.org/wiki/Eduroam" eduroam
+roaming service. Although eduroam provides a solution for connection using
+Linux, it is only written for Linux and not *nix systems in general, and it
+relies somewhat on certain prerequisites that all *nix users may not have. The
+solution I will discuss only relies on the
+.ICD wpa_supplicant .
+
+Provided that you have
+.ICD wpa_supplicant
+installed, you need to extract the certificate that your university uses to
+authorize connectivity to the roaming service. Start by browsing
+.URL https://cat.eduroam.org/ https://cat.eduroam.org/
+using your favorite web browser. I would recommend using
+.URL /software/adji/ adji .
+Once there, click the button that says something like "Click here to download
+your eduroam installer". You should then be asked to select your university.
+Select the university you are affiliated with. Depending on your browser's user
+agent, an operating system will be suggested to you. If
+.I Linux
+is not suggested, click the link that says "Choose another installer to
+download" and click "Linux." An installer script will be downloaded to your
+client. Within this script, there exists a configuration section that contains
+one or multiple PEM certificates.
+
+You can extract the PEM certificate either manually or by using sed, for example
+like so (replacing
+.I installer.py
+with the name of the installer script you've downloaded):
+
+.CDS
+.COS
+echo -----BEGIN CERTIFICATE-----; \\
+sed -n '/^Config.CA = """/,/"""/{/^Config.CA = """/!{/"""/!p;};}' \\
+installer.py
+.COE
+.CDE
+
+The extracted PEM certificates should begin with
+.ICD "-----BEGIN CERTIFICATE-----"
+and end with
+.ICD "-----END CERTIFICATE-----" .
+
+Now, save the extracted PEM certificate to a place that your
+.I wpa_supplicant
+have access. Such a place could be
+.ICD "/etc/ssl/certs/my_eduroam_cert.pem" .
+What you name the file is up to you, but in this example, I will use the name
+.ICD "my_eduroam_cert.pem" .
+
+Depending on your current
+.I wpa_supplicant
+configuration, the file
+.ICD "/etc/wpa_supplicant/wpa_supplicant.conf"
+may be empty or populated with known networks. In either case, append the
+following lines to that file:
+
+.CDS
+.COS
+network={
+ ssid="eduroam"
+ key_mgmt=WPA-EAP
+ eap=TTLS PEAP
+ identity="<your eduroam username>"
+ password="<your eduroam password>"
+ ca_cert="/etc/ssl/certs/my_eduroam_cert.pem"
+ phase2="auth=MSCHAPV2"
+ mesh_fwding=1
+ frequency=5200
+}
+.COE
+.CDE
+
+You will, of course, have to change the strings
+.I "<your eduroam ...>"
+to match your eduroam identity that is registered with your university. That's
+it. The next time you use
+.ICD wpa_supplicant
+to connect to the wireless network at your university, you should be connected
+to the eduroam roaming service.
+
+.DIVS note
+Keep in mind that you should always treat public networks as insecure and
+consider any data you transmit through them as potentially collected by
+unauthorized parties, including the network owner. This can compromise your
+privacy and safety. To protect your data, consider using Tor or even better, a
+personally owned and controlled proxy instead of consumerized VPNs, which pose
+the same trust issues as a public network.
+.DIVE
diff --git a/noxz.tech/articles/sic_collection_of_papers_on_troff_and_its_companions/.metadata b/noxz.tech/articles/sic_collection_of_papers_on_troff_and_its_companions/.metadata
@@ -2,5 +2,5 @@
.ds MONTH October
.ds DAY 16
.ds DATE \*[MONTH] \*[DAY], \*[YEAR]
-.ds TITLE SiC: Collection of papers on troff and its companions
+.ds TITLE Collection of papers on troff and its companions
.ds AUTHOR Chris Noxz
diff --git a/noxz.tech/articles/sic_collection_of_papers_on_troff_and_its_companions/.tags b/noxz.tech/articles/sic_collection_of_papers_on_troff_and_its_companions/.tags
@@ -1,2 +1,3 @@
+pinned
sic
troff
diff --git a/noxz.tech/articles/sic_free_software_in_education/.edit b/noxz.tech/articles/sic_free_software_in_education/.edit
@@ -0,0 +1,3 @@
+START 2023-04-01
+ Added "How I Fought To Graduate Without Using Nonfree Software"
+END
diff --git a/noxz.tech/articles/sic_free_software_in_education/.metadata b/noxz.tech/articles/sic_free_software_in_education/.metadata
@@ -2,5 +2,5 @@
.ds MONTH July
.ds DAY 24
.ds DATE \*[MONTH] \*[DAY], \*[YEAR]
-.ds TITLE SiC: Free Software in education
+.ds TITLE Free Software in education
.ds AUTHOR Chris Noxz
diff --git a/noxz.tech/articles/sic_free_software_in_education/.tags b/noxz.tech/articles/sic_free_software_in_education/.tags
@@ -1 +1,2 @@
+pinned
sic
diff --git a/noxz.tech/articles/sic_free_software_in_education/index.www b/noxz.tech/articles/sic_free_software_in_education/index.www
@@ -16,4 +16,10 @@ teach only free software.
"Why Educational Institutions Should Use and Teach Free Software"
\(en by Richard Stallman about the main reasons why universities and schools of
all levels should use exclusively Free Software.
+
+.LIURL "https://www.gnu.org/education/how-i-fought-to-graduate-without-using-non-free-software.html" \
+"How I Fought To Graduate Without Using Nonfree Software"
+\(en by Wojciech Kosior about their struggle and fight for the cause of software
+freedom, during the pandemic, while studying informatics at the University of
+Science and Technology in Kraków, Poland.
.DLE
diff --git a/noxz.tech/articles/sic_manifestos/.metadata b/noxz.tech/articles/sic_manifestos/.metadata
@@ -2,5 +2,5 @@
.ds MONTH October
.ds DAY 07
.ds DATE \*[MONTH] \*[DAY], \*[YEAR]
-.ds TITLE SiC: Manifestos
+.ds TITLE Manifestos
.ds AUTHOR Chris Noxz
diff --git a/noxz.tech/articles/sic_manifestos/.tags b/noxz.tech/articles/sic_manifestos/.tags
@@ -1,3 +1,4 @@
+pinned
sic
hacking
open access
diff --git a/noxz.tech/pub/.assemble b/noxz.tech/pub/.assemble
@@ -1,6 +1,7 @@
logo.black.svg
logo.svg
twtxt.svg
+pin.svg
source.svg
author.svg
date.svg
diff --git a/noxz.tech/pub/pin.svg b/noxz.tech/pub/pin.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ enable-background="new 0 0 12 12"
+ width="12"
+ height="12"
+ version="1.1"
+ viewBox="0 0 12 12"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+<g>
+<polyline
+ fill="#000000"
+ points="0,3 8,3 12,6 8,9 0,9"/>
+</g>
+</svg>
diff --git a/noxz.tech/pub/style.css b/noxz.tech/pub/style.css
@@ -166,12 +166,15 @@ pre code {
}
#nav>div>ul:first-child li>a:before {
- content : "\203A";
display : inline-block;
margin-left : -1em;
width : 1em;
}
+#nav>div>ul:first-child li>a:hover:before {
+ content : "\203A";
+}
+
#nav>div>ul:first-child li.active>a:before {
content : "\00BB";
}
@@ -263,6 +266,13 @@ span.right {
text-align : right;
}
+#main .note {
+ background : #fdf8d9;
+ padding : .6rem 1rem;
+ border-radius : 0.5rem;
+ margin-bottom : 1rem;
+}
+
#main .edit-note {
background : #efd9fd;
padding : 0.1rem 1rem;
@@ -390,7 +400,7 @@ span.right {
margin : 0;
}
-a.twtxt, a.source {
+a.twtxt, a.source, a.pin {
display : block;
background : none no-repeat 0.7em center;
background-size : 0.95em;
@@ -402,6 +412,10 @@ a.twtxt {
background-image: url("./twtxt.svg");
}
+a.pin {
+ background-image: url("./pin.svg");
+}
+
a.source {
display : none !important;
background-image: url("./source.svg");
diff --git a/noxz.tech/pub/twtxt.svg b/noxz.tech/pub/twtxt.svg
@@ -1,27 +1,27 @@
-<?xml version="1.0" ?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
- enable-background="new 0 0 30 30"
- width="12"
- height="12"
- version="1.1"
- viewBox="0 0 30 30"
- xml:space="preserve"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink">
+ enable-background="new 0 0 12 12"
+ width="12"
+ height="12"
+ version="1.1"
+ viewBox="0 0 12 12"
+ xml:space="preserve"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<polyline
- clip-rule="evenodd"
- fill="#000000"
- fill-rule="evenodd"
- points="29.93,28.583 0,28.583 0,0 29.93,0 29.93,28.583"/>
+ clip-rule="evenodd"
+ fill="#000000"
+ fill-rule="evenodd"
+ points="0,0 12,0 12,12 0,12"/>
<polyline
- fill="#ffffff"
- points="4.562,7.106 25.189,7.106 25.189,10.053 4.562,10.053 4.562,7.106"/>
+ fill="#ffffff"
+ points="2,3 10,3 10,4 2,4"/>
<polyline
- fill="#ffffff"
- points="4.564,13 25.189,13 25.189,15.946 4.564,15.946 4.564,13"/>
+ fill="#ffffff"
+ points="2,5 10,5 10,6 2,6"/>
<polyline
- fill="#ffffff"
- points="4.564,18.893 16.349,18.893 16.349,21.84 4.564,21.84 4.564,18.893"/>
+ fill="#ffffff"
+ points="2,7 6,7 6,8 2,8"/>
</g>
</svg>