packages feed

xpathdsv 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+10/−5 lines, 3 files

Files

Main.hs view
@@ -51,7 +51,9 @@     in listA (catA arrows)  getText' :: ArrowXml a => a XmlTree String-getText' = (isText >>> getText) `orElse` xshow this+getText' = (isText >>> getText) +           `orElse` (isAttr >>> getChildren >>> getText)+           `orElse` xshow this  cleanText :: ArrowXml a => a String String cleanText = arr (T.unpack . T.concatMap escapeNewLines . T.strip . T.pack)
README.md view
@@ -3,6 +3,8 @@  Extract DSV text from HTML and XML using XPATH expressions. +Available on Hackage.+ ## Example  If you have an HTML file like this:@@ -26,7 +28,7 @@  You can extract a list of tab-separated values like this: -    xpathdsv  '//a'  '/a/text()' '/a/@href/text()' < sample.html+    xpathdsv  '//a'  '/a/text()' '/a/@href' < sample.html  Output: @@ -40,8 +42,9 @@ following XPATH expressions are applied. Each of the following XPATH expressions then generate a column of the row of data. -If you don't specify a `text()` node at the end of an XPATH expression, you'll get -a string representation of a node, which may be useful for debugging:+If you don't specify a `text()` node at the end of an XPATH expression, you'll+get a string representation of a node if the node is not an attribute, which+may be useful for debugging:       xpathdsv '//a' '/a' < sample.html 
xpathdsv.cabal view
@@ -1,5 +1,5 @@ name:                xpathdsv-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Command line tool to extract DSV data from HTML and XML with XPATH expressions description:         Please see README.md homepage:            https://github.com/danchoi/xpathdsv#readme