| 1 | #! /bin/false | ||
| 2 | |||
| 3 | # Copyright (C) 2016-2018 Guido Flohr <guido.flohr@cantanea.com>, | ||
| 4 | # all rights reserved. | ||
| 5 | |||
| 6 | # This program is free software: you can redistribute it and/or modify | ||
| 7 | # it under the terms of the GNU General Public License as published by | ||
| 8 | # the Free Software Foundation; either version 3 of the License, or | ||
| 9 | # (at your option) any later version. | ||
| 10 | |||
| 11 | # This program is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | |||
| 16 | # You should have received a copy of the GNU General Public License | ||
| 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | package Qgoda::Command::Config; | ||
| 20 | $Qgoda::Command::Config::VERSION = 'v0.9.2'; | ||
| 21 | use strict; | ||
| 22 | |||
| 23 | use Qgoda; | ||
| 24 | |||
| 25 | use base 'Qgoda::Command'; | ||
| 26 | |||
| 27 | sub _getDefaults { processor => 'Markdown' } | ||
| 28 | |||
| 29 | sub _getOptionSpecs { | ||
| 30 | } | ||
| 31 | |||
| 32 | sub _run { | ||
| 33 | my ($self, $args, $global_options, %options) = @_; | ||
| 34 | |||
| 35 | $global_options->{quiet} = 1; | ||
| 36 | delete $global_options->{verbose}; | ||
| 37 | $global_options->{log_stderr} = 1; | ||
| 38 | |||
| 39 | Qgoda->new($global_options)->dumpConfig; | ||
| 40 | |||
| 41 | return $self; | ||
| 42 | } | ||
| 43 | |||
| 44 | 1; | ||
| 45 | |||
| 46 | =head1 NAME | ||
| 47 | |||
| 48 | qgoda config - Dump the Qgoda configuration | ||
| 49 | |||
| 50 | =head1 SYNOPSIS | ||
| 51 | |||
| 52 | qgoda config [<global options>] | ||
| 53 | |||
| 54 | Try 'qgoda --help' for a description of global options. | ||
| 55 | |||
| 56 | =head1 DESCRIPTION | ||
| 57 | |||
| 58 | Dump the Qgoda configuration to the console (standard output). The | ||
| 59 | configuration is the merged super set of the Qgoda default configuration, | ||
| 60 | the configuration read from F<_config.yaml> (resp. F<_config.yml> or] | ||
| 61 | F<_config.json>) and F<_localconfig.yaml> (resp. F<_localconfig.yml> | ||
| 62 | or F<_localconfig.json>). | ||
| 63 | |||
| 64 | If none of these files exist, the Qgoda default configuration is printed out. | ||
| 65 | |||
| 66 | The output format is YAML. | ||
| 67 | |||
| 68 | =head1 OPTIONS | ||
| 69 | |||
| 70 | =over 4 | ||
| 71 | |||
| 72 | =item -h, --help | ||
| 73 | |||
| 74 | Show this help page and exit. | ||
| 75 | |||
| 76 | =back | ||
| 77 | |||
| 78 | =head1 SEE ALSO | ||
| 79 | |||
| 80 | qgoda(1), L<http://yaml.org/>, perl(1) | ||
| 81 | |||
| 82 | =head1 QGODA | ||
| 83 | |||
| 84 | Part of L<Qgoda|http://www.qgoda.net/>. |