Skip to content

Instantly share code, notes, and snippets.

@terryburton
Created February 20, 2015 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terryburton/ac7c5c662443f3553dc4 to your computer and use it in GitHub Desktop.
Save terryburton/ac7c5c662443f3553dc4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env runhaskell
import Text.Pandoc.JSON
import System.FilePath
main = toJSONFilter rewritepngtoeps
rewritepngtoeps :: Inline -> [Inline]
rewritepngtoeps ( Image txt (url,title) ) = [ ( Image txt (rewritefile url,title) ) ]
rewritepngtoeps x = [x]
rewritefile :: String -> String
rewritefile filename = replaceExtension filename ".eps"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment