Skip to content

Added filter functionality#24

Open
alejandroliu wants to merge 1 commit intogumpu:releasefrom
TortugaLabs:filter-v1
Open

Added filter functionality#24
alejandroliu wants to merge 1 commit intogumpu:releasefrom
TortugaLabs:filter-v1

Conversation

@alejandroliu
Copy link

This PR introduces "filter" functionality. It similar to the tool feature, but it will take the tool output
and embed it into the output documentation file in-place.

Example use:

/****m* tools/filtertest
 *
 * NAME
 *   FilterTest
 *
 * DESCRIPTION
 *   Example showing how to invoke external filter
 *
 * EXAMPLE
 * This one formats markdown input.  This requires a `markdown` command to exist:
 * The input data is passed through stdin.
 *
 * |filter markdown
 * This is markdown text:
 *
 * Use like *this* or __that__.
 * |filter end
*
* Using pandoc:
* 
* |filter pandoc -f csv -t %output_mode%
 * Country, Sales
 * Netherlands, 100
 * Belgium, 500
 * Luxemburg, 50
 * Total, 650
 * |filter end
 *
 ******
 */

To support multiple output formats, the %output_mode% is replaced to one of the following:

ascii, latex, html, rtf, troff, xmldocbook, raw

So the filter can then arrange the output accordingly. For example, a tool like pandoc
can be used to parse multiple mark-up formats and generate HTML, RTF, LaTeX, docbook, roff.

This means that a number of feature requests on the issues list could be implemented via external filter. For example:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant