File: pod2markdown

package info (click to toggle)
libpod-markdown-perl 1.100860-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 188 kB
  • ctags: 14
  • sloc: perl: 636; makefile: 2
file content (31 lines) | stat: -rwxr-xr-x 668 bytes parent folder | download
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
#!/usr/bin/env perl
use 5.008;
use strict;
use warnings;

use Pod::Markdown;
convert(\*STDIN, \*STDOUT);

sub convert {
    my ($in_file, $out_file) = @_;
    my $parser = Pod::Markdown->new;
    $parser->parse_from_filehandle($in_file);
    print $out_file $parser->as_markdown;
}

=head1 NAME

pod2markdown - Convert POD text to Markdown 

=head1 SYNOPSIS

    $ pod2markdown < POD_File > Markdown_File

=head1 DESCRIPTION

This program uses L<Pod::Markdown> to convert POD into Markdown sources. It is
a filter that expects POD on STDIN and outputs Markdown on STDOUT.

=head1 SEE ALSO

This program is strongly based on C<pod2mdwn> from L<Module::Build::IkiWiki>.