NAME

Pandoc::Release - information about pandoc releases from GitHub

SYNOPSIS

use Pandoc::Release;

my @releases = Pandoc::Release->list(since => '2.0', verbose => 1);
foreach my $release (@releases) {

    # print version number
	  say $release->{tag_name};

    # download Debian package and executable
    $release->download(arch => 'amd64', dir => './deb', bin => './bin');
}

DESCRIPTION

This utility module fetches information about pandoc releases via GitHub API. It requires at least Perl 5.14 or HTTP::Tiny and JSON::PP installed.

FUNCTIONS

list( [ since => $version ] [, verbose => 0|1 ] )

Get a list of all releases, optionally since a given pandoc version. Option verbose will print URLs before each request.

METHODS

download( arch => $arch, dir => $dir [, bin => $bin] [, verbose => 0|1] )

Download the Debian release file for some architecture (e.g. amd64) to directory dir, unless already there. Optionally extract pandoc binary to bin directory named after version number (e.g. bin/2.1.2). The binary can then be wrapped as instance of Pandoc:

my $pandoc = Pandoc->new("$dir/$version");

Returns the version number as Pandoc::Version on success.

SEE ALSO

https://developer.github.com/v3/repos/releases/