aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-03-20 14:35:14 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-03-20 14:35:14 -0700
commit5a24e1371da58a5f8f02718944809637420c370a (patch)
tree4bbeb1bf7fab3c7e2556a0c72e253c7e8df38fee
parentb5e58b2a5fe77964e4e4f721e8e69add5ce8dcb9 (diff)
downloadpandoc-5a24e1371da58a5f8f02718944809637420c370a.tar.gz
Removed 'plugins' directory.
-rw-r--r--plugins/CapitalizeEmphasisPlugin.hs14
-rw-r--r--plugins/DotPlugin.hs30
-rw-r--r--plugins/IncludeFilePlugin.hs19
-rw-r--r--plugins/ListLinksPlugin.hs15
-rw-r--r--plugins/WordPressPlugin.hs10
5 files changed, 0 insertions, 88 deletions
diff --git a/plugins/CapitalizeEmphasisPlugin.hs b/plugins/CapitalizeEmphasisPlugin.hs
deleted file mode 100644
index 80c667e05..000000000
--- a/plugins/CapitalizeEmphasisPlugin.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-module CapitalizeEmphasisPlugin (transform) where
-import Text.Pandoc
-import Data.Char (toUpper)
-
--- This plugin changes emphasized text into CAPITALIZED TEXT.
-
-transform :: [Inline] -> [Inline]
-transform (Emph x : ys) = processWith capStr x ++ transform ys
-transform (x : ys) = x : transform ys
-transform [] = []
-
-capStr :: Inline -> Inline
-capStr (Str x) = Str (map toUpper x)
-capStr x = x
diff --git a/plugins/DotPlugin.hs b/plugins/DotPlugin.hs
deleted file mode 100644
index db1a02e1c..000000000
--- a/plugins/DotPlugin.hs
+++ /dev/null
@@ -1,30 +0,0 @@
-module DotPlugin (transform) where
-import Text.Pandoc
-import Text.Pandoc.Shared
-import System.Process (readProcess)
-import Data.Char (ord)
--- from the utf8-string package on HackageDB:
-import Data.ByteString.Lazy.UTF8 (fromString)
--- from the SHA package on HackageDB:
-import Data.Digest.Pure.SHA
-
--- This plugin allows you to include a graphviz "dot" diagram
--- in a document like this:
---
--- ~~~ {.dot name="diagram1"}
--- digraph G {Hello->World}
--- ~~~
-
-transform :: Block -> IO Block
-transform (CodeBlock (id, classes, namevals) contents) | "dot" `elem` classes = do
- let (name, outfile) = case lookup "name" namevals of
- Just fn -> ([Str fn], fn ++ ".png")
- Nothing -> ([], uniqueName contents ++ ".png")
- result <- readProcess "dot" ["-Tpng"] contents
- writeFile outfile result
- return $ Para [Image name (outfile, "")]
-transform x = return x
-
--- | Generate a unique filename given the file's contents.
-uniqueName :: String -> String
-uniqueName = showDigest . sha1 . fromString
diff --git a/plugins/IncludeFilePlugin.hs b/plugins/IncludeFilePlugin.hs
deleted file mode 100644
index 40a8ce34d..000000000
--- a/plugins/IncludeFilePlugin.hs
+++ /dev/null
@@ -1,19 +0,0 @@
-module IncludeFilePlugin (transform) where
-import Text.Pandoc
-import Text.Pandoc.Shared
-import Control.Monad
-
--- This plugin allows you to include the contents of an
--- external file in a delimited code block like this:
---
--- ~~~ {include="filename"}
--- ~~~
---
--- Trailing newlines are trimmed.
-
-transform :: Block -> IO Block
-transform cb@(CodeBlock (id, classes, namevals) contents) =
- case lookup "include" namevals of
- Just f -> return . (CodeBlock (id, classes, namevals) . stripTrailingNewlines) =<< readFile f
- Nothing -> return cb
-transform x = return x
diff --git a/plugins/ListLinksPlugin.hs b/plugins/ListLinksPlugin.hs
deleted file mode 100644
index 1342aecf0..000000000
--- a/plugins/ListLinksPlugin.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-module ListLinksPlugin (transform) where
-import Text.Pandoc
-
--- This plugin returns an empty document and prints a list
--- of the URLs linked to in the source document.
-
-transform :: Pandoc -> IO Pandoc
-transform p = do
- let urls = queryWith findURLs p
- putStrLn $ unlines urls
- return $ Pandoc (Meta [] [] []) []
-
-findURLs :: Inline -> [String]
-findURLs (Link label (url, title)) = [url]
-findURLs x = []
diff --git a/plugins/WordPressPlugin.hs b/plugins/WordPressPlugin.hs
deleted file mode 100644
index 85b7ca72b..000000000
--- a/plugins/WordPressPlugin.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module WordPressPlugin (transform) where
-import Text.Pandoc
-
--- This plugin (when used with -m) prints LaTeX math in the
--- format required by WordPress blogs. $e=mc^2$ becomes
--- $LaTeX e=mc^2$.
-
-transform :: Inline -> Inline
-transform (Math x y) = Math x $ "LaTeX " ++ y
-transform x = x