packages feed

hs-nombre-generator (empty) → 0.2.0.0

raw patch · 4 files changed

+68/−0 lines, 4 filesdep +HandsomeSoupdep +basedep +hxtsetup-changed

Dependencies added: HandsomeSoup, base, hxt, random

Files

+ LICENSE view
@@ -0,0 +1,21 @@+The MIT License (MIT)++Copyright (c) 2014 Ezequiel Alvarez++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ Web/NombreGenerator.hs view
@@ -0,0 +1,21 @@+module Main where++import System.Environment+import System.Exit+import Web.NombreGenerator.RandomUtil+import Web.NombreGenerator.Scrapper.BsAs++parseArgs :: [String] -> IO Int+parseArgs ["-h"] = usage >> exit+parseArgs ["-v"] = version >> exit+parseArgs [s] = return $! read s+parseArgs [] = usage >> die++usage = putStrLn "Usage: hs-nombre-generator [-h] [count ..]"+version = putStrLn "Haskell NombreGenerator 0.1"+exit = exitSuccess+die = exitWith (ExitFailure 1)++generate n = (randTriples n) =<<  scrap++main = getArgs >>= parseArgs >>= generate >>= mapM_ putStrLn
+ hs-nombre-generator.cabal view
@@ -0,0 +1,24 @@+-- Initial hs-nombre-generator.cabal generated by cabal init.  For further +-- documentation, see http://haskell.org/cabal/users-guide/++name:                hs-nombre-generator+version:             0.2.0.0+synopsis:            Name generator.+description:         Random name generator with web scrapping.+license:             MIT+license-file:        LICENSE+author:              Ezequiel Alvarez+maintainer:          welcometothechango@gmail.com+copyright:           (c) Ezequiel Alvarez 2014+category:            Web+build-type:          Simple+cabal-version:       >=1.8++executable hs-nombre-generator+  main-is:             Web/NombreGenerator.hs+  ghc-options:         -O2+  -- other-modules:       +  build-depends:       base >=4.0 && <4.8+                     , hxt+                     , HandsomeSoup+                     , random