Text.Pandoc.Server

pandoc-server-0.1.0.11: Pandoc document conversion as an HTTP servant-server

Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Server

# Documentation

app :: Application #

type API = (ReqBody '[JSON] Params :> Post '[OctetStream] ByteString) :<|> ((ReqBody '[JSON] Params :> Post '[PlainText] Text) :<|> ((ReqBody '[JSON] Params :> Post '[JSON] Output) :<|> (("batch" :> (ReqBody '[JSON] [Params] :> Post '[JSON] [Output])) :<|> (("babelmark" :> (QueryParam' '[Required] "text" Text :> (QueryParam "from" Text :> (QueryParam "to" Text :> (QueryFlag "standalone" :> Get '[JSON] Value))))) :<|> ("version" :> Get '[PlainText, JSON] Text))))) #

data ServerOpts #

Constructors

ServerOpts |
Fields serverPort :: Int serverTimeout :: Int

#### Instances

Instances details

Show ServerOpts # |
Instance details Defined in Text.Pandoc.Server Methods showsPrec :: Int -> ServerOpts -> ShowS # show :: ServerOpts -> String # showList :: [ServerOpts] -> ShowS #

data Params #

Constructors

Params |
Fields options :: Opt text :: Text files :: Maybe (Map FilePath Blob) citeproc :: Maybe Bool

#### Instances

Instances details

FromJSON Params # |
Instance details Defined in Text.Pandoc.Server Methods parseJSON :: Value -> Parser Params # parseJSONList :: Value -> Parser [Params] # omittedField :: Maybe Params #
ToJSON Params # |
Instance details Defined in Text.Pandoc.Server Methods toJSON :: Params -> Value # toEncoding :: Params -> Encoding # toJSONList :: [Params] -> Value # toEncodingList :: [Params] -> Encoding # omitField :: Params -> Bool #
Default Params # |
Instance details Defined in Text.Pandoc.Server Methods def :: Params #
Show Params # |
Instance details Defined in Text.Pandoc.Server Methods showsPrec :: Int -> Params -> ShowS # show :: Params -> String # showList :: [Params] -> ShowS #

newtype Blob #

Constructors

Blob ByteString |

#### Instances

Instances details

FromJSON Blob # |
Instance details Defined in Text.Pandoc.Server Methods parseJSON :: Value -> Parser Blob # parseJSONList :: Value -> Parser [Blob] # omittedField :: Maybe Blob #
ToJSON Blob # |
Instance details Defined in Text.Pandoc.Server Methods toJSON :: Blob -> Value # toEncoding :: Blob -> Encoding # toJSONList :: [Blob] -> Value # toEncodingList :: [Blob] -> Encoding # omitField :: Blob -> Bool #
Show Blob # |
Instance details Defined in Text.Pandoc.Server Methods showsPrec :: Int -> Blob -> ShowS # show :: Blob -> String # showList :: [Blob] -> ShowS #
Eq Blob # |
Instance details Defined in Text.Pandoc.Server Methods (==) :: Blob -> Blob -> Bool # (/=) :: Blob -> Blob -> Bool #

parseServerOptsFromArgs :: [String] -> IO ServerOpts #