diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-03-08 23:44:27 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-03-09 12:10:37 +0100 |
commit | 8c65b680deedef8ff2884a541c969b55592cfd0f (patch) | |
tree | babf472bfce5acb393f739729bf857ae1e9d7d7f | |
parent | d7682676ac92f1b83a68550ae2c7b8862c9867c3 (diff) | |
download | libgweather-8c65b680deedef8ff2884a541c969b55592cfd0f.tar.gz |
Revert "data: Add temporary script to move <location>s"
This reverts commit 5583da22fbe1d56e0280cdf37deeed5b146574e9.
Now that the script has been used, no need to keep it around.
https://bugzilla.gnome.org/show_bug.cgi?id=792328
-rw-r--r-- | data/locations-flatten.xsl | 32 | ||||
-rw-r--r-- | data/locations-reorder.xsl | 42 | ||||
-rwxr-xr-x | data/locations-to-country.sh | 10 |
3 files changed, 0 insertions, 84 deletions
diff --git a/data/locations-flatten.xsl b/data/locations-flatten.xsl deleted file mode 100644 index 3eab604..0000000 --- a/data/locations-flatten.xsl +++ /dev/null @@ -1,32 +0,0 @@ -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - <xsl:output indent="yes" encoding="utf-8" doctype-system="locations.dtd"/> - <xsl:strip-space elements="*"/> - <xsl:preserve-space elements="timezone"/> - -<!-- TODO: - - move locations to the top of their container, so - <state> - <location/> - <city/> - </state> - - - de-duplicate locations - - don't rewrite <timezone id="Africa/Algiers" /> to - <timezone id="Africa/Algiers"/> ---> - - <xsl:template match="node()|@*"> - <xsl:copy> - <xsl:apply-templates select="node()|@*"/> - </xsl:copy> - </xsl:template> - - <xsl:template match="city[location]"> - <xsl:apply-templates select="location"/> - <xsl:copy> - <xsl:apply-templates select="node()[not(self::location)]|@*"/> - </xsl:copy> - </xsl:template> - -</xsl:stylesheet> diff --git a/data/locations-reorder.xsl b/data/locations-reorder.xsl deleted file mode 100644 index fdfc180..0000000 --- a/data/locations-reorder.xsl +++ /dev/null @@ -1,42 +0,0 @@ -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - <xsl:output indent="yes" encoding="utf-8" doctype-system="locations.dtd"/> - <xsl:strip-space elements="*"/> - <xsl:preserve-space elements="timezone"/> - - <xsl:template match="node()|@*"> - <xsl:copy> - <xsl:apply-templates select="node()|@*"/> - </xsl:copy> - </xsl:template> - - <xsl:template match="country"> - <xsl:copy> - <xsl:apply-templates select="comment()[following-sibling::_name]"/> - <xsl:apply-templates select="_name"/> - <xsl:apply-templates select="comment()[not(following-sibling::_name)]"/> - <xsl:apply-templates select="iso-code"/> - <xsl:apply-templates select="fips-code"/> - <xsl:apply-templates select="timezones"/> - <xsl:apply-templates select="tz-hint"/> - <xsl:apply-templates select="location"/> - <xsl:apply-templates select="state"/> - <xsl:apply-templates select="city"/> - </xsl:copy> - </xsl:template> - - <xsl:template match="state"> - <xsl:copy> - <xsl:apply-templates select="comment()[following-sibling::_name]"/> - <xsl:apply-templates select="_name"/> - <xsl:apply-templates select="comment()[not(following-sibling::_name)]"/> - <xsl:apply-templates select="iso-code"/> - <xsl:apply-templates select="fips-code"/> - <xsl:apply-templates select="timezones"/> - <xsl:apply-templates select="tz-hint"/> - <xsl:apply-templates select="location"/> - <xsl:apply-templates select="city"/> - </xsl:copy> - </xsl:template> - -</xsl:stylesheet> diff --git a/data/locations-to-country.sh b/data/locations-to-country.sh deleted file mode 100755 index 632d468..0000000 --- a/data/locations-to-country.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e - - -git checkout Locations.xml -TMPFILE=`mktemp` - -xsltproc --path `pwd` locations-flatten.xsl Locations.xml > $TMPFILE && \ - xsltproc --path `pwd` locations-reorder.xsl $TMPFILE | \ - sed 's,"/>," />,' | \ - sed 's, <!-- Could not find information about the following stations:,<!-- Could not find information about the following stations:,' > Locations.xml |