Skip to content

Commit

Permalink
0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtich committed May 11, 2018
1 parent 2914bfd commit e7786f4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,6 +1,8 @@
Revision history for Pod-Pandoc

{{$NEXT}}
- Remove NAME section by default, include with option --name
- Allow to disable module linking with --podurl 0

0.4.1 2018-05-10 22:01:34 CEST
- Fix running on Windows
Expand Down
3 changes: 1 addition & 2 deletions META.json
Expand Up @@ -38,7 +38,6 @@
"runtime" : {
"requires" : {
"Getopt::Long" : "0",
"IPC::Run3" : "0",
"Pandoc" : "v0.6.0",
"Pandoc::Elements" : "0.33",
"Pod::Simple" : "3.08",
Expand Down Expand Up @@ -67,7 +66,7 @@
"web" : "https://github.com/nichtich/Pod-Pandoc"
}
},
"version" : "0.4.1",
"version" : "0.5.0",
"x_contributors" : [
"Benct Philip Jonsson <bpjonsson@gmail.com>",
"Jakob Voß <jakob.voss@gbv.de>"
Expand Down
27 changes: 20 additions & 7 deletions README.md
Expand Up @@ -26,20 +26,33 @@ Pandoc document model for further processing with Pandoc.
# OUTLINE

- [pod2pandoc](https://metacpan.org/pod/pod2pandoc) is a command line script to convert Pod to any format supported
by Pandoc
- [App::pod2pandoc](https://metacpan.org/pod/App::pod2pandoc) provides functionality of [pod2pandoc](https://metacpan.org/pod/pod2pandoc) to be used in Perl code
- [Pod::Simple::Pandoc](https://metacpan.org/pod/Pod::Simple::Pandoc) converts Pod to the abstract document model of Pandoc
- [Pod::Pandoc::Modules](https://metacpan.org/pod/Pod::Pandoc::Modules) manages a set of Pod documents of Perl modules
by Pandoc.
- [App::pod2pandoc](https://metacpan.org/pod/App::pod2pandoc) provides functionality of [pod2pandoc](https://metacpan.org/pod/pod2pandoc) to be used in Perl code.
- [Pod::Simple::Pandoc](https://metacpan.org/pod/Pod::Simple::Pandoc) converts Pod to the abstract document model of Pandoc.
- [Pod::Pandoc::Modules](https://metacpan.org/pod/Pod::Pandoc::Modules) manages a set of Pod documents of Perl modules.

# REQUIREMENTS

Installation of this module does not require Pandoc but it is needed to make
actual use of it. See [http://pandoc.org/installing.html](http://pandoc.org/installing.html) for installation.

# EXAMPLES
# USAGE EXAMPLES

GitHub wiki and Sphinx documentation are automatically build on each commit to
the `master` branch (see script `deploy.sh`).
## Replace [pod2html](https://metacpan.org/pod/pod2html)

# pod2html --infile=input.pm --css=style.css --title=TITLE > output.html
pod2pandoc input.pm --css=style.css --toc --name -o output.html

Pandoc option `--toc` corresponds to pod2html option `--index` and is
disabled by default. pod2pandoc adds title and subtitle from NAME section.

## Replace [pod2markdown](https://metacpan.org/pod/pod2markdown)

# pod2markdown input.pod
pod2pandoc input.pod -t markdown

# pod2markdown input.pod output.md
pod2pandoc input.pod -o output.md

## GitHub wiki

Expand Down
2 changes: 1 addition & 1 deletion lib/Pod/Pandoc.pm
Expand Up @@ -3,7 +3,7 @@ use strict;
use warnings;
require 5.010;

our $VERSION = '0.4.1';
our $VERSION = '0.5.0';

use Pod::Simple::Pandoc;
use Pod::Pandoc::Modules;
Expand Down
6 changes: 5 additions & 1 deletion lib/Pod/Pandoc/Modules.pm
Expand Up @@ -58,7 +58,11 @@ sub index {
my @definitions = map {
[
[ module_link( $_, \%opt ) ],
[ [ Plain [ Str ($modules->{$_}->metavalue('subtitle') // '') ] ] ]
[
[
Plain [ Str( $modules->{$_}->metavalue('subtitle') // '' ) ]
]
]
]
} sort keys %$modules;

Expand Down
2 changes: 1 addition & 1 deletion t/app-pod2pandoc.t
Expand Up @@ -30,7 +30,7 @@ sub slurp { local ( @ARGV, $/ ) = @_; <> }

# convert and emit to STDOUT
$stdout = stdout_from { pod2pandoc( \@source, '-t', 'rst' ) };
like $stdout, qr/^NAME/, 'convert to STDOUT';
like $stdout, qr/^DESCRIPTION/m, 'convert to STDOUT';
}

# convert multiple files
Expand Down

0 comments on commit e7786f4

Please sign in to comment.