aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix16
-rw-r--r--source/01_raw/article_feed.xsl10
-rwxr-xr-xutility/fetch_feed.sh2
3 files changed, 14 insertions, 14 deletions
diff --git a/default.nix b/default.nix
index d2c031d..36edbe9 100644
--- a/default.nix
+++ b/default.nix
@@ -1,10 +1,6 @@
-{ system ? builtins.currentSystem }:
+{ pkgs ? import <nixpkgs> { }, mypkgs ? import <mypkgs> { }, ... }:
-let
- pkgs = import <nixpkgs> { inherit system; };
- mypkgs = import (fetchTarball "https://pkgs.kummerlaender.eu/nixexprs.tar.gz") { };
-
-in pkgs.stdenv.mkDerivation {
+pkgs.stdenv.mkDerivation {
name = "Overview";
src = ./.;
@@ -18,7 +14,13 @@ in pkgs.stdenv.mkDerivation {
mypkgs.make-xslt
];
- installPhase = ''
+ installPhase = let
+ blog_feed = builtins.fetchurl {
+ url = "https://blog.kummerlaender.eu/atom.xml";
+ };
+ in ''
+ cp ${blog_feed} source/00_content/article_feed.xml
+
make-xslt
mkdir $out
cp -Lr target/99_result/* $out
diff --git a/source/01_raw/article_feed.xsl b/source/01_raw/article_feed.xsl
index 96f918d..18c8d51 100644
--- a/source/01_raw/article_feed.xsl
+++ b/source/01_raw/article_feed.xsl
@@ -2,7 +2,6 @@
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:InputXSLT="function.inputxslt.application"
exclude-result-prefixes="InputXSLT"
>
@@ -11,14 +10,13 @@
<xsl:include href="[utility/remove_namespace.xsl]"/>
<xsl:variable name="meta">
- <datasource type="main" mode="full" source="00_content/meta.xml" target="meta"/>
+ <datasource type="main" mode="full" source="00_content/article_feed.xml" target="feed"/>
+ <datasource type="support" mode="full" source="00_content/meta.xml" target="meta"/>
<target mode="plain" value="article_feed.xml"/>
</xsl:variable>
-<xsl:template match="meta">
- <xsl:apply-templates mode="remove_namespace" select="InputXSLT:external-command(
- 'curl http://blog.kummerlaender.eu/atom.xml'
- )/self::command/atom:feed/atom:entry[position() &lt;= $root/meta/overview/article_count]"/>
+<xsl:template match="feed">
+ <xsl:apply-templates mode="remove_namespace" select="entry[position() &lt;= $root/meta/overview/article_count]"/>
</xsl:template>
</xsl:stylesheet>
diff --git a/utility/fetch_feed.sh b/utility/fetch_feed.sh
index 45dbc6c..37393f6 100755
--- a/utility/fetch_feed.sh
+++ b/utility/fetch_feed.sh
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/usr/bin/env sh
curl $1 | sed -e 's~^\([\*]\)\{3\}~\t\t\*~g' -e 's~^\([\*]\)\{2\}~\t\*~g'