The servant-pandoc package

[ Tags: library, mit, web ] [ Propose Tags ]

Use pandoc to generate documentation for your Servant API.


[Skip to Readme]

Properties

Versions 0.1, 0.1.0.1, 0.1.0.2, 0.4.0, 0.4.1, 0.4.1.1, 0.4.1.2, 0.4.1.3, 0.4.1.4
Change log CHANGELOG
Dependencies base (>=4.7 && <5), bytestring (==0.10.*), case-insensitive (>=0.2 && <1.3), http-media (>=0.6 && <0.8), lens (>=4.9 && <5), pandoc-types (>=1.12 && <1.18), servant-docs (==0.11.*), string-conversions (>=0.1 && <0.5), text (==1.2.*), unordered-containers (==0.2.*) [details]
License MIT
Author Matthew Pickering, Ivan Miljenovic
Maintainer Ivan.Miljenovic@gmail.com
Category Web
Source repository head: git clone https://github.com/mpickering/servant-pandoc/
Uploaded Tue Jul 25 06:18:37 UTC 2017 by IvanMiljenovic
Distributions NixOS:0.4.1.4, Stackage:0.4.1.4
Downloads 1154 total (22 in the last 30 days)
Rating 2.0 (1 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-07-25 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for servant-pandoc-0.4.1.4

[back to package description]

There are two ways in which to use this module.

The first is to use the renderer directly with the pandoc API. A very simple program to render the API documentation as a mediawiki document might look as follows.

 import Text.Pandoc import Servant.Docs.Pandoc import Servant.Docs
 import Data.Default (def)

 myApi :: Proxy MyAPI myApi = Proxy

 writeDocs :: API -\> IO () writeDocs api = writeFile "api.mw"
 (writeMediaWiki def (pandoc api))

The second approach is to use makeFilter to make a filter which can be used directly with pandoc from the command line. This filter will just append the API documentation to the end of the document. Example usage

-- api.hs
main :: IO ()
main = makeFilter (docs myApi)

> pandoc -o api.pdf --filter=api.hs manual.md