packages feed

yuuko (empty) → 2009.10.23

raw patch · 8 files changed

+124/−0 lines, 8 filesdep +basedep +hxtsetup-changed

Dependencies added: base, hxt

Files

+ LICENSE view
@@ -0,0 +1,31 @@+Copyright (c) 2009, Jinjing Wang++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are+met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Jinjing Wang nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Nemesis view
@@ -0,0 +1,24 @@+nemesis = do+  +  clean+    [ "**/*.hi"+    , "**/*.o"+    , "manifest"+    ]+    +  desc "prepare cabal dist"+  task "dist" $ do+    sh "cabal clean"+    sh "cabal configure"+    sh "cabal sdist"++  desc "start console"+  task "i" (sh "ghci -isrc -Wall src/Text/HTML/Yuuko.hs")+  +  desc "put all .hs files in manifest"+  task "manifest" $ do+    sh "find . | grep 'hs$' > manifest"++  desc "show sloc"+  task "stat" $ do+    sh "cloc -match-f=hs$ --quiet src --no3"
+ Setup.lhs view
@@ -0,0 +1,4 @@+#! /usr/bin/env runhaskell++> import Distribution.Simple+> main = defaultMain
+ changelog.md view
@@ -0,0 +1,4 @@+2009.10.23+----------++Init
+ known-issues.md view
+ readme.md view
@@ -0,0 +1,12 @@+Yuuko+=====++A transcendental HTML parser gently wrapping the HXT library++Example+=======+++    yuuko "//body/text()" "<html><body>hi</body></html>"+    +    > ["hi"]
+ src/Text/HTML/Yuuko.hs view
@@ -0,0 +1,21 @@+module Text.HTML.Yuuko where++import Text.XML.HXT.Arrow+import qualified Text.XML.HXT.Arrow.XPathSimple as XS++yuuko :: String -> String -> IO [String]+yuuko expr s = do+  runX process++  where+    args = +      [ (a_validate, v_0)+      , (a_parse_html, v_1)+      , (a_encoding, utf8)+      , (a_issue_warnings, v_0)+      ]+      +    process =+          readString args s+      >>> XS.getXPathTreesInDoc expr+      >>> getText
+ yuuko.cabal view
@@ -0,0 +1,28 @@+Name:                 yuuko+Version:              2009.10.23+Build-type:           Simple+Synopsis:             A transcendental HTML parser gently wrapping the HXT library+Description:++    Parse without thinking ...+    +    yuuko "//body/text()" "<html><body>hi</body></html>"+    +    > ["hi"]++License:              BSD3+License-file:         LICENSE+Author:               Wang, Jinjing+Maintainer:           Wang, Jinjing <nfjinjing@gmail.com>+Build-Depends:        base+Cabal-version:        >= 1.2+category:             Text+homepage:             http://github.com/nfjinjing/yuuko+data-files:           readme.md, changelog.md, known-issues.md, Nemesis++library+  ghc-options: -Wall+  build-depends: base >= 4 && < 5, hxt+  hs-source-dirs: src/+  exposed-modules:  +                      Text.HTML.Yuuko