summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurentRDC <>2020-06-08 16:44:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-06-08 16:44:00 (GMT)
commit4d7da799de1ab45c30b61c168ef2e08e37d86210 (patch)
tree662fb4192c451504c219f0c22bacfb5604cb14c2
parent53b46fbfdffba7f8725f156903ecfa7890ed62c0 (diff)
version 0.6.1.00.6.1.0
-rw-r--r--CHANGELOG.md9
-rw-r--r--README.md7
-rw-r--r--executable/ExampleConfig.hs1
-rw-r--r--executable/Main.hs2
-rw-r--r--pandoc-plot.cabal2
-rw-r--r--src/Text/Pandoc/Filter/Plot.hs9
-rw-r--r--src/Text/Pandoc/Filter/Plot/Parse.hs1
-rw-r--r--src/Text/Pandoc/Filter/Plot/Scripting.hs3
-rw-r--r--src/Text/Pandoc/Filter/Plot/Types.hs16
-rw-r--r--stack.yaml17
10 files changed, 32 insertions, 35 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77a6c8c..7fd3ba3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,15 @@
pandoc-plot uses [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
+Release 0.6.1.0
+---------------
+
+* Made the functions `availableToolkits` and `unavailableToolkits` public.
+* Minor documentation fixes.
+* Executables are now built with GHC 8.8.3.
+
Release 0.6.0.0
---------------
+---------------
New toolkits:
* Added support for the Plotly/R plotting library.
diff --git a/README.md b/README.md
index 32bcca3..e5b846a 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ Do not edit manually
## A Pandoc filter to generate figures from code blocks in documents
-[![Hackage version](https://img.shields.io/hackage/v/pandoc-plot.svg)](http://hackage.haskell.org/package/pandoc-plot) [![Stackage version (nightly)](http://stackage.org/package/pandoc-plot/badge/nightly)](http://stackage.org/nightly/package/pandoc-plot) [![Build status](https://ci.appveyor.com/api/projects/status/mmgiuk52j356e6jp?svg=true)](https://ci.appveyor.com/project/LaurentRDC/pandoc-plot) [![Build Status](https://dev.azure.com/laurentdecotret/pandoc-plot/_apis/build/status/LaurentRDC.pandoc-plot?branchName=master)](https://dev.azure.com/laurentdecotret/pandoc-plot/_build/latest?definitionId=5&branchName=master) [![license](https://img.shields.io/badge/license-GPLv2+-lightgray.svg)](https://www.gnu.org/licenses/gpl.html) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/pandoc-plot.svg)](https://anaconda.org/conda-forge/pandoc-plot)
+[![Hackage version](https://img.shields.io/hackage/v/pandoc-plot.svg)](http://hackage.haskell.org/package/pandoc-plot) [![Stackage version (nightly)](http://stackage.org/package/pandoc-plot/badge/nightly)](http://stackage.org/nightly/package/pandoc-plot) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/pandoc-plot.svg)](https://anaconda.org/conda-forge/pandoc-plot) [![license](https://img.shields.io/badge/license-GPLv2+-lightgray.svg)](https://www.gnu.org/licenses/gpl.html)
`pandoc-plot` turns code blocks present in your documents (Markdown, LaTeX, etc.) into embedded figures, using your plotting toolkit of choice, including Matplotlib, ggplot2, MATLAB, Mathematica, and more.
@@ -259,7 +259,7 @@ take a look at the help using the `-h`/`--help` flag:
pandoc-plot - generate figures directly in documents using your plotting toolkit
of choice.
-Usage: pandoc-plot.exe ([-v|--version] | [--full-version] | [-m|--manual])
+Usage: pandoc-plot.exe [(-v|--version) | --full-version | (-m|--manual)]
[COMMAND] [AST]
This pandoc filter generates plots from code blocks using a multitude of
possible renderers. This allows to keep documentation and figures in perfect
@@ -648,6 +648,9 @@ stack install pandoc-plot
### From source
+[![Build
+Status](https://dev.azure.com/laurentdecotret/pandoc-plot/_apis/build/status/LaurentRDC.pandoc-plot?branchName=master)](https://dev.azure.com/laurentdecotret/pandoc-plot/_build/latest?definitionId=5&branchName=master)
+
Building from source can be done using
[`stack`](https://docs.haskellstack.org/en/stable/README/) or
[`cabal`](https://www.haskell.org/cabal/):
diff --git a/executable/ExampleConfig.hs b/executable/ExampleConfig.hs
index 534728f..4709b0a 100644
--- a/executable/ExampleConfig.hs
+++ b/executable/ExampleConfig.hs
@@ -9,7 +9,6 @@ import Data.String
import Language.Haskell.TH.Syntax
-import System.FilePath (FilePath)
import System.IO
docFile :: FilePath
diff --git a/executable/Main.hs b/executable/Main.hs
index 10fdec4..6bc1d14 100644
--- a/executable/Main.hs
+++ b/executable/Main.hs
@@ -5,11 +5,9 @@
module Main where
-import Control.Applicative ((<|>))
import Control.Monad (join, forM_, when, msum)
import Data.List (intersperse, (\\))
-import Data.Monoid ((<>))
import Data.Text (unpack)
import Data.Version (parseVersion, showVersion)
diff --git a/pandoc-plot.cabal b/pandoc-plot.cabal
index b57e303..477d6cd 100644
--- a/pandoc-plot.cabal
+++ b/pandoc-plot.cabal
@@ -1,5 +1,5 @@
name: pandoc-plot
-version: 0.6.0.0
+version: 0.6.1.0
cabal-version: >= 1.12
synopsis: A Pandoc filter to include figures generated from code blocks using your plotting toolkit of choice.
description: A Pandoc filter to include figures generated from code blocks. Keep the document and code in the same location. Output is captured and included as a figure.
diff --git a/src/Text/Pandoc/Filter/Plot.hs b/src/Text/Pandoc/Filter/Plot.hs
index 194a2dc..d83c22d 100644
--- a/src/Text/Pandoc/Filter/Plot.hs
+++ b/src/Text/Pandoc/Filter/Plot.hs
@@ -19,11 +19,13 @@ attribute will trigger the filter:
* @matplotlib@ for matplotlib-based Python plots;
* @plotly_python@ for Plotly-based Python plots;
+* @plotly_r@ for Plotly-based R plots;
* @matlabplot@ for MATLAB plots;
* @mathplot@ for Mathematica plots;
* @octaveplot@ for GNU Octave plots;
* @ggplot2@ for ggplot2-based R plots;
* @gnuplot@ for gnuplot plots;
+* @graphviz@ for Graphviz graphs.
For example, in Markdown:
@@ -32,7 +34,7 @@ For example, in Markdown:
```{.matlabplot}
figure()
- plot([1,2,3,4,5], [1,2,3,4,5], '-k)
+ plot([1,2,3,4,5], [1,2,3,4,5], '-k')
```
@
@@ -75,13 +77,14 @@ module Text.Pandoc.Filter.Plot (
, Configuration(..)
, SaveFormat(..)
, Script
+ -- * Determining available plotting toolkits
+ , availableToolkits
+ , unavailableToolkits
-- * For testing and internal purposes ONLY
, make
, make'
, PandocPlotError(..)
, readDoc
- , availableToolkits
- , unavailableToolkits
) where
import Control.Concurrent.Async (mapConcurrently)
diff --git a/src/Text/Pandoc/Filter/Plot/Parse.hs b/src/Text/Pandoc/Filter/Plot/Parse.hs
index fd9f268..ed79aeb 100644
--- a/src/Text/Pandoc/Filter/Plot/Parse.hs
+++ b/src/Text/Pandoc/Filter/Plot/Parse.hs
@@ -28,7 +28,6 @@ import Data.Default.Class (def)
import Data.List (intersperse)
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe, listToMaybe)
-import Data.Monoid ((<>))
import Data.String (fromString)
import Data.Text (Text, pack, unpack)
import qualified Data.Text.IO as TIO
diff --git a/src/Text/Pandoc/Filter/Plot/Scripting.hs b/src/Text/Pandoc/Filter/Plot/Scripting.hs
index aa8ec7e..0ae89e0 100644
--- a/src/Text/Pandoc/Filter/Plot/Scripting.hs
+++ b/src/Text/Pandoc/Filter/Plot/Scripting.hs
@@ -23,14 +23,13 @@ import Control.Monad.Reader
import Data.Hashable (hash)
import Data.Maybe (fromMaybe)
-import Data.Monoid ((<>))
import qualified Data.Text as T
import qualified Data.Text.IO as T
import System.Directory (createDirectoryIfMissing,
doesFileExist)
import System.Exit (ExitCode (..))
-import System.FilePath (FilePath, addExtension,
+import System.FilePath (addExtension,
normalise, replaceExtension,
takeDirectory, (</>))
import System.IO.Temp (getCanonicalTemporaryDirectory)
diff --git a/src/Text/Pandoc/Filter/Plot/Types.hs b/src/Text/Pandoc/Filter/Plot/Types.hs
index c48cf92..53e6ea8 100644
--- a/src/Text/Pandoc/Filter/Plot/Types.hs
+++ b/src/Text/Pandoc/Filter/Plot/Types.hs
@@ -268,14 +268,14 @@ figureContentHash FigureSpec{..} =
-- | Generated figure file format supported by pandoc-plot.
-- Note that not all formats are supported by all toolkits.
data SaveFormat
- = PNG
- | PDF
- | SVG
- | JPG
- | EPS
- | GIF
- | TIF
- | WEBP
+ = PNG -- ^ Portable network graphics
+ | PDF -- ^ Portable document format
+ | SVG -- ^ Scalable vector graphics
+ | JPG -- ^ JPEG/JPG compressed image
+ | EPS -- ^ Encapsulated postscript
+ | GIF -- ^ GIF format
+ | TIF -- ^ Tagged image format
+ | WEBP -- ^ WebP image format
deriving (Bounded, Enum, Eq, Show, Generic)
instance IsString SaveFormat where
diff --git a/stack.yaml b/stack.yaml
index e31b05e..b644084 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -17,7 +17,8 @@
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
-resolver: lts-14.1
+
+resolver: lts-15.16 # GHC 8.8.3
# User packages to be built.
# Various formats can be used as shown in the example below.
@@ -38,18 +39,6 @@ packages:
# using the same syntax as the packages field.
# (e.g., acme-missiles-0.3)
extra-deps:
-- pandoc-2.9
-- pandoc-types-1.20@sha256:8393b1a73b8a6a1f3feaeb3a6592c176461082c3e4d897f1b316b1a58dd84c39,3999
-- texmath-0.12
-- HsYAML-0.2.1.0@sha256:e4677daeba57f7a1e9a709a1f3022fe937336c91513e893166bd1f023f530d68,5311
-- doclayout-0.2.0.1@sha256:0410e40c4fa8e299b4f5fa03d378111b9d0effdf59134c95882a160637887ba8,2063
-- haddock-library-1.8.0@sha256:9dece2cbca827755fdfc30af5a407b0ca30cf29ec1ee85215b38fd8fc23e7421,3723
-- regex-pcre-builtin-0.95.1.1.8.43@sha256:2d671af361adf1776fde182a687bb6da022b1e5e3b0a064ce264289de63564a5,3088
-- regex-base-0.94.0.0@sha256:d514eab2aa9ba4b9d14900ac40cbdea1993372466a6cc6ffeeab59a1975563c0,2166
-- doctemplates-0.8@sha256:a85670fbc199422ff06b3f511c426a94e72d3ee1f2d165bfdfb64ec6bb48bdc3,3109
-- emojis-0.1@sha256:3cd86b552ad71c118a7822128c97054b6cf22bc4ff5b8f7e3eb0b356202aeecd,1907
-- skylighting-0.8.3@sha256:dbd885fc6be993cb3714b67ab1ba32c110dc889cd96d2a70f4dc2f67518ad5d3,9726
-- skylighting-core-0.8.3@sha256:90cf39790b38f77f13a29a7a64a7c50a8cb0442c2c68f5cd7b44c12a32e8dd37,8056
# Override default flag values for local packages and extra-deps
# flags: {}
@@ -73,4 +62,4 @@ extra-deps:
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
-# compiler-check: newer-minor
+compiler-check: newer-minor