2017-03-26 20:48:17 +02:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
-- to be processed using hsb2hs
|
2013-01-23 08:14:23 -08:00
|
|
|
module Text.Pandoc.Data (dataFiles) where
|
|
|
|
import qualified Data.ByteString as B
|
2017-03-26 20:41:35 +02:00
|
|
|
import System.FilePath (splitDirectories)
|
2015-10-17 22:03:12 -07:00
|
|
|
import qualified System.FilePath.Posix as Posix
|
2013-01-23 08:14:23 -08:00
|
|
|
|
2015-10-17 22:03:12 -07:00
|
|
|
-- We ensure that the data files are stored using Posix
|
|
|
|
-- path separators (/), even on Windows.
|
2013-01-23 08:14:23 -08:00
|
|
|
dataFiles :: [(FilePath, B.ByteString)]
|
2015-10-17 22:03:12 -07:00
|
|
|
dataFiles = map (\(fp, contents) ->
|
|
|
|
(Posix.joinPath (splitDirectories fp), contents)) dataFiles'
|
|
|
|
|
|
|
|
dataFiles' :: [(FilePath, B.ByteString)]
|
2017-03-26 20:48:17 +02:00
|
|
|
dataFiles' = ("MANUAL.txt", %blob "MANUAL.txt") : %blobs "data"
|
|
|
|
|