From f04836983b6e75707808341d0f6a5af4e12b8caf Mon Sep 17 00:00:00 2001 From: LaurentRDC <> Date: Thu, 1 Nov 2018 00:23:00 +0100 Subject: version 1.0.3.0 diff --git a/package.yaml b/package.yaml index c33a050..520ff96 100644 --- a/package.yaml +++ b/package.yaml @@ -1,50 +1,50 @@ -name: pandoc-pyplot -version: '1.0.2.0' -github: "LaurentRDC/pandoc-pyplot" -license: MIT -author: "Laurent P. René de Cotret" -maintainer: "Laurent P. René de Cotret" -synopsis: A Pandoc filter for including figures generated from Matplotlib -description: - A pandoc filter for including figures generated from Matplotlib. - Keep the document and Python code in the same location. Output from Matplotlib - is captured and included as a figure. -category: Documentation - -license-file: LICENSE.md - -extra-source-files: -- CHANGELOG.md -- LICENSE.md -- package.yaml -- README.md -- stack.yaml - -ghc-options: -Wall -Wcompat - -library: - dependencies: - - base > 4.8 && < 5 - - directory - - filepath - - pandoc-types > 1.12 && < 2 - - temporary - - typed-process - - containers - source-dirs: src - exposed-modules: - - Text.Pandoc.Filter.Pyplot - - Text.Pandoc.Filter.Scripting - -executables: - pandoc-pyplot: - source-dirs: executable - main: Main.hs - dependencies: - - base > 4.8 && < 5 - - pandoc-pyplot - - pandoc-types > 1.12 && < 2 - ghc-options: - - -rtsopts - - -threaded +name: pandoc-pyplot +version: '1.0.3.0' +github: "LaurentRDC/pandoc-pyplot" +license: MIT +author: "Laurent P. René de Cotret" +maintainer: "Laurent P. René de Cotret" +synopsis: A Pandoc filter for including figures generated from Matplotlib +description: + A pandoc filter for including figures generated from Matplotlib. + Keep the document and Python code in the same location. Output from Matplotlib + is captured and included as a figure. +category: Documentation + +license-file: LICENSE.md + +extra-source-files: +- CHANGELOG.md +- LICENSE.md +- package.yaml +- README.md +- stack.yaml + +ghc-options: -Wall -Wcompat + +library: + dependencies: + - base > 4 && < 5 + - directory + - filepath + - pandoc-types > 1.12 && < 2 + - temporary + - typed-process + - containers + source-dirs: src + exposed-modules: + - Text.Pandoc.Filter.Pyplot + - Text.Pandoc.Filter.Scripting + +executables: + pandoc-pyplot: + source-dirs: executable + main: Main.hs + dependencies: + - base > 4 && < 5 + - pandoc-pyplot + - pandoc-types > 1.12 && < 2 + ghc-options: + - -rtsopts + - -threaded - -with-rtsopts=-N \ No newline at end of file diff --git a/pandoc-pyplot.cabal b/pandoc-pyplot.cabal index 45025c2..075ba37 100644 --- a/pandoc-pyplot.cabal +++ b/pandoc-pyplot.cabal @@ -4,10 +4,10 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 563259592becbb4f2496b0f914f546163be046510966e163f71175faa94504ad +-- hash: 25fd8ea89e42939262b70218fe5deda1f7e6afceb3614082738bee06ed427a51 name: pandoc-pyplot -version: 1.0.2.0 +version: 1.0.3.0 synopsis: A Pandoc filter for including figures generated from Matplotlib description: A pandoc filter for including figures generated from Matplotlib. Keep the document and Python code in the same location. Output from Matplotlib is captured and included as a figure. category: Documentation @@ -39,7 +39,7 @@ library src ghc-options: -Wall -Wcompat build-depends: - base >4.8 && <5 + base >4 && <5 , containers , directory , filepath @@ -56,7 +56,7 @@ executable pandoc-pyplot executable ghc-options: -Wall -Wcompat -rtsopts -threaded -with-rtsopts=-N build-depends: - base >4.8 && <5 + base >4 && <5 , pandoc-pyplot , pandoc-types >1.12 && <2 default-language: Haskell2010 diff --git a/src/Text/Pandoc/Filter/Pyplot.hs b/src/Text/Pandoc/Filter/Pyplot.hs index 1aa5c31..79eeb30 100644 --- a/src/Text/Pandoc/Filter/Pyplot.hs +++ b/src/Text/Pandoc/Filter/Pyplot.hs @@ -23,6 +23,7 @@ module Text.Pandoc.Filter.Pyplot ( import Control.Monad ((>=>)) import qualified Data.Map.Strict as M +import Data.Monoid ((<>)) import System.Directory (doesDirectoryExist) import System.FilePath (isValid, replaceExtension, takeDirectory) @@ -147,4 +148,4 @@ makePlot = makePlot' >=> either (fail . showError) return -- | Walk over an entire Pandoc document, changing appropriate code blocks -- into figures. plotTransform :: Pandoc -> IO Pandoc -plotTransform = walkM makePlot \ No newline at end of file +plotTransform = walkM makePlot diff --git a/src/Text/Pandoc/Filter/Scripting.hs b/src/Text/Pandoc/Filter/Scripting.hs index 18cb79a..c8a4589 100644 --- a/src/Text/Pandoc/Filter/Scripting.hs +++ b/src/Text/Pandoc/Filter/Scripting.hs @@ -24,7 +24,7 @@ import System.FilePath (()) import System.IO.Temp (getCanonicalTemporaryDirectory) import System.Process.Typed (runProcess, shell) -import Data.Monoid (Any(..)) +import Data.Monoid (Any(..), (<>)) -- | String representation of a Python script type PythonScript = String @@ -65,4 +65,4 @@ hasBlockingShowCall script = anyOf ] where scriptLines = lines script - anyOf xs = getAny $ mconcat $ Any <$> xs \ No newline at end of file + anyOf xs = getAny $ mconcat $ Any <$> xs -- cgit v0.10.2