view release on metacpan or search on metacpan
0.021 2023-06-26 Released-By: PERLANCAR; Urgency: low
- No functional changes.
- [ux] Log convert/downsize command at info, not trace.
0.020 2023-03-01 Released-By: PERLANCAR; Urgency: medium
- Add utilities convert-image-to-jpg (img2jpg, png2jpg),
convert-image-to-png (img2png, jpg2png).
- Add --quality (-q) option to the convert-* utilities.
0.019 2022-05-08 Released-By: PERLANCAR; Urgency: low
- No functional changes.
- [build] Rebuild with newer
Pod::Weaver::Section::PERLANCAR::Contributing and
META.json
META.yml
Makefile.PL
README
dist.ini
lib/App/ImageMagickUtils.pm
script/calc-image-resized-size
script/convert-image-to
script/convert-image-to-jpg
script/convert-image-to-pdf
script/convert-image-to-png
script/downsize-image
script/image-resize-notation-to-human
script/img2jpg
script/img2pdf
script/img2png
script/jpg2png
script/png2jpg
t/00-compile.t
t/author-critic.t
t/author-pod-coverage.t
t/author-pod-syntax.t
t/release-rinci.t
weaver.ini
"name" : "GenPericmdScript convert-image-to-jpg",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript convert-image-to-pdf",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript convert-image-to-png",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript img2jpg",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript img2png",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript jpg2png",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript png2jpg",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript downsize-image",
"version" : "0.425"
},
{
"class" : "Dist::Zilla::Plugin::GenPericmdScript",
"name" : "GenPericmdScript calc-image-resized-size",
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript convert-image-to-jpg'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript convert-image-to-pdf'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript convert-image-to-png'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript img2jpg'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript img2png'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript jpg2png'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript png2jpg'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript downsize-image'
version: '0.425'
-
class: Dist::Zilla::Plugin::GenPericmdScript
name: 'GenPericmdScript calc-image-resized-size'
version: '0.425'
-
Makefile.PL view on Meta::CPAN
"AUTHOR" => "perlancar <perlancar\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "App-ImageMagickUtils",
"EXE_FILES" => [
"script/calc-image-resized-size",
"script/convert-image-to",
"script/convert-image-to-jpg",
"script/convert-image-to-pdf",
"script/convert-image-to-png",
"script/downsize-image",
"script/image-resize-notation-to-human",
"script/img2jpg",
"script/img2pdf",
"script/img2png",
"script/jpg2png",
"script/png2jpg"
],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010001",
"NAME" => "App::ImageMagickUtils",
"PREREQ_PM" => {
"Data::Sah::Compiler::perl::TH::array" => "0.914",
"Data::Sah::Compiler::perl::TH::bool" => "0.914",
"Data::Sah::Compiler::perl::TH::int" => "0.914",
"Data::Sah::Compiler::perl::TH::str" => "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" => 0,
Perl distribution App-ImageMagickUtils), released on 2024-12-21.
DESCRIPTION
This distribution includes the following CLI utilities related to
ImageMagick:
1. calc-image-resized-size
2. convert-image-to
3. convert-image-to-jpg
4. convert-image-to-pdf
5. convert-image-to-png
6. downsize-image
7. image-resize-notation-to-human
8. img2jpg
9. img2pdf
10. img2png
11. jpg2png
12. png2jpg
FUNCTIONS
convert_image_to
Usage:
convert_image_to(%args) -> [$status_code, $reason, $payload, \%result_meta]
Convert images using ImageMagick's 'convert' utility, with multiple file
support and automatic output naming.
convert_image_to_jpg
Usage:
convert_image_to_jpg(%args) -> [$status_code, $reason, $payload, \%result_meta]
Convert images to JPG using ImageMagick's 'convert' utility.
This is a wrapper to "convert-image-to", with "--to" set to "jpg":
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
This function is not exported.
Arguments ('*' denotes required arguments):
* delete_original => *bool*
Delete (unlink) the original file after downsizing.
See also the "trash_original" option.
element ($reason) is a string containing error message, or something
like "OK" if status is 200. Third element ($payload) is the actual
result, but usually not present when enveloped result is an error
response ($status_code is not 2xx). Fourth element (%result_meta) is
called result metadata and is optional, a hash that contains extra
information, much like how HTTP response headers provide additional
metadata.
Return value: (any)
convert_image_to_png
Usage:
convert_image_to_png(%args) -> [$status_code, $reason, $payload, \%result_meta]
Convert images to JPG using ImageMagick's 'convert' utility.
This is a wrapper to "convert-image-to", with "--to" set to "png":
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
This function is not exported.
Arguments ('*' denotes required arguments):
* delete_original => *bool*
Delete (unlink) the original file after downsizing.
See also the "trash_original" option.
read_config=0
read_env=0
[GenPericmdScript/GenPericmdScript convert-image-to-pdf]
url=/App/ImageMagickUtils/convert_image_to_pdf
enable_log=1
default_log_level=info
read_config=0
read_env=0
[GenPericmdScript/GenPericmdScript convert-image-to-png]
url=/App/ImageMagickUtils/convert_image_to_png
enable_log=1
default_log_level=info
read_config=0
read_env=0
; alias
[GenPericmdScript/GenPericmdScript img2jpg]
summary=Alias for convert-image-to-jpg
url=/App/ImageMagickUtils/convert_image_to_jpg
name=img2jpg
enable_log=1
default_log_level=info
read_config=0
read_env=0
; alias
[GenPericmdScript/GenPericmdScript img2png]
summary=Alias for convert-image-to-png
url=/App/ImageMagickUtils/convert_image_to_png
name=img2png
enable_log=1
default_log_level=info
read_config=0
read_env=0
; alias
[GenPericmdScript/GenPericmdScript jpg2png]
summary=Alias for convert-image-to-png
url=/App/ImageMagickUtils/convert_image_to_png
name=jpg2png
enable_log=1
default_log_level=info
read_config=0
read_env=0
; alias
[GenPericmdScript/GenPericmdScript png2jpg]
summary=Alias for convert-image-to-jpg
url=/App/ImageMagickUtils/convert_image_to_jpg
name=png2jpg
enable_log=1
default_log_level=info
read_config=0
read_env=0
[GenPericmdScript/GenPericmdScript downsize-image]
url=/App/ImageMagickUtils/downsize_image
enable_log=1
default_log_level=info
lib/App/ImageMagickUtils.pm view on Meta::CPAN
files => {
'x.name.is_plural' => 1,
'x.name.singular' => 'file',
schema => ['array*' => of => 'filename*'],
req => 1,
pos => 0,
slurpy => 1,
},
);
our %argspec0plus_files__comp_png = (
files => {
'x.name.is_plural' => 1,
'x.name.singular' => 'file',
schema => ['array*' => of => 'filename*'],
'x.completion' => [filename => {file_ext_filter=>'png'}],
req => 1,
pos => 0,
slurpy => 1,
},
);
our %argspec0plus_files__comp_jpg = (
files => {
'x.name.is_plural' => 1,
'x.name.singular' => 'file',
lib/App/ImageMagickUtils.pm view on Meta::CPAN
% for f in *.jpg; do convert "$f" "$f.pdf"; done
MARKDOWN
args => {
%argspec0plus_files,
%argspecopt_quality,
to => {
schema => ['str*', match=>qr/\A\w+\z/],
req => 1,
examples => [qw/pdf jpg png/], # for tab completion
},
%argspecs_delete,
},
#features => {
# dry_run => 1,
#},
deps => {
prog => 'convert',
},
examples => [
lib/App/ImageMagickUtils.pm view on Meta::CPAN
convert_image_to(%args, to=>'pdf');
}
$SPEC{convert_image_to_jpg} = {
v => 1.1,
summary => 'Convert images to JPG using ImageMagick\'s \'convert\' utility',
description => <<'MARKDOWN',
This is a wrapper to `convert-image-to`, with `--to` set to `jpg`:
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
MARKDOWN
args => {
%argspec0plus_files,
%argspecopt_quality,
%argspecs_delete,
},
#features => {
# dry_run => 1,
#},
lib/App/ImageMagickUtils.pm view on Meta::CPAN
prog => 'convert',
},
examples => [
],
};
sub convert_image_to_jpg {
my %args = @_;
convert_image_to(%args, to=>'jpg');
}
$SPEC{convert_image_to_png} = {
v => 1.1,
summary => 'Convert images to JPG using ImageMagick\'s \'convert\' utility',
description => <<'MARKDOWN',
This is a wrapper to `convert-image-to`, with `--to` set to `png`:
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
MARKDOWN
args => {
%argspec0plus_files,
%argspecopt_quality,
%argspecs_delete,
},
#features => {
# dry_run => 1,
#},
deps => {
prog => 'convert',
},
examples => [
],
};
sub convert_image_to_png {
my %args = @_;
convert_image_to(%args, to=>'png');
}
1;
# ABSTRACT: Utilities related to ImageMagick
__END__
=pod
=encoding UTF-8
lib/App/ImageMagickUtils.pm view on Meta::CPAN
=over
=item 1. L<calc-image-resized-size>
=item 2. L<convert-image-to>
=item 3. L<convert-image-to-jpg>
=item 4. L<convert-image-to-pdf>
=item 5. L<convert-image-to-png>
=item 6. L<downsize-image>
=item 7. L<image-resize-notation-to-human>
=item 8. L<img2jpg>
=item 9. L<img2pdf>
=item 10. L<img2png>
=item 11. L<jpg2png>
=item 12. L<png2jpg>
=back
=head1 FUNCTIONS
=head2 convert_image_to
Usage:
lib/App/ImageMagickUtils.pm view on Meta::CPAN
=head2 convert_image_to_jpg
Usage:
convert_image_to_jpg(%args) -> [$status_code, $reason, $payload, \%result_meta]
Convert images to JPG using ImageMagick's 'convert' utility.
This is a wrapper to C<convert-image-to>, with C<--to> set to C<jpg>:
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<delete_original> => I<bool>
Delete (unlink) the original file after downsizing.
lib/App/ImageMagickUtils.pm view on Meta::CPAN
(200 means OK, 4xx caller error, 5xx function error). Second element
($reason) is a string containing error message, or something like "OK" if status is
200. Third element ($payload) is the actual result, but usually not present when enveloped result is an error response ($status_code is not 2xx). Fourth
element (%result_meta) is called result metadata and is optional, a hash
that contains extra information, much like how HTTP response headers provide additional metadata.
Return value: (any)
=head2 convert_image_to_png
Usage:
convert_image_to_png(%args) -> [$status_code, $reason, $payload, \%result_meta]
Convert images to JPG using ImageMagick's 'convert' utility.
This is a wrapper to C<convert-image-to>, with C<--to> set to C<png>:
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<delete_original> => I<bool>
Delete (unlink) the original file after downsizing.
script/convert-image-to-jpg view on Meta::CPAN
B<convert-image-to-jpg> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<convert-image-to-jpg> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<convert-image-to-jpg> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<jpg>:
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/convert-image-to-png view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /App/ImageMagickUtils/convert_image_to_png
# and generated automatically using Perinci::CmdLine::Gen version 0.502
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-12-21'; # DATE
our $DIST = 'App-ImageMagickUtils'; # DIST
our $VERSION = '0.024'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/ImageMagickUtils/convert_image_to_png",
program_name => "convert-image-to-png",
log => 1,
log_level => "info",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert images to JPG using ImageMagick's 'convert' utility
# PODNAME: convert-image-to-png
__END__
=pod
=encoding UTF-8
=head1 NAME
convert-image-to-png - Convert images to JPG using ImageMagick's 'convert' utility
=head1 VERSION
This document describes version 0.024 of convert-image-to-png (from Perl distribution App-ImageMagickUtils), released on 2024-12-21.
=head1 SYNOPSIS
B<convert-image-to-png> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<convert-image-to-png> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<convert-image-to-png> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<png>:
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/convert-image-to-png view on Meta::CPAN
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C convert-image-to-png convert-image-to-png
in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete convert-image-to-png 'p/*/`convert-image-to-png`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
script/img2jpg view on Meta::CPAN
B<img2jpg> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<img2jpg> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<img2jpg> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original, -D">>|B<L<-...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<jpg>:
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/img2png view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /App/ImageMagickUtils/convert_image_to_png
# and generated automatically using Perinci::CmdLine::Gen version 0.502
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-12-21'; # DATE
our $DIST = 'App-ImageMagickUtils'; # DIST
our $VERSION = '0.024'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/ImageMagickUtils/convert_image_to_png",
program_name => "img2png",
log => 1,
log_level => "info",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Alias for convert-image-to-png
# PODNAME: img2png
__END__
=pod
=encoding UTF-8
=head1 NAME
img2png - Alias for convert-image-to-png
=head1 VERSION
This document describes version 0.024 of img2png (from Perl distribution App-ImageMagickUtils), released on 2024-12-21.
=head1 SYNOPSIS
B<img2png> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<img2png> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<img2png> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original, -D">>|B<L<-...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<png>:
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/img2png view on Meta::CPAN
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C img2png img2png
in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete img2png 'p/*/`img2png`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
script/jpg2png view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /App/ImageMagickUtils/convert_image_to_png
# and generated automatically using Perinci::CmdLine::Gen version 0.502
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-12-21'; # DATE
our $DIST = 'App-ImageMagickUtils'; # DIST
our $VERSION = '0.024'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/ImageMagickUtils/convert_image_to_png",
program_name => "jpg2png",
log => 1,
log_level => "info",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Alias for convert-image-to-png
# PODNAME: jpg2png
__END__
=pod
=encoding UTF-8
=head1 NAME
jpg2png - Alias for convert-image-to-png
=head1 VERSION
This document describes version 0.024 of jpg2png (from Perl distribution App-ImageMagickUtils), released on 2024-12-21.
=head1 SYNOPSIS
B<jpg2png> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<jpg2png> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<jpg2png> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original, -D">>|B<L<-...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<png>:
% convert-image-to-png *.jpg
is equivalent to:
% convert-image-to --to png *.jpg
which in turn is equivalent to:
% for f in *.jpg; do convert "$f" "$f.png"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/jpg2png view on Meta::CPAN
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C jpg2png jpg2png
in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete jpg2png 'p/*/`jpg2png`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
script/png2jpg view on Meta::CPAN
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-12-21'; # DATE
our $DIST = 'App-ImageMagickUtils'; # DIST
our $VERSION = '0.024'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/ImageMagickUtils/convert_image_to_jpg",
program_name => "png2jpg",
log => 1,
log_level => "info",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Alias for convert-image-to-jpg
# PODNAME: png2jpg
__END__
=pod
=encoding UTF-8
=head1 NAME
png2jpg - Alias for convert-image-to-jpg
=head1 VERSION
This document describes version 0.024 of png2jpg (from Perl distribution App-ImageMagickUtils), released on 2024-12-21.
=head1 SYNOPSIS
B<png2jpg> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<png2jpg> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<png2jpg> [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quiet">>|B<L<--trace|/"--trace">>|B<L<--verbose|/"--verbose">>] [B<L<--delete-original|/"--delete-original, -D">>|B<L<-D|/"--delete-original, -D">>|B<L<-...
=head1 DESCRIPTION
This is a wrapper to C<convert-image-to>, with C<--to> set to C<jpg>:
% convert-image-to-pdf *.png
is equivalent to:
% convert-image-to --to jpg *.png
which in turn is equivalent to:
% for f in *.png; do convert "$f" "$f.jpg"; done
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--delete-original>, B<-D>
script/png2jpg view on Meta::CPAN
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C png2jpg png2jpg
in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete png2jpg 'p/*/`png2jpg`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
t/00-compile.t view on Meta::CPAN
my @module_files = (
'App/ImageMagickUtils.pm'
);
my @scripts = (
'script/calc-image-resized-size',
'script/convert-image-to',
'script/convert-image-to-jpg',
'script/convert-image-to-pdf',
'script/convert-image-to-png',
'script/downsize-image',
'script/image-resize-notation-to-human',
'script/img2jpg',
'script/img2pdf',
'script/img2png',
'script/jpg2png',
'script/png2jpg'
);
# no fake home requested
my @switches = (
-d 'blib' ? '-Mblib' : '-Ilib',
);
use File::Spec;
use IPC::Open3;
t/author-critic.t view on Meta::CPAN
}
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Perl::Critic::Subset 3.001.006
use Test::Perl::Critic (-profile => "") x!! -e "";
my $filenames = ['lib/App/ImageMagickUtils.pm','script/calc-image-resized-size','script/convert-image-to','script/convert-image-to-jpg','script/convert-image-to-pdf','script/convert-image-to-png','script/downsize-image','script/image-resize-notation-...
unless ($filenames && @$filenames) {
$filenames = -d "blib" ? ["blib"] : ["lib"];
}
all_critic_ok(@$filenames);