[libpandoc-wrapper-perl] 08/14: New upstream version 0.6.1

Jonas Smedegaard dr at jones.dk
Sat Oct 28 01:35:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.6.1-1
in repository libpandoc-wrapper-perl.

commit c129d4e48c313c68c05cce6f2d49f546c3249aa1
Merge: 9483153 c3e5eb6
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sat Oct 28 03:27:10 2017 +0200

    New upstream version 0.6.1

 Changes               |  5 ++++-
 META.json             |  3 ++-
 META.yml              |  3 ++-
 README                | 12 +++++++-----
 lib/Pandoc.pm         | 18 ++++++++++--------
 lib/Pandoc/Version.pm |  2 +-
 t/convert.t           |  4 ++--
 t/example.md          |  2 +-
 t/parse.t             | 11 +++++------
 9 files changed, 34 insertions(+), 26 deletions(-)

diff --cc Changes
index bd9c0ca,558a907..2f6dcfd
--- a/Changes
+++ b/Changes
@@@ -1,5 -1,10 +1,8 @@@
  Revision history for Pandoc Perl module
  
 -{{$NEXT}}
 -
+ 0.6.1  2017-10-17 20:43:51 CEST
+     - make sure to override existing options and output destination (#16)
+ 
  0.6.0  2017-01-27 10:51:10 CET
      - support more expressive version requirements
  
diff --cc META.yml
index f87fddf,0000000..2972ac0
mode 100644,000000..100644
--- a/META.yml
+++ b/META.yml
@@@ -1,36 -1,0 +1,37 @@@
 +---
 +abstract: 'wrapper for the mighty Pandoc document converter'
 +author:
 +  - 'Jakob Voß'
 +build_requires:
 +  Test::Exception: '0'
 +  Test::More: '0.96'
 +configure_requires:
 +  Module::Build::Tiny: '0.039'
 +dynamic_config: 0
 +generated_by: 'Dist::Zilla version 5.036, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150001'
 +license: gpl
 +meta-spec:
 +  url: http://module-build.sourceforge.net/META-spec-v1.4.html
 +  version: '1.4'
 +name: Pandoc
 +no_index:
 +  directory:
 +    - t
 +    - xt
 +    - inc
 +    - share
 +    - eg
 +    - examples
 +requires:
 +  File::Which: '1.11'
 +  IPC::Run3: '0'
 +  perl: '5.010'
 +resources:
 +  bugtracker: https://github.com/nichtich/Pandoc-Wrapper/issues
 +  homepage: https://github.com/nichtich/Pandoc-Wrapper
 +  repository: https://github.com/nichtich/Pandoc-Wrapper.git
- version: 0.6.0
++version: 0.6.1
 +x_contributors:
 +  - 'Benct Philip Jonsson <bpjonsson at gmail.com>'
++  - 'Edward Betts <edward at 4angle.com>'
 +  - 'Jakob Voß <jakob.voss at gbv.de>'
diff --cc README
index e019042,0000000..b14a30a
mode 100644,000000..100644
--- a/README
+++ b/README
@@@ -1,249 -1,0 +1,251 @@@
 +NAME
 +
 +    Pandoc - wrapper for the mighty Pandoc document converter
 +
 +SYNOPSIS
 +
 +      use Pandoc;             # check at first use
 +      use Pandoc 1.12;        # check at compile time
 +      Pandoc->require(1.12);  # check at run time
 +    
 +      # execute pandoc
 +      pandoc 'input.md', -o => 'output.html';
 +      pandoc -f => 'html', -t => 'markdown', { in => \$html, out => \$md };
 +    
 +      # alternative syntaxes
 +      pandoc->run('input.md', -o => 'output.html');
 +      pandoc [ -f => 'html', -t => 'markdown' ], in => \$html, out => \$md;
 +      pandoc [ -f => 'html', -t => 'markdown' ], { in => \$html, out => \$md };
 +    
 +      # check executable
 +      pandoc or die "pandoc executable not found";
 +    
 +      # check minimum version
 +      pandoc->version > 1.12 or die "pandoc >= 1.12 required";
 +    
 +      # access properties
 +      say pandoc->bin." ".pandoc->version;
 +      say "Default user data directory: ".pandoc->data_dir;
 +      say "Compiled with: ".join(", ", keys %{ pandoc->libs });
 +      say pandoc->libs->{'highlighting-kate'};
 +    
 +      # create a new instance with default arguments
 +      my $md2latex = Pandoc->new(qw(-f markdown -t latex --smart));
 +      $md2latex->run({ in => \$markdown, out => \$latex });
 +    
 +      # set default arguments on compile time
 +      use Pandoc qw(-t latex);
 +      use Pandoc qw(/usr/bin/pandoc --smart);
 +      use Pandoc qw(1.16 --smart);
 +    
 +    
 +      # utility method to convert from string
 +      $latex = pandoc->convert( 'markdown' => 'latex', '*hello*' );
 +    
 +      # utility methods to parse abstract syntax tree (requires Pandoc::Elements)
 +      $doc = pandoc->parse( markdown => '*hello* **world!**' );
 +      $doc = pandoc->file( 'example.md' );
++      $doc = pandoc->file;  # read Markdown from STDIN
 +
 +DESCRIPTION
 +
 +    This module provides a Perl wrapper for John MacFarlane's Pandoc
 +    <http://pandoc.org> document converter.
 +
 + IMPORTING
 +
 +    The utility function pandoc is exported, unless the module is imported
 +    with an empty list (use Pandoc ();).
 +
 +    Importing this module with a version number or a more complex version
 +    requirenment (e.g. use Pandoc 1.13; or use Pandoc '>= 1.6, !=1.7) will
 +    check version number of pandoc executable instead of version number of
 +    this module (see $Pandoc::VERSION for the latter). Additional import
 +    arguments can be passed to set the executable location and default
 +    arguments of the global Pandoc instance used by function pandoc.
 +
 +FUNCTIONS
 +
 + pandoc
 +
 +    If called without parameters, this function returns a global instance
 +    of class Pandoc to execute methods, or undef if no pandoc executable
 +    was found. The location and/or name of pandoc executable can be set
 +    with environment variable PANDOC_PATH (set to the string pandoc by
 +    default).
 +
 + pandoc( ... )
 +
 +    If called with parameters, this functions runs the pandoc executable
 +    configured at the global instance of class Pandoc (pandoc->bin).
 +    Arguments are passed as command line arguments and options control
 +    input, output, and error stream as described below. Returns 0 on
 +    success. Otherwise returns the the exit code of pandoc executable or -1
 +    if execution failed. Arguments and options can be passed as plain
 +    array/hash or as (possibly empty) reference in the following ways:
 +
 +      pandoc @arguments, \%options;     # ok
 +      pandoc \@arguments, %options;     # ok
 +      pandoc \@arguments, \%options;    # ok
 +      pandoc @arguments;                # ok, if first of @arguments starts with '-'
 +      pandoc %options;                  # ok, if %options is not empty
 +    
 +      pandoc @arguments, %options;      # not ok!
 +
 +  Options
 +
 +    in / out / err
 +
 +      These options correspond to arguments $stdin, $stdout, and $stderr of
 +      IPC::Run3, see there for details.
 +
 +    binmode_stdin / binmode_stdout / binmode_stderr
 +
 +      These options correspond to the like-named options to IPC::Run3, see
 +      there for details.
 +
 +    binmode
 +
 +      If defined any binmode_stdin/binmode_stdout/binmode_stderr option
 +      which is undefined will be set to this value.
 +
 +    return_if_system_error
 +
 +      Set to true by default to return the exit code of pandoc executable.
 +
 +    For convenience the pandoc function (after checking the binmode option)
 +    checks the contents of any scalar references passed to the in/out/err
 +    options with utf8::is_utf8() and sets the
 +    binmode_stdin/binmode_stdout/binmode_stderr options to :encoding(UTF-8)
 +    if the corresponding scalar is marked as UTF-8 and the respective
 +    option is undefined. Since all pandoc executable input/output must be
 +    UTF-8 encoded this is convenient if you run with use utf8, as you then
 +    don't need to set the binmode options at all (encode nor decode) when
 +    passing input/output scalar references.
 +
 +METHODS
 +
 + new( [ $executable ] [, @arguments ] )
 +
 +    Create a new instance of class Pandoc or throw an exception if no
 +    pandoc executable was found. The first argument, if given and not
 +    starting with -, can be used to set the pandoc executable (pandoc by
 +    default). Additional arguments are passed to the executable on each
 +    run.
 +
 +    Repeated use of this constructor with same arguments is not recommended
 +    because pandoc --version is called for every new instance.
 +
 + run( ... )
 +
 +    Execute the pandoc executable with default arguments and optional
 +    additional arguments and options. See function pandoc for usage.
 +
 + convert( $from => $to, $input [, @arguments ] )
 +
 +    Convert a string in format $from to format $to. Additional pandoc
 +    options such as --smart and --standalone can be passed. The result is
 +    returned in same utf8 mode (utf8::is_unicode) as the input. To convert
 +    from file to string use method pandoc/run like this and set
 +    input/output format via standard pandoc arguments -f and -t:
 +
 +      pandoc->run( $filename, @arguments, { out => \$string } );
 +
 + parse( $from => $input [, @arguments ] )
 +
 +    Parse a string in format $from to a Pandoc::Document object. Additional
 +    pandoc options such as --smart and --normalize can be passed. This
 +    method requires at least pandoc version 1.12.1 and the Perl module
 +    Pandoc::Elements.
 +
 +    The reverse action is possible with method to_pandoc of
 +    Pandoc::Document. Additional shortcut methods such as to_html are
 +    available:
 +
 +      $html = pandoc->parse( 'markdown' => '# A *section*' )->to_html;
 +
 +    Method convert should be preferred for simple conversions unless you
 +    want to modify or inspect the parsed document in between.
 +
-  file( $filename [, @arguments ] )
++ file( [ $filename [, @arguments ] ] )
 +
-     Parse from a file to a Pandoc::Document object. Additional pandoc
-     options can be passed, for instance use HTML input format (@arguments =
-     qw(-f html)) instead of default markdown. This method Requires at least
-     pandoc version 1.12.1 and the Perl module Pandoc::Elements.
++    Parse from a file (or STDIN) to a Pandoc::Document object. Additional
++    pandoc options can be passed, for instance use HTML input format
++    (@arguments = qw(-f html)) instead of default markdown. This method
++    requires at least pandoc version 1.12.1 and the Perl module
++    Pandoc::Elements.
 +
 + require( $version_requirement )
 +
 +    Return the Pandoc instance if its version number fulfills a given
 +    version requirement. Throw an error otherwise. Can also be called as
 +    constructor: Pandoc->require(...) is equivalent to pandoc->require but
 +    throws a more meaningful error message if no pandoc executable was
 +    found.
 +
 + version( [ $version_requirement ] )
 +
 +    Return the pandoc version as Pandoc::Version object. If a version
 +    requirement is given, the method returns undef if the pandoc version
 +    does not fulfill this requirement. To check whether pandoc is available
 +    with a given minimal version use one of:
 +
 +      Pandoc->require( $minimum_version)                # true or die
 +      pandoc and pandoc->version( $minimum_version )    # true or false
 +
 + bin( [ $executable ] )
 +
 +    Return or set the pandoc executable. Setting an new executable also
 +    updates version and data_dir by calling pandoc --version.
 +
 + arguments( [ @arguments | \@arguments )
 +
 +    Return or set a list of default arguments.
 +
 + data_dir
 +
 +    Return the default data directory (only available since Pandoc 1.11).
 +
 + input_formats
 +
 +    Return a list of supported input formats.
 +
 + output_formats
 +
 +    Return a list of supported output formats.
 +
 + highlight_languages
 +
 +    Return a list of programming languages which syntax highlighting is
 +    supported for (via Haskell library highlighting-kate).
 +
 + libs
 +
 +    Return a hash mapping the names of Haskell libraries compiled into the
 +    pandoc executable to Pandoc::Version objects.
 +
 +SEE ALSO
 +
 +    See Pandoc::Elements for a Perl interface to the abstract syntax tree
 +    of Pandoc documents for more elaborate document processing.
 +
 +    See Pandoc wrappers and interfaces
 +    <https://github.com/jgm/pandoc/wiki/Pandoc-wrappers-and-interfaces> in
 +    the Pandoc GitHub Wiki for a list of wrappers in other programming
 +    languages.
 +
 +    Other Pandoc related but outdated modules at CPAN include
 +    Orze::Sources::Pandoc and App::PDoc.
 +
 +AUTHOR
 +
 +    Jakob Voß
 +
 +CONTRIBUTORS
 +
 +    Benct Philip Jonsson
 +
 +LICENSE
 +
 +    GNU General Public License, Version 2
 +

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpandoc-wrapper-perl.git



More information about the Pkg-perl-cvs-commits mailing list