Pandoc::Release - get pandoc releases from GitHub
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'); }
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.
Get a list of all pandoc releases at GitHub, optionally since some version and within a version range such as !=1.16, <=1.17 or ==2.1.2. See "Version Ranges" in CPAN::Meta::Spec for possible values. Option verbose will print URLs before each request.
!=1.16, <=1.17
==2.1.2
verbose
Download the Debian release file for some architecture (e.g. amd64) to directory dir, unless already there. Optionally extract pandoc executables to directory bin, each named by pandoc version number (e.g. 2.1.2). These executables can be used with constructor of Pandoc and with App::Prove::Plugin::andoc:
amd64
dir
bin
2.1.2
my $pandoc = Pandoc->new("$bin/$version");
https://developer.github.com/v3/repos/releases/
To install Pandoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pandoc
CPAN shell
perl -MCPAN -e shell install Pandoc
For more information on module installation, please visit the detailed CPAN module installation guide.