blob: 6fb2e014a64a64b5f539bc274019e2115af74a64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
# Composes an atom feed out of XHTML files.
BASEDIR=~/homepage
TOOLS="${BASEDIR}/tools"
SOURCES="${BASEDIR}/src"
ATOM="${BASEDIR}/atom.xml"
(echo '<?xml version="1.0" encoding="UTF-8"?>' &&
echo '<list>' &&
find "${BASEDIR}" -name '*.xhtml' |
grep -Ev "^(${TOOLS}|${SOURCES}).*" |
sed -e "sS^${BASEDIR}/\(.*\)S<entry name=\"\\1\" />S" &&
echo '</list>') |
xsltproc "${TOOLS}/html-to-atom-dump.xsl" - |
xsltproc "${TOOLS}/atom-sort.xsl" - |
xsltproc "${TOOLS}/atom-limit.xsl" - |
xmllint --format --nsclean - > "${ATOM}"
|