¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>
xsltproc is your new bicycle

One occasionally needs to turn sets of Bugzilla bugs into nicely formatted html and text constructs. Bugzilla is very good about providing different this data in a variety of different formats. In particular, very pleasant Atom feeds can be obtained by appending ctype=atom to any search query.

This can be combined with xsltproc and stylesheets like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:atom="http://www.w3.org/2005/Atom">
  <xsl:template match="/">
    <xsl:for-each select="atom:feed/atom:entry">
      <xsl:value-of select="atom:title"/>
      <xsl:text>
</xsl:text>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

or this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:atom="http://www.w3.org/2005/Atom">
  <xsl:template match="/"> 
    <ul>
      <xsl:for-each select="atom:feed/atom:entry">
        <li>
          <a><xsl:attribute name="href">
            <xsl:value-of select="atom:link/@href"/></xsl:attribute>
            <xsl:value-of select="substring-before(atom:title,']')"/>]
          </a> <xsl:value-of select="substring-after(atom:title,']')"/>
        </li>
      <xsl:text>
</xsl:text>
      </xsl:for-each>
    </ul>
  </xsl:template>
</xsl:stylesheet>

like this:

curl -sS "http://tinyurl.com/5o5v52" | xsltproc buglist_to_html.xslt -