App-revealup
view release on metacpan or search on metacpan
lib/App/revealup/cli/export.pm view on Meta::CPAN
package App::revealup::cli::export;
use App::revealup::base;
use Pod::Usage;
use Try::Tiny;
use Carp qw/croak/;
has 'sub_commands' => [qw/html theme/];
sub run {
my ($self, $sub_command, @args) = @_;
usage() if !$sub_command;
if ($sub_command eq 'generate'){
$sub_command = 'theme';
}
if( grep { $_ eq $sub_command } @{$self->sub_commands} ) {
my $klass = sprintf("App::revealup::cli::export::%s", lc($sub_command));
if(eval "require $klass;1;"){
my $instance = $klass->new();
try {
$instance->run(@args);
}catch{
croak $_;
};
return;
}
}
usage();
}
sub usage {
system "perldoc App::revealup::cli::export";
exit;
}
1;
__END__
=head1 SYNOPSIS
$ revealup export html --output slides.html
=head1 DESCRIPTION
C<export> command with a sub-command makes file of CSS theme or generated HTML.
=head1 SUB COMMAND: C<theme>
$ revealup export theme --base blood.css --output theme.css
=head2 Options
=head3 C<--base>
The base CSS file name that is included in C<reveal.js> package. Available base theme CSS names are below.
beige.css / blood.css / default.css / moon.css / night.css / serif.css / simple.css / sky.css / solarized.css
=head3 C<--output>
Output CSS file name. I<original.css> is default.
=head1 SUB COMMAND: C<html>
( run in 2.938 seconds using v1.01-cache-2.11-cpan-75ffa21a3d4 )