Convert.hs 794 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{-|
Module      : Gargantext.Text.Convert
Description : All parsers of Gargantext in one file.
Copyright   : (c) CNRS, 2017
License     : AGPL + CECILL v3
Maintainer  : team@gargantext.org
Stability   : experimental
Portability : POSIX

Format Converter.

-}

{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PackageImports    #-}
{-# LANGUAGE OverloadedStrings #-}

Alexandre Delanoë's avatar
Alexandre Delanoë committed
18
module Gargantext.Text.Convert (risPress2csvWrite)
19 20 21 22
    where

import System.FilePath (FilePath()) -- , takeExtension)
import Gargantext.Prelude
23 24
import Gargantext.Text.Corpus.Parsers.CSV (writeDocs2Csv)
import Gargantext.Text.Corpus.Parsers (parseFile, FileFormat(..))
25

26

Alexandre Delanoë's avatar
Alexandre Delanoë committed
27 28
risPress2csvWrite :: FilePath -> IO ()
risPress2csvWrite f = parseFile RisPresse    (f <> ".ris")
29 30
               >>= \hs -> writeDocs2Csv (f <> ".csv") hs

Alexandre Delanoë's avatar
Alexandre Delanoë committed
31 32