App-EventStreamr
view release on metacpan or search on metacpan
bin/eventstreamr view on Meta::CPAN
# SIGHUP updates and execs
POSIX::sigaction(&POSIX::SIGHUP, $update);
POSIX::sigaction(&POSIX::SIGPIPE, $pipe);
# USR1/2 for get/post config
POSIX::sigaction(&POSIX::SIGUSR1, $get);
POSIX::sigaction(&POSIX::SIGUSR2, $post);
sub print_usage {
say q{
Usage:
evenstreamr --configure : Run through station configuration
Debugging commands:
eventstreamr --version : Show version information
eventstreamr --debug : Run with debugging enabled.
eventstreamr --nodaemon : Run in the foreground, log to console
eventstreamr --devices : Print available devices
bin/eventstreamr view on Meta::CPAN
For more documentation, use `perldoc eventstreamr`.
};
exit 1;
}
sub devices {
my $eventstreamr = App::EventStreamr->new();
$eventstreamr->config->update_devices();
say "ID (Type) - Name";
foreach my $device (@{$eventstreamr->config->available_devices->{array}}) {
say "$device->{id} ($device->{type}) - $device->{name}";
}
exit 1;
}
sub version {
$::VERSION ||= "Unreleased";
say "eventstreamr version : $::VERSION";
say "App::EventStreamr version : ", $eventstreamr->VERSION;
exit 1;
}
sub configure {
my $eventstreamr = App::EventStreamr->new();
$eventstreamr->config->configure;
exit 1;
}
bin/station-mgr.pl view on Meta::CPAN
sig_exit();
my $options;
$options = "--debug" if $DEBUG;
$options = "$options --no-daemon" unless $DAEMON;
my $script = File::Basename::basename($0);
$logger->debug("Restart Manger: $Bin/$script $options") if ($logger->is_debug());
exec("$Bin/$script $options") or $logger->logdie("Couldn't restart: $!");
}
sub print_usage {
say "
Usage: station-mgr.pl [OPTIONS]
Options:
--no-deaemon disable daemon
--debug turn on debugging
--help this help text
";
exit 0;
}
lib/App/EventStreamr/Config.pm view on Meta::CPAN
method write_config() {
$self->localconfig->{config} = $self->_clean_config();
$self->localconfig->write;
}
method configure() {
say "Welcome to the EventStreamr config utility\n";
my $answer = $self->prompt(
"It will clear the current config, is this ok? y/n",
"n",
);
exit 1 if ($answer =~ /n/i);
# TODO: Write config clear method
$self->roles([]);
# Config Questions
$self->configure_room();
$self->configure_backend();
$self->configure_mixer();
$self->configure_ingest();
$self->write_config();
say;
# Confirm written.
if (-e $self->config_file) {
say "Config written successfully";
} else {
say "Config failed to write";
}
# TODO: Stream Configuration
#$answer = undef;
#$answer = $self->prompt(
# "Stream - stream to configured service y/n: ",
# "y",
#);
#push(@{$self->{roles}}, "stream") if ($answer =~ /y/i);
}
lib/App/EventStreamr/Config.pm view on Meta::CPAN
"backend - DVswitch|GSTswitch",
$self->backend,
);
if ($answer =~ /gst/i) {
$self->backend('GSTswitch');
return;
} elsif ($answer =~ /dv/i) {
$self->backend('DVswitch');
return;
} else {
say "Invalid backend";
$self->configure_backend;
return
}
}
method configure_recordpath() {
say '$room + $date can be used as variables in the path and';
say 'will correctly be set and created at run time';
my $answer = $self->prompt(
"recordpath - ",
'/tmp/$room/$date',
);
$self->record_path($answer);
}
method configure_room() {
my $answer = $self->prompt(
"Room - For record path and controller",
share/status/app/lib/angular/angular.js view on Meta::CPAN
</doc:example>
*/
var ngListDirective = function() {
return {
require: 'ngModel',
link: function(scope, element, attr, ctrl) {
var match = /\/(.*)\//.exec(attr.ngList),
separator = match && new RegExp(match[1]) || attr.ngList || ',';
var parse = function(viewValue) {
// If the viewValue is invalid (say required but empty) it will be `undefined`
if (isUndefined(viewValue)) return;
var list = [];
if (viewValue) {
forEach(viewValue.split(separator), function(value) {
if (value) list.push(trim(value));
});
}
( run in 2.793 seconds using v1.01-cache-2.11-cpan-d7a12ab2c7f )