App-Photobear
view release on metacpan or search on metacpan
bin/photobear view on Meta::CPAN
exit 0;
}
sub usage {
my $modes = join(' ', @MODES);
print <<EOF;
Usage: $BASE [options] <command> <url>
Commands:
$modes
General options:
--api-key <key> API key to use
--config <file> Config file to use [~/.config/photobear.ini]
--verbose Print verbose output
--help Print this help message
EOF
}
__END__
=pod
=encoding UTF-8
=head1 NAME
photobear - CLI for Photobear powered image processing
=head1 VERSION
version 0.1.2
=head1 SYNOPSIS
photobear [options] <command> <url>
=head1 DESCRIPTION
This is a command-line interface (CLI) program for Photobear (L<https://photobear.io>), a tool for image processing.
It allows you to perform various operations on images using different commands and a provided URL.
You will need an API key to use the program.
=head1 CONFIGURATION FILE
The program looks for a configuration file at C<~/.config/photobear.ini>, like:
[photobear]
api_key=YOUR_API_KEY
Alternatively you can set the environment variable C<PHOTOBEAR_API_KEY> to your API key, or use the --api-key option.
=head1 COMMANDS
The program supports the following commands:
=over 4
=item B<background_removal>
Remove the background from the image specified by the URL.
=item B<vectorization>
Vectorize the image specified by the URL (output in SVG format).
=item B<super_resolution>
Enlarge the image specified by the URL.
=item B<compress>
Compress the image specified by the URL.
=back
=head1 OPTIONS
=over 4
=item B<-o, --outdir>
Output directory for the processed image. By default, the program saves the image in the current directory.
=item B<--api-key STRING>
Specify the API key to use for accessing Photobear. This key is required for authentication.
=item B<--config FILE>
Specify the configuration file to use. By default, the program looks for the configuration file at C<~/.config/photobear.ini>.
=item B<--verbose>
Print verbose output during the execution of the program.
=item B<--help>
Print the help message, which includes a list of commands and their usage.
=back
=head1 EXAMPLES
Trace an image:
photobear vectorization https://example.com/image.jpg -o outputdir
=head1 REQUIREMENTS
This program works under B<MacOS> and B<Linux>, and requires Perl 5.18 or higher and C<curl> to be installed.
=head1 AUTHOR
Andrea Telatin <proch@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2023 by Andrea Telatin.
This is free software, licensed under:
( run in 0.851 second using v1.01-cache-2.11-cpan-5b529ec07f3 )