Skip to content

Instantly share code, notes, and snippets.

@JanKoppe

JanKoppe/README.md

Last active Dec 9, 2019
Embed
What would you like to do?
36C3: Pretalx XML filter out track
#!/bin/bash
set -euo pipefail
# requires curl and xmlstarlet
/usr/bin/curl https://fahrplan.chaos-west.de/36c3/schedule/export/schedule.xml -s | /usr/bin/xmlstarlet tr /root/filter_fahrplan.xsl - > /mnt/data/files-jankoppe.de/36c3/chaos-west-schedule-filtered.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:theia="http://www.theia.org.uk/ILR/2011-12/1">
<!-- identity template -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- filter based on track value; omit Klangteppich track events -->
<xsl:template match="schedule/day/room/event[track = 'Klangteppich']"></xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.