File: multifilter

package info (click to toggle)
libpandoc-elements-perl 0.38-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 732 kB
  • sloc: perl: 1,630; makefile: 15; sh: 1
file content (47 lines) | stat: -rwxr-xr-x 883 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env perl
use strict;
use v5.10;

=head1 NAME

multifilter - Pandoc filter to apply filters listed in field C<multifilter>

=head1 DESCRIPTION

This Pandoc filter applies other filters listed in document metadata field
C<multifilter>. The filters can be specified like with pandoc option C<-F> or
C<--filter>. For instance C<input.md>:

  ---
  filters:
    - filter1        # in $PATH or ~/.pandoc/filters
    - ./filter2.pl   # relative path
    - /path/filter3  # absolute path
  ...

converted via

  pandoc --filter multifilter input.md

will be filtered like

  pandoc -F filter1 -F ./filter2.pl -F /path/filter3 input.md

In addition, filters are searched in C<~/.pandoc/filters>.

=head1 OPTIONS

=over

=item --help|-h

Print this help

=back

=cut

use Pandoc::Filter;
use Pandoc::Filter::Multifilter;

pandoc_filter_document( Pandoc::Filter::Multifilter->new );