Remove dependency on old-time.
This commit is contained in:
parent
3a0b3df007
commit
f437827b0c
4 changed files with 6 additions and 8 deletions
|
@ -202,7 +202,6 @@ Library
|
|||
bytestring >= 0.9 && < 1.0,
|
||||
zip-archive >= 0.1.1.7 && < 0.2,
|
||||
utf8-string >= 0.3 && < 0.4,
|
||||
old-time >= 1 && < 1.2,
|
||||
old-locale >= 1 && < 1.1,
|
||||
time >= 1.2 && < 1.5,
|
||||
HTTP >= 4000.0.5 && < 4000.3,
|
||||
|
@ -295,7 +294,6 @@ Executable pandoc
|
|||
bytestring >= 0.9 && < 1.0,
|
||||
zip-archive >= 0.1.1.7 && < 0.2,
|
||||
utf8-string >= 0.3 && < 0.4,
|
||||
old-time >= 1 && < 1.2,
|
||||
old-locale >= 1 && < 1.1,
|
||||
time >= 1.2 && < 1.5,
|
||||
HTTP >= 4000.0.5 && < 4000.3,
|
||||
|
|
|
@ -36,7 +36,7 @@ import Data.ByteString.Lazy.UTF8 ( fromString, toString )
|
|||
import Text.Pandoc.UTF8 as UTF8
|
||||
import System.IO ( stderr )
|
||||
import Codec.Archive.Zip
|
||||
import System.Time
|
||||
import Data.Time.Clock.POSIX
|
||||
import Paths_pandoc ( getDataFileName )
|
||||
import Text.Pandoc.Definition
|
||||
import Text.Pandoc.Generic
|
||||
|
@ -114,7 +114,7 @@ writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do
|
|||
|
||||
(newContents, st) <- runStateT (writeOpenXML opts{writerWrapText = False} doc)
|
||||
defaultWriterState
|
||||
(TOD epochtime _) <- getClockTime
|
||||
epochtime <- floor `fmap` getPOSIXTime
|
||||
let imgs = M.elems $ stImages st
|
||||
let imgPath ident img = "media/" ++ ident ++
|
||||
case imageType img of
|
||||
|
|
|
@ -36,7 +36,7 @@ import System.FilePath ( (</>), (<.>), takeBaseName, takeExtension )
|
|||
import qualified Data.ByteString.Lazy as B
|
||||
import Data.ByteString.Lazy.UTF8 ( fromString )
|
||||
import Codec.Archive.Zip
|
||||
import System.Time
|
||||
import Data.Time.Clock.POSIX
|
||||
import Text.Pandoc.Shared hiding ( Element )
|
||||
import Text.Pandoc.Definition
|
||||
import Text.Pandoc.Generic
|
||||
|
@ -54,7 +54,7 @@ writeEPUB :: Maybe String -- ^ EPUB stylesheet specified at command line
|
|||
-> Pandoc -- ^ Document to convert
|
||||
-> IO B.ByteString
|
||||
writeEPUB mbStylesheet opts doc@(Pandoc meta _) = do
|
||||
(TOD epochtime _) <- getClockTime
|
||||
epochtime <- floor `fmap` getPOSIXTime
|
||||
let mkEntry path content = toEntry path epochtime content
|
||||
let opts' = opts{ writerEmailObfuscation = NoObfuscation
|
||||
, writerStandalone = True
|
||||
|
|
|
@ -34,7 +34,7 @@ import System.FilePath ( (</>), takeExtension )
|
|||
import qualified Data.ByteString.Lazy as B
|
||||
import Data.ByteString.Lazy.UTF8 ( fromString )
|
||||
import Codec.Archive.Zip
|
||||
import System.Time
|
||||
import Data.Time.Clock.POSIX
|
||||
import Paths_pandoc ( getDataFileName )
|
||||
import Text.Pandoc.Shared ( WriterOptions(..) )
|
||||
import Text.Pandoc.ImageSize ( readImageSize, sizeInPoints )
|
||||
|
@ -72,7 +72,7 @@ writeODT mbRefOdt opts doc = do
|
|||
let sourceDir = writerSourceDirectory opts
|
||||
doc' <- bottomUpM (transformPic sourceDir picEntriesRef) doc
|
||||
let newContents = writeOpenDocument opts{writerWrapText = False} doc'
|
||||
(TOD epochtime _) <- getClockTime
|
||||
epochtime <- floor `fmap` getPOSIXTime
|
||||
let contentEntry = toEntry "content.xml" epochtime $ fromString newContents
|
||||
picEntries <- readIORef picEntriesRef
|
||||
let archive = foldr addEntryToArchive refArchive $ contentEntry : picEntries
|
||||
|
|
Loading…
Add table
Reference in a new issue