Node.js port of the Python pandocfilters for filtering with Pandoc
npm install -g pandoc-filter
#!/usr/bin/env node
// Pandoc filter to convert all text to uppercase
var pandoc = require('pandoc-filter');
var Str = pandoc.Str;
function action(type,value,format,meta) {
if (type === 'Str') return Str(value.toUpperCase());
}
pandoc.stdio(action);
v0.1.6
is required for pandoc versions after 1.17.2
to support the new JSON
format. See this issue for details.
Thanks to John MacFarlane for Pandoc.
MIT