Advertisement
illwieckz

list-sweet-maps.sh

Sep 12th, 2022 (edited)
1,321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.55 KB | None | 0 0
  1. cat > transform.xslt <<\EOF
  2. <?xml version='1.0' encoding='UTF-8'?>
  3. <xsl:stylesheet
  4. version='1.0'
  5. xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
  6.     <xsl:output method='text'/>
  7.     <xsl:strip-space elements='*'/>
  8.     <xsl:template match='html'>
  9.     <xsl:for-each select='body/pre'>
  10.         <xsl:for-each select='a'>
  11.             <xsl:value-of select='.'/><xsl:text>&#xA;</xsl:text>
  12.         </xsl:for-each>
  13.     </xsl:for-each>
  14.     </xsl:template>
  15. </xsl:stylesheet>
  16. EOF
  17.  
  18. curl -s https://users.unvanquished.net/~sweet/pkg/ \
  19. | xsltproc --nonet --html transform.xslt - \
  20. | grep -E '\.dpk$'
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement