logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 39a7224caaca1b841a510ef797f5d4a9c963eaf7
parent 5fce7ebe73ec11fc8ee8c03e401a3762c9dc8cc2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  2 Mar 2023 18:17:26 +0100

notes/index.xhtml: New

Diffstat:

MMakefile18+++++++++++-------
Anotes/index.xhtml58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Anotes_index.pm52++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 121 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,29 +1,33 @@ TEMPLATES_EN = templates/head.xml templates/en/nav.xsl templates/en/footer.shtml .PHONY: all -all: bookmarks.html linux-audio-output images/avatar.png images/avatar_HD.png articles/2022\ Summary.html +all: bookmarks.html notes/index.xhtml linux-audio-output images/avatar.png images/avatar_HD.png articles/2022\ Summary.html bookmarks.html: bookmarks.xbel bookmarks.xsl $(TEMPLATES_EN) - xsltproc --nonet bookmarks.xsl bookmarks.xbel | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' > $@ + xsltproc --nonet bookmarks.xsl bookmarks.xbel | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' >|$@ articles/2022\ Summary.html: articles/2022\ Summary.xml entry.xsl $(TEMPLATES_EN) - xsltproc --nonet --param feedURL "'https://hacktivis.me/feed.atom'" entry.xsl articles/2022\ Summary.xml | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' > "$@" + xsltproc --nonet --param feedURL "'https://hacktivis.me/feed.atom'" entry.xsl articles/2022\ Summary.xml | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' >|"$@" .PHONY: linux-audio-output linux-audio-output: images/linux-audio-output.png images/linux-audio-output.svg images/linux-audio-output-current.png images/linux-audio-output-current.svg images/linux-audio-output.png: images/linux-audio-output.dot - dot -Tpng $< > $@ + dot -Tpng $< >|$@ images/linux-audio-output.svg: images/linux-audio-output.dot - dot -Tsvg $< > $@ + dot -Tsvg $< >|$@ images/linux-audio-output-current.dot: images/linux-audio-output.dot images/linux-audio-output-obsolete.txt grep -v -f images/linux-audio-output-obsolete.txt $< > $@ sed -i 's;Linux Audio Output APIs[^"]*;Linux Audio Output APIs (current-only);' $@ images/linux-audio-output-current.png: images/linux-audio-output-current.dot - dot -Tpng $< > $@ + dot -Tpng $< >|$@ images/linux-audio-output-current.svg: images/linux-audio-output-current.dot - dot -Tsvg $< > $@ + dot -Tsvg $< >|$@ + +.PHONY: notes/index.xhtml +notes/index.xhtml: notes_index.pm + ./notes_index.pm >|$@ diff --git a/notes/index.xhtml b/notes/index.xhtml @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> +<!--#include file="/templates/head.shtml" --> + <title>Index of /notes/</title> + </head> + <body> +<!--#include file="/templates/en/nav.shtml" --> + <main> + <ul> + <li><a href="0001-autotools-Lazily-change-libGL-to-libOpenGL.patch">0001-autotools-Lazily-change-libGL-to-libOpenGL.patch</a></li> + <li><a href="NETGEAR%20ReadyNAS%20Duo%20v2">NETGEAR ReadyNAS Duo v2</a></li> + <li><a href="PDAs">PDAs</a></li> + <li><a href="PPC.txt">PPC.txt</a></li> + <li><a href="SSH%20Daemon%20Comparison.md">SSH Daemon Comparison.md</a></li> + <li><a href="VR-wayland.gmi">VR-wayland.gmi</a></li> + <li><a href="ansi.txt">ansi.txt</a></li> + <li><a href="bc.txt">bc.txt</a></li> + <li><a href="bootstrapping">bootstrapping</a></li> + <li><a href="ciphers.txt">ciphers.txt</a></li> + <li><a href="cloudchaser-issues">cloudchaser-issues</a></li> + <li><a href="computing-truths.txt">computing-truths.txt</a></li> + <li><a href="contributions">contributions</a></li> + <li><a href="drivers">drivers</a></li> + <li><a href="editors">editors</a></li> + <li><a href="feeds">feeds</a></li> + <li><a href="font-test">font-test</a></li> + <li><a href="font-test.js">font-test.js</a></li> + <li><a href="free_ipv6.txt">free_ipv6.txt</a></li> + <li><a href="gitlab">gitlab</a></li> + <li><a href="index">index</a></li> + <li><a href="license-pick">license-pick</a></li> + <li><a href="minitel2.txt">minitel2.txt</a></li> + <li><a href="native-terms">native-terms</a></li> + <li><a href="native-terms/countries.txt">native-terms/countries.txt</a></li> + <li><a href="native-terms/languages.txt">native-terms/languages.txt</a></li> + <li><a href="new-install-checklist">new-install-checklist</a></li> + <li><a href="oric-atmos">oric-atmos</a></li> + <li><a href="osu%21">osu!</a></li> + <li><a href="petitions">petitions</a></li> + <li><a href="phone-required-features">phone-required-features</a></li> + <li><a href="pure-wayland">pure-wayland</a></li> + <li><a href="pure_wayland_T495_glewinfo.log">pure_wayland_T495_glewinfo.log</a></li> + <li><a href="pure_wayland_T495_glinfo.log">pure_wayland_T495_glinfo.log</a></li> + <li><a href="review%3A%20Anti-Capitalist%20Software%20License%20v%201.4.txt">review: Anti-Capitalist Software License v 1.4.txt</a></li> + <li><a href="right_tool">right_tool</a></li> + <li><a href="services">services</a></li> + <li><a href="sucks.txt">sucks.txt</a></li> + <li><a href="systems.json">systems.json</a></li> + <li><a href="tips.md">tips.md</a></li> + <li><a href="tuple_truth_table.txt">tuple_truth_table.txt</a></li> + <li><a href="unix-defects">unix-defects</a></li> + <li><a href="zfs">zfs</a></li> + </ul> + </main> +<!--#include file="/templates/en/footer.shtml" --> + </body> +</html> diff --git a/notes_index.pm b/notes_index.pm @@ -0,0 +1,52 @@ +#!/usr/bin/env perl +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# SPDX-License-Identifier: MIT +use File::Find; +use URI::Escape; + +my @content; + +sub wanted { + my $fn = $File::Find::name; + + $fn =~ s@^\./@@; + + # try_files $uri $uri.shtml $uri.html $uri.xhtml $uri/ =404; + $fn =~ s@\.(s|x)?html$@@; + + if($fn !~ /^\.$/) { + push @content, $fn; + } + + return; +} + +chdir('./notes/'); + +find( \&wanted, './'); + +print '<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> +<!--#include file="/templates/head.shtml" --> + <title>Index of /notes/</title> + </head> + <body> +<!--#include file="/templates/en/nav.shtml" --> + <main> + <ul> +'; + +foreach(sort(@content)) { + my $raw = $_; + my $escaped = uri_escape_utf8($raw); + $escaped =~ s@%2F@/@; + print ' <li><a href="', $escaped, '">', $raw, "</a></li>\n"; +}; + +print ' </ul> + </main> +<!--#include file="/templates/en/footer.shtml" --> + </body> +</html> +';