summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/console/bug.urls4
-rw-r--r--gentoobrowse/console/bugimport.xml30
-rw-r--r--gentoobrowse/console/bugs.xslt14
3 files changed, 22 insertions, 26 deletions
diff --git a/gentoobrowse/console/bug.urls b/gentoobrowse/console/bug.urls
new file mode 100644
index 0000000..e010635
--- /dev/null
+++ b/gentoobrowse/console/bug.urls
@@ -0,0 +1,4 @@
+http://bugs.gentoo.org/data/cached/buglist-UNCONFIRMED.htmlgz
+http://bugs.gentoo.org/data/cached/buglist-ASSIGNED.htmlgz
+http://bugs.gentoo.org/data/cached/buglist-REOPENED.htmlgz
+http://bugs.gentoo.org/data/cached/buglist-NEW.htmlgz
diff --git a/gentoobrowse/console/bugimport.xml b/gentoobrowse/console/bugimport.xml
index 738a62f..2b1bb4f 100644
--- a/gentoobrowse/console/bugimport.xml
+++ b/gentoobrowse/console/bugimport.xml
@@ -2,19 +2,25 @@
<bugimport name="bugimport" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:project2="http://project2.randomdan.homeip.net">
<xi:include href="../datasources/postgres.xml" />
- <project2:procrows name="bugsourceUnc" newline="&#10;" encoding="utf-8" fieldSep="," quoteChar="&quot;"
- path="xsltproc -novalid console/bugs.xslt http://bugs.gentoo.org/data/cached/buglist-UNCONFIRMED.htmlgz" />
- <project2:procrows name="bugsourceAss" newline="&#10;" encoding="utf-8" fieldSep="," quoteChar="&quot;"
- path="xsltproc -novalid console/bugs.xslt http://bugs.gentoo.org/data/cached/buglist-ASSIGNED.htmlgz" />
- <project2:procrows name="bugsourceROp" newline="&#10;" encoding="utf-8" fieldSep="," quoteChar="&quot;"
- path="xsltproc -novalid console/bugs.xslt http://bugs.gentoo.org/data/cached/buglist-REOPENED.htmlgz" />
- <project2:procrows name="bugsourceNew" newline="&#10;" encoding="utf-8" fieldSep="," quoteChar="&quot;"
- path="xsltproc -novalid console/bugs.xslt http://bugs.gentoo.org/data/cached/buglist-NEW.htmlgz" />
+ <project2:filerows name="bugurls" newline="&#10;" encoding="ascii" fieldSep="" quoteChar="" path="console/bug.urls">
+ <columns>
+ <column>url</column>
+ </columns>
+ </project2:filerows>
+ <project2:xslrows name="buglist" html="true" warnings="false">
+ <url source="parent" name="url" depth="1" />
+ <filterview name="bugdetails" root="/html/body/div/ul/li/a">
+ <field name="bugid" xpath="substring-before(substring-after(.,'Bug:'),' ')" />
+ <field name="summary" xpath="em" />
+ <field name="status" xpath="substring-before(substring-after(.,'status:'),' ')" />
+ <field name="severity" xpath="substring-after(.,'severity:')" />
+ </filterview>
+ </project2:xslrows>
+
<project2:sqlmerge name="bugimport" datasource="postgres" targettable="bugs">
- <project2:iterate name="Unc" source="bugsourceUnc" />
- <project2:iterate name="Ass" source="bugsourceAss" />
- <project2:iterate name="ROp" source="bugsourceROp" />
- <project2:iterate name="New" source="bugsourceNew" />
+ <project2:iterate name="eachurl" source="bugurls">
+ <project2:iterate name="eachbug" source="buglist" filter="bugdetails" />
+ </project2:iterate>
<columns>
<column key="true">bugid</column>
<column>severity</column>
diff --git a/gentoobrowse/console/bugs.xslt b/gentoobrowse/console/bugs.xslt
deleted file mode 100644
index a084a78..0000000
--- a/gentoobrowse/console/bugs.xslt
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/xhtml"
-xmlns:str="http://exslt.org/strings" extension-element-prefixes="str">
-<xsl:output encoding="utf-8" method="text" media-type="text/csv" indent="no"/>
-<xsl:template match="/x:html">bug_id,summary,status,severity
-<xsl:apply-templates select="/x:html/x:body/x:div/x:ul/x:li/x:a" />
-</xsl:template>
-<xsl:template match="x:li/x:a">
-<xsl:value-of select="substring-before(substring-after(.,'Bug:'),' ')" />,&quot;<xsl:value-of select="str:replace(x:em,'&quot;','&quot;&quot;')" />&quot;,<xsl:value-of select="substring-before(substring-after(.,'status:'),' ')" />,<xsl:value-of select="substring-after(.,'severity:')" />
-<xsl:text>
-</xsl:text>
-</xsl:template>
-</xsl:stylesheet>
-