module Text.BlogLiterately.Options
( BlogLiterately(..)
, blOpts
)
where
import Paths_BlogLiterately (version)
import Data.Version
import System.Console.CmdArgs
import Text.BlogLiterately.Highlight
data BlogLiterately = BlogLiterately
{ style :: String
, hsHighlight :: HsHighlight
, otherHighlight :: Bool
, wplatex :: Bool
, math :: String
, ghci :: Bool
, uploadImages :: Bool
, categories :: [String]
, tags :: [String]
, blogid :: String
, blog :: Maybe String
, user :: String
, password :: Maybe String
, title :: String
, file :: String
, postid :: Maybe String
, page :: Bool
, publish :: Bool
, xtra :: [String]
}
deriving (Show,Data,Typeable)
blOpts :: BlogLiterately
blOpts = BlogLiterately
{ style = "" &= help "style specification (for --hscolour-icss)"
&= typFile
, hsHighlight = enum
[ (HsColourInline defaultStylePrefs)
&= explicit
&= name "hscolour-icss"
&= help "highlight haskell: hscolour, inline style (default)"
, HsColourCSS
&= explicit
&= name "hscolour-css"
&= help "highlight haskell: hscolour, separate stylesheet"
, HsNoHighlight
&= explicit
&= name "hs-nohighlight"
&= help "no haskell highlighting"
, HsKate
&= explicit
&= name "hs-kate"
&= help "highlight haskell with highlighting-kate"
]
, otherHighlight = enum
[ True
&= explicit
&= name "kate"
&= help "highlight non-Haskell code with highlighting-kate (default)"
, False
&= explicit
&= name "no-kate"
&= help "don't highlight non-Haskell code"
]
, wplatex = def &= help "reformat inline LaTeX the way WordPress expects"
, math = def &= help "how to layout math, where --math=<pandoc-option>[=URL]"
, ghci = def &= help "run [ghci] blocks through ghci and include output"
, uploadImages = def &= name "upload-images" &= explicit &= help "upload local images"
, page = def &= help "create a \"page\" instead of a post (WordPress only)"
, publish = def &= help "publish post (otherwise it's uploaded as a draft)"
, categories = def
&= explicit
&= name "category"
&= help "post category (can specify more than one)"
, tags = def
&= explicit
&= name "tag"
&= help "tag (can specify more than one)"
, xtra = def
&= help "extension arguments, for use with custom extensions"
, blogid = "default" &= help "Blog specific identifier" &= typ "ID"
, postid = def &= help "Post to replace (if any)" &= typ "ID"
, blog = def &= typ "URL" &= help "blog XML-RPC url (if omitted, html goes to stdout)"
, user = def &= typ "USER" &= help "user name"
, password = def &= typ "PASSWORD" &= help "password"
, title = def &= typ "TITLE" &= help "post title"
, file = def &= argPos 0 &= typ "FILE"
}
&= program "BlogLiterately"
&= summary ("BlogLierately v" ++ showVersion version ++ ", (c) Robert Greayer 2008-2010, Brent Yorgey 2012\n" ++
"This program comes with ABSOLUTELY NO WARRANTY\n")