-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make foreach function calls consistent * Add showconfig command * Output config as ASCII or HTML --------- Co-authored-by: Tobias Oetiker <[email protected]>
- Loading branch information
Showing
5 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
|
||
- Add command showconfig to show print pod from Config.pm | ||
|
||
0.49.1 2024-02-19 14:50:15 +0100 Tobias Oetiker <[email protected]> | ||
|
||
|
||
- Add menuButtonSet and menuLabel to Actions.js to allow | ||
separate config of mobile and regular menus | ||
- Translate tooltip and placeholder in Card.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package CallBackery::Command::showconfig; | ||
|
||
use Mojo::Base 'Mojolicious::Command', -signatures; | ||
use Getopt::Long qw(GetOptionsFromArray :config no_auto_abbrev no_ignore_case); | ||
use Pod::Usage; | ||
use Pod::Simple::Text; | ||
use Pod::Simple::HTML; | ||
|
||
has description => "showconfig\n"; | ||
has usage => <<"EOF"; | ||
Usage: $0 showconfig [options] | ||
--verbose | ||
--help | ||
--html output as html | ||
EOF | ||
|
||
my %opt; | ||
|
||
sub run ($self, @args) { | ||
my $app = $self->app; | ||
|
||
GetOptionsFromArray \@args, \%opt,qw(help verbose html) or exit 1; | ||
|
||
$app->log->level($opt{verbose} ? 'debug' : 'info'); | ||
|
||
if ($opt{help}) { die $self->usage } | ||
|
||
$opt{html} ? Pod::Simple::HTML->filter(\$app->config->pod) | ||
: Pod::Simple::Text->filter(\$app->config->pod); | ||
|
||
|
||
return; | ||
} | ||
|
||
1; | ||
|
||
__END__ | ||
=head1 NAME | ||
showconfig - show config documentation as pod | ||
=head1 SYNOPSIS | ||
APPLICATION B<showconfig> [--verbose] [--help] [--html] | ||
=head1 DESCRIPTION | ||
Parse the .cfg file definition and output documentation as pod | ||
=head1 COPYRIGHT | ||
Copyright (c) 2024- by OETIKER+PARTNER AG. All rights reserved. | ||
=head1 LICENSE | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
=head1 AUTHOR | ||
S<Fritz Zaucker E<lt>[email protected]E<gt>> | ||
=head1 HISTORY | ||
2024-02-19 fz Initial | ||
=cut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters