diff options
Diffstat (limited to '.config/pancake/unclutter')
-rw-r--r-- | .config/pancake/unclutter/duckduckgo.xsl | 24 | ||||
-rw-r--r-- | .config/pancake/unclutter/hacker-news.xsl | 33 | ||||
-rw-r--r-- | .config/pancake/unclutter/lobsters.xsl | 20 |
3 files changed, 77 insertions, 0 deletions
diff --git a/.config/pancake/unclutter/duckduckgo.xsl b/.config/pancake/unclutter/duckduckgo.xsl new file mode 100644 index 0000000..7db8766 --- /dev/null +++ b/.config/pancake/unclutter/duckduckgo.xsl @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" indent="yes"/> + <xsl:template match="/"> + <html> + <body> + DuckDuckGo + <xsl:for-each select="//tr[not(@class) or @class!='result-sponsored']"> + <xsl:for-each select="td/a[@class='result-link']"> + <br /> + <br /> + <a href="{@href}"> + <xsl:value-of select="." /> + </a> + </xsl:for-each> + <xsl:for-each select="td[@class='result-snippet']"> + <br /> + <xsl:value-of select="." /> + </xsl:for-each> + </xsl:for-each> + </body> + </html> + </xsl:template> +</xsl:stylesheet> diff --git a/.config/pancake/unclutter/hacker-news.xsl b/.config/pancake/unclutter/hacker-news.xsl new file mode 100644 index 0000000..0e1fb63 --- /dev/null +++ b/.config/pancake/unclutter/hacker-news.xsl @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" indent="yes"/> + <xsl:template match="/"> + <html> + <body> + Hacker News + <xsl:for-each select="//td[@class='title' or @class='subtext']"> + <xsl:choose> + <xsl:when test="@class = 'title'"> + <xsl:variable name="uri" select="a/@href"/> + <xsl:if test="$uri!=''"> + <br /> + <br /> + <a href="{$uri}" > + <xsl:value-of select="a" /> + </a> + </xsl:if> + </xsl:when> + <xsl:when test="@class = 'subtext'"> + <br/> + <xsl:value-of select="span[@class='age']" /> + | + <a href="{a[last()]/@href}"> + <xsl:value-of select="a[last()]" /> + </a> + </xsl:when> + </xsl:choose> + </xsl:for-each> + </body> + </html> + </xsl:template> +</xsl:stylesheet> diff --git a/.config/pancake/unclutter/lobsters.xsl b/.config/pancake/unclutter/lobsters.xsl new file mode 100644 index 0000000..69a85a1 --- /dev/null +++ b/.config/pancake/unclutter/lobsters.xsl @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" indent="yes"/> + <xsl:template match="/"> + <html> + <body> + Lobsters + <xsl:for-each select="//div[@class='details']"> + <p> + <xsl:copy-of select="span[@class='link']/a" /> + <br/> + <xsl:value-of select="div[@class='byline']/span[position()=1]" /> + | + <xsl:copy-of select="div[@class='byline']/span[@class='comments_label']/a" /> + </p> + </xsl:for-each> + </body> + </html> + </xsl:template> +</xsl:stylesheet> |