logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: 1201fb0562ee358c1ad68f7ca60fc91f926e749c
parent f023f587c157540b094e01228fca77d643a423ad
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  9 Mar 2023 00:28:25 +0100

ninja: Avoid pipes for bookmarks.html

Diffstat:

M.gitignore1+
Rbookmarks.xsl -> bookmarks.xsl.in0
Mbuild.ninja9++++++---
Mconfig.ninja4+++-
Mconfigure4+++-
5 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,3 +2,4 @@ *.swo config.php datalove +/bookmarks.xsl diff --git a/bookmarks.xsl b/bookmarks.xsl.in diff --git a/build.ninja b/build.ninja @@ -1,7 +1,10 @@ # Written by hand +rule xinclude + command = xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean --output $out $in + rule xslt - command = xsltproc --nonet $in | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' >|$out + command = xsltproc --nonet --xincludestyle --xinclude -o $out $in rule article command = xsltproc --nonet --param feedURL "'https://hacktivis.me/feed.atom'" $in | xmllint --xinclude --encode utf-8 --nofixup-base-uris --nsclean - | sed '1d' >|$out @@ -13,6 +16,8 @@ build notes/index.xhtml: notes_index ./notes | ./notes_index.pm rule dot command = dot -T$format -o$out $in +include config.ninja + build images/linux-audio-output.png: dot images/linux-audio-output.dot format = png build images/linux-audio-output.svg: dot images/linux-audio-output.dot @@ -26,5 +31,3 @@ build images/linux-audio-output-current.png: dot images/linux-audio-output-curre format = png build images/linux-audio-output-current.svg: dot images/linux-audio-output-current.dot format = svg - -include config.ninja diff --git a/config.ninja b/config.ninja @@ -4,5 +4,7 @@ rule gen_config generator = 1 build config.ninja: gen_config configure | ./articles -build bookmarks.html: xslt bookmarks.xsl bookmarks.xbel | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml + +build bookmarks.xsl: xinclude bookmarks.xsl.in | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml +build bookmarks.html: xslt bookmarks.xsl bookmarks.xbel build articles/2022$ Summary.html: article entry.xsl articles/2022$ Summary.xml | ./templates/head.xml ./templates/en/nav.xsl ./templates/en/footer.shtml diff --git a/configure b/configure @@ -8,7 +8,9 @@ rule gen_config generator = 1 build config.ninja: gen_config configure | ./articles -build bookmarks.html: xslt bookmarks.xsl bookmarks.xbel | ${templates_en} + +build bookmarks.xsl: xinclude bookmarks.xsl.in | ${templates_en} +build bookmarks.html: xslt bookmarks.xsl bookmarks.xbel EOF for i in articles/*.xml