2017-09-16 23:00:20 -07:00
|
|
|
% Using the pandoc API
|
|
|
|
% John MacFarlane
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
intro - pandoc can be used as a library, to write
|
|
|
|
your own custom conversion tools, or to power
|
|
|
|
a web application.
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:00:20 -07:00
|
|
|
# Basic usage
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
a simple example
|
|
|
|
|
2017-09-16 23:00:20 -07:00
|
|
|
# The Pandoc structure
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
blocks/inlines
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
# Readers and writers
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
getReader, getWriter
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
# Options
|
|
|
|
|
|
|
|
inc extensions
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:00:20 -07:00
|
|
|
# Builder
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
Inlines vs Inline, etc.
|
|
|
|
monoid
|
|
|
|
|
2017-02-01 12:50:44 +01:00
|
|
|
example: report from CSV data
|
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
# The PandocMonad class
|
|
|
|
|
|
|
|
motivations
|
|
|
|
Class.
|
|
|
|
advanced: custom PandocMonad instances
|
|
|
|
|
|
|
|
# Templates and other data files
|
|
|
|
|
|
|
|
# Handling errors and warnings
|
|
|
|
|
2017-09-16 23:00:20 -07:00
|
|
|
# Generic transformations
|
2017-02-01 12:50:44 +01:00
|
|
|
|
|
|
|
Walk and syb for AST transformations
|
|
|
|
|
2017-09-16 23:00:20 -07:00
|
|
|
# Filters
|
2017-02-01 12:50:44 +01:00
|
|
|
|
2017-09-16 23:17:33 -07:00
|
|
|
just the basic idea of toJSONFilter
|
|
|
|
the rest can be left to filters.md
|
|
|
|
|
|
|
|
# Self-contained
|
|
|
|
|
|
|
|
|
|
|
|
# PDF
|
|
|
|
|
|
|
|
# Creating a front-end
|
|
|
|
|
|
|
|
Text.Pandoc.App
|
2017-02-01 12:50:44 +01:00
|
|
|
|