Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Config checker
  • Loading branch information
robertkrimen committed Apr 6, 2009
1 parent 1fa1b3c commit f0aafcb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@ TODO:
- Image fetching/uploading
- Config checker
- Generate better config stub
- Add 'help' screen and documentation

Sunday April 05 14:56:51 PDT 2009:
- Improve history display
Expand Down
16 changes: 15 additions & 1 deletion lib/App/PM/Announce/App.pm
Expand Up @@ -8,6 +8,7 @@ use App::PM::Announce;
use App::PM::Announce::Util;
use DateTime;
use Text::Table;
use Data::Dump qw/dd pp dump/;

my $app;
my @app;
Expand Down Expand Up @@ -39,6 +40,19 @@ Which will submit an announcement to:
_END_
},
commands => {
config => sub {
my ($context, @arguments) = @_;
my $config = app->config;
print "\n";
print "Using config file: ", app->config_file, "\n";
print "\n";
print pp $config;
print "\n\n";
print "Configured to announce to: ", join ", ", grep { app->config->{feed}->{$_} } qw/meetup linkedin greymatter/;
print "\n";
# print "$_ is ", ! app->config->{feed}->{$_} ? "NOT " : "", "configured\n" for qw/meetup linkedin greymatter/;
print "\n";
},
test => sub {
my ($context, @arguments) = @_;
$app = App::PM::Announce->new(config_default => {
Expand Down Expand Up @@ -81,7 +95,7 @@ _END_
if ($event) {
print "\n";
print join "\n", @$report, '', '' if @$report;
print "\"$event->{title}\" has been announced on ", join( ', ', map { $event->{"did_$_"} ? $_ : () } qw/meetup linkedin greymatter/ ), "\n";
print "\"$event->{title}\" has been announced on: ", join( ', ', map { $event->{"did_$_"} ? $_ : () } qw/meetup linkedin greymatter/ ), "\n";
print "The Meetup link is $event->{meetup_link}", "\n" if $event->{meetup_link};
print "\n";
}
Expand Down

0 comments on commit f0aafcb

Please sign in to comment.