packages feed

spreadsheet-0.1.3.3: spreadsheet.cabal

-- Unfriendly: if we swap quotation and separator character,
-- then we get useless error message for (unquoted) inhalt.csv (no line number)
-- idea: extend SourceParser
Name:             spreadsheet
Version:          0.1.3.3
License:          BSD3
License-File:     LICENSE
Author:           Henning Thielemann <haskell@henning-thielemann.de>
Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
Homepage:         http://www.haskell.org/haskellwiki/Spreadsheet
Category:         Data, Text
Synopsis:         Read and write spreadsheets from and to CSV files in a lazy way
Description:
  Read and write spreadsheets from and to files
  containing comma separated values (CSV) in a lazy way.
  See also the
     csv package <http://hackage.haskell.org/package/csv> and
     <http://www.xoltar.org/languages/haskell.html>,
     <http://www.xoltar.org/languages/haskell/CSV.hs>.
  Both do not parse lazy.
  Reading from other source than plain 'String's could be easily added.
  .
  If you install this package by
  .
  cabal install -fbuildExamples
  .
  then an example program is compiled and installed, too.
  This program fills a template text using data from a CSV file.
  E.g. given a file @template.txt@ with content
  .
  > Name: FIRSTNAME SURNAME
  > Born: BIRTH
  .
  and @names.csv@ with content
  .
  > "FIRSTNAME","SURNAME",BIRTH
  > "Georg","Cantor",1845
  > "Haskell","Curry",1900
  > "Ada","Lovelace",1815
  .
  the call
  .
  > csvreplace template.txt <names.csv
  .
  produces the output
  .
  > Name: Georg Cantor
  > Born: 1845
  > Name: Haskell Curry
  > Born: 1900
  > Name: Ada Lovelace
  > Born: 1815
  .
  You may also generate one file per CSV row in the following manner:
  .
  > csvreplace --multifile=FIRSTNAME-SURNAME.txt template.txt <names.csv
  .
  For similar (non-Haskell) programs see @cut@, @csvfix@, @csvtool@.
Tested-With:       GHC==6.8.2, GHC==6.12.3
Cabal-Version:     >=1.6
Build-Type:        Simple
Source-Repository head
  Type:     darcs
  Location: http://code.haskell.org/~thielema/spreadsheet/

Source-Repository this
  Tag:      0.1.3.3
  Type:     darcs
  Location: http://code.haskell.org/~thielema/spreadsheet/

Flag buildExamples
  description: Build example executables
  default:     False

Flag splitBase
  description: Choose the new smaller, split-up base package.

Library
  Build-Depends:
    utility-ht >=0.0.2 && <0.1,
    transformers >=0.2 && <0.5,
    explicit-exception >=0.1 && <0.2
  If flag(splitBase)
    Build-Depends: base >= 2 && <5
  Else
    Build-Depends: base >= 1.0 && < 2

  GHC-Options:      -Wall
  Hs-Source-Dirs:   src
  Exposed-Modules:
    Data.Spreadsheet
  Other-Modules:
    Data.Spreadsheet.Parser
    Data.Spreadsheet.CharSource

Executable csvreplace
  If flag(buildExamples)
    Build-Depends:
      bytestring >=0.9 && <0.11
  Else
    Buildable:      False
  GHC-Options:      -Wall
  Hs-Source-Dirs:   src
  Main-Is: CSVReplace.hs