From 0939258be1e7bcf780814d8667f7bf6ca684f673 Mon Sep 17 00:00:00 2001 From: defanor Date: Thu, 26 Apr 2018 02:17:17 +0300 Subject: Add authoring tools --- tools/html-to-atom.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 tools/html-to-atom.sh (limited to 'tools/html-to-atom.sh') diff --git a/tools/html-to-atom.sh b/tools/html-to-atom.sh new file mode 100755 index 0000000..aa665b0 --- /dev/null +++ b/tools/html-to-atom.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Composes an atom feed out of XHTML files. + +BASEDIR=~/homepage +TOOLS="${BASEDIR}/tools" +SOURCES="${BASEDIR}/src" +ATOM="${BASEDIR}/atom.xml" + +(echo '' && + echo '' && + find "${BASEDIR}" -name '*.xhtml' | + grep -Ev "^(${TOOLS}|${SOURCES}).*" | + sed -e "sS^${BASEDIR}\(.*\)SS" && + echo '') | + xsltproc "${TOOLS}/html-to-atom-dump.xsl" - | + xsltproc "${TOOLS}/atom-sort.xsl" - | + xsltproc "${TOOLS}/atom-limit.xsl" - | + xmllint --format --nsclean - > "${ATOM}" -- cgit v1.2.3