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

Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Server

# Documentation

app :: Application Source #

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))))) Source #

data ServerOpts Source #

Constructors

ServerOpts |

Fields

- serverPort :: Int
- serverTimeout :: Int

#### Instances

Instances details

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

data Params Source #

Constructors

Params |

Fields

- options :: Opt
- text :: Text
- files :: Maybe (Map FilePath Blob)
- citeproc :: Maybe Bool

#### Instances

Instances details

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

newtype Blob Source #

Constructors

Blob ByteString |

#### Instances

Instances details

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

parseServerOptsFromArgs :: [String] -> IO ServerOpts Source #