Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed object declarations that were split over two lines as a result … #575

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions code/bruce/test_x10_light.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@

#@ Test x10 light commands

$v_test_light_timed =
new Voice_Cmd("Turn the Outside lights off in [1,5,10,30,60] minutes");
$v_test_light_timed = new Voice_Cmd("Turn the Outside lights off in [1,5,10,30,60] minutes");
$v_test_light_timed->set_info('A test of the set_with_timer X10_Item method');
set_with_timer $camera_light ON, $state * 60
if $state = said $v_test_light_timed;

$v_test_light1 = new Voice_Cmd(
"Set test camera light 1 to [on,brighten,dim,-50,+20,+50,+70,50,10%,12%,30%,50%,60%,70%,&P1,&P2,&P3,&P13,&P10,&P30,&P40,&P50,&P60,&P80,fred]"
);
$v_test_light2 = new Voice_Cmd(
"Set test camera light 2 to [on,brighten,dim,-50,+20,+50,+70,50,10%,12%,30%,50%,60%,70%,&P1,&P2,&P3,&P13,&P10,&P30,&P40,&P50,&P60,&P80,fred]"
);
$v_test_light1 = new Voice_Cmd("Set test camera light 1 to [on,brighten,dim,-50,+20,+50,+70,50,10%,12%,30%,50%,60%,70%,&P1,&P2,&P3,&P13,&P10,&P30,&P40,&P50,&P60,&P80,fred]");
$v_test_light2 = new Voice_Cmd("Set test camera light 2 to [on,brighten,dim,-50,+20,+50,+70,50,10%,12%,30%,50%,60%,70%,&P1,&P2,&P3,&P13,&P10,&P30,&P40,&P50,&P60,&P80,fred]");

#v_test_light2 = new Voice_Cmd("Set bathroom light to [on,off,brighten,dim,-50,+20,+50,+70,50,10%,12%,30%,60%,70%,&P1,&P2,&P3,&P13,&P10,&P30,&P40,&P50,&P60,&P80,fred]");
$v_test_light1->set_info(
Expand All @@ -33,9 +28,7 @@
set $bathroom_light $state;
}

$v_test_lights = new Voice_Cmd(
"{please, } {turn the, } test lights [on,off,&P13,&P10,&P15,&P20,10%,20%,70%,&P60]"
);
$v_test_lights = new Voice_Cmd("{please, } {turn the, } test lights [on,off,&P13,&P10,&P15,&P20,10%,20%,70%,&P60]");

#$v_test_lights-> set_info('Test sending some extended X10 states to a fancy LM14 X10 module');
#$test_lights = new X10_Item('C9');
Expand Down
3 changes: 1 addition & 2 deletions code/bruce/weatherpoint.pl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

my $f_weatherpoint_page = "$config_parms{data_dir}/web/weatherpoint.txt";
my $f_weatherpoint_html = "$config_parms{data_dir}/web/weatherpoint.html";
$p_weatherpoint_page = new Process_Item(
"get_url \"$config_parms{weatherpointURL}\" \"$f_weatherpoint_html\"");
$p_weatherpoint_page = new Process_Item("get_url \"$config_parms{weatherpointURL}\" \"$f_weatherpoint_html\"");
$v_get_weatherpoint = new Voice_Cmd('Get weather point');

#if ($Startup or $Reload) { # Used for testing
Expand Down
3 changes: 1 addition & 2 deletions code/common/UIRT2_learning.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
$ofa_html = &ofa_html;
}

$uirt2_test = new Voice_Cmd(
"uirt2 debug [version,raw,uir,struct,gpio,replay,learn,dump codes]");
$uirt2_test = new Voice_Cmd("uirt2 debug [version,raw,uir,struct,gpio,replay,learn,dump codes]");

if ( my $state = said $uirt2_test) {
UIRT2::get_version() if $state eq 'version';
Expand Down
3 changes: 1 addition & 2 deletions code/common/USB_UIRT_learning.pl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
$ofa_html = &ofa_html;
}

$usb_uirt_test = new Voice_Cmd(
"usb_uirt debug [version,raw,oldraw,uir,get config,learn,dump codes]");
$usb_uirt_test = new Voice_Cmd("usb_uirt debug [version,raw,oldraw,uir,get config,learn,dump codes]");

if ( my $state = said $usb_uirt_test) {
USB_UIRT::get_version() if $state eq 'version';
Expand Down
15 changes: 4 additions & 11 deletions code/common/audrey_control.pl
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,10 @@
$v_audrey_mail_light = new Voice_Cmd("Audrey mail light [on,off,blinking]");
$v_audrey_both_lights = new Voice_Cmd("Audrey lights both [on,off,blinking]");
$v_audrey_beeps = new Voice_Cmd("Audrey beeps [enabled,disabled,stopped]");
$v_audrey_sound_play = new Voice_Cmd(
"Play Audrey sound number [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]"
);
$v_audrey_volume = new Voice_Cmd(
"Set Audrey volume to [1,10,20,25,30,40,50,60,70,75,80,90,100]");
$v_audrey_remote = new Voice_Cmd(
"Push Audrey Button [browser,address_book,date_book,audrey_options,power_button,turn_knob_left,push_knob,turn_knob_right,mail,tab,enter]"
);
$v_audrey_sound_play_by_name = new Voice_Cmd(
"Play Audrey sound [cancel,check,copy,cut,delete,help,major_high,menu_close,menu_open,minor_high,minor_low,paste,print,scroll_down,scroll_up,snapshot,warning,go_to_sleep,wake_up]"
);
$v_audrey_sound_play = new Voice_Cmd("Play Audrey sound number [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]");
$v_audrey_volume = new Voice_Cmd("Set Audrey volume to [1,10,20,25,30,40,50,60,70,75,80,90,100]");
$v_audrey_remote = new Voice_Cmd("Push Audrey Button [browser,address_book,date_book,audrey_options,power_button,turn_knob_left,push_knob,turn_knob_right,mail,tab,enter]");
$v_audrey_sound_play_by_name = new Voice_Cmd("Play Audrey sound [cancel,check,copy,cut,delete,help,major_high,menu_close,menu_open,minor_high,minor_low,paste,print,scroll_down,scroll_up,snapshot,warning,go_to_sleep,wake_up]");

if ( said $v_audrey_select) {
my $state = $v_audrey_select->{state};
Expand Down
4 changes: 1 addition & 3 deletions code/common/barcode_scan.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
);
$barcode_mode->set_authority('anyone');

$v_barcode_mode = new Voice_Cmd(
'Change barcode scan to [entry,add inventory,delete inventory,query inventory,clear inventory] mode'
);
$v_barcode_mode = new Voice_Cmd('Change barcode scan to [entry,add inventory,delete inventory,query inventory,clear inventory] mode');
$v_barcode_mode->set_info(
'Controls what you want to do with barcode scans. Web will create urls, inventory updates a database'
);
Expand Down
3 changes: 1 addition & 2 deletions code/common/benchmarks.pl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@

my $speed_benchmark_count = 0;

$v_speed_benchmark =
new Voice_Cmd '[Start a by name,Start a by speed,Stop the] speed benchmark';
$v_speed_benchmark = new Voice_Cmd '[Start a by name,Start a by speed,Stop the] speed benchmark';
$v_speed_benchmark->set_info(
'This will suspend normal mh while it benchmarks each code member individually. It can take few minutes.'
);
Expand Down
18 changes: 4 additions & 14 deletions code/common/callerid.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,14 @@
=cut

# Use this for each of your cid hardware interfaces
$cid_interface1 = new Telephony_Interface(
$config_parms{callerid_name},
$config_parms{callerid_port},
$config_parms{callerid_type}
);
$cid_interface1 = new Telephony_Interface($config_parms{callerid_name},$config_parms{callerid_port},$config_parms{callerid_type});
$cid_item = new CID_Lookup($cid_interface1);

my $cid_interface2;

if ( $Startup and defined( $config_parms{callerid2_name} ) ) {
print_log("Creating and adding 2nd Caller ID interface");
$cid_interface2 = new Telephony_Interface(
$config_parms{callerid2_name},
$config_parms{callerid2_port},
$config_parms{callerid2_type}
);
$cid_interface2 = new Telephony_Interface($config_parms{callerid2_name},$config_parms{callerid2_port},$config_parms{callerid2_type});
{
$cid_item->add($cid_interface2);
} # the brace brackets keep mh from pulling this line out of the loop
Expand All @@ -62,8 +54,7 @@

# These objects will enable cid logging and announcing
$cid_log = new CID_Log($cid_item); # Enables logging
$cid_server =
new CID_Server($cid_item); # Enables YAC, Acid, and xAP/xPL callerid clients
$cid_server = new CID_Server($cid_item); # Enables YAC, Acid, and xAP/xPL callerid clients

# Add one of these for each YAC client: http://www.sunflowerhead.com/software/yac
#$cid_client1 = new CID_Server_YAC('localhost');
Expand All @@ -74,8 +65,7 @@
#$cid_announce = new CID_Announce($cid_item, 'Call from $first $last');

# Setup commands we can use to run tests without the modem
$cid_interface_test = new Voice_Cmd(
'Test callerid [0,1,2,3,4,5,6,7,8,9,offhook,UKknown,UK unknown]');
$cid_interface_test = new Voice_Cmd('Test callerid [0,1,2,3,4,5,6,7,8,9,offhook,UKknown,UK unknown]');
if ( defined( $state = state_now $cid_interface_test) ) {
set_test $cid_interface1 'RING' if $state == 0;
set_test $cid_interface1
Expand Down
3 changes: 1 addition & 2 deletions code/common/clock_map2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
my $MAPDIR = "$Pgm_Root/web/newclock/maps";
my $f_get_map = "$config_parms{data_dir}/earth_jpg.data";
my $min_size = 20000; #minimum size to test if a jpg has been downloaded
$p_get_map = new Process_Item(
"get_url -quiet \"$URL\" $config_parms{data_dir}/earth_jpg.data");
$p_get_map = new Process_Item("get_url -quiet \"$URL\" $config_parms{data_dir}/earth_jpg.data");

# Update earth.jpg for each Hour, once a week

Expand Down
37 changes: 12 additions & 25 deletions code/common/eBay.pl
Original file line number Diff line number Diff line change
Expand Up @@ -42,53 +42,40 @@
$v_check_ebay = new Voice_Cmd('Check eBay');
$v_check_ebay->set_info('Checks current eBay status');

$f_ebay_login1_headers =
new File_Item "$config_parms{data_dir}/web/ebay_login1.headers";
$p_ebay_login1 = new Process_Item(
qq[get_url -header "$f_ebay_login1_headers->{file}" "https://signin.ebay.com/ws2/eBayISAPI.dll?SignIn" "/dev/null" ]
);
$f_ebay_login1_headers = new File_Item "$config_parms{data_dir}/web/ebay_login1.headers";
$p_ebay_login1 = new Process_Item(qq[get_url -header "$f_ebay_login1_headers->{file}" "https://signin.ebay.com/ws2/eBayISAPI.dll?SignIn" "/dev/null" ]);

$f_ebay_login2_html =
new File_Item "$config_parms{data_dir}/web/ebay_login2.html";
$f_ebay_login2_headers =
new File_Item "$config_parms{data_dir}/web/ebay_login2.headers";
$f_ebay_login2_html = new File_Item "$config_parms{data_dir}/web/ebay_login2.html";
$f_ebay_login2_headers = new File_Item "$config_parms{data_dir}/web/ebay_login2.headers";
my $url_ebay_login2 = 'https://signin.ebay.com/ws/eBayISAPI.dll?UsingSSL=1';
$p_ebay_login2 = new Process_Item;

$f_ebay_watching =
new File_Item "$config_parms{data_dir}/web/ebay_watching.html";
my $url_ebay_watching =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayWatching&ssPageName=STRK:ME:LNLK';
$f_ebay_watching = new File_Item "$config_parms{data_dir}/web/ebay_watching.html";
my $url_ebay_watching = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayWatching&ssPageName=STRK:ME:LNLK';
$p_ebay_watching = new Process_Item;

$f_ebay_bidding = new File_Item "$config_parms{data_dir}/web/ebay_bidding.html";
my $url_ebay_bidding =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayBidding&ssPageName=STRK:ME:LNLK';
my $url_ebay_bidding = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayBidding&ssPageName=STRK:ME:LNLK';
$p_ebay_bidding = new Process_Item;

$f_ebay_won = new File_Item "$config_parms{data_dir}/web/ebay_won.html";
my $url_ebay_won =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayWon&ssPageName=STRK:ME:LNLK';
my $url_ebay_won = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayWon&ssPageName=STRK:ME:LNLK';
$p_ebay_won = new Process_Item;

$f_ebay_selling = new File_Item "$config_parms{data_dir}/web/ebay_selling.html";
my $url_ebay_selling =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBaySelling&ssPageName=STRK:ME:LNLK';
my $url_ebay_selling = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBaySelling&ssPageName=STRK:ME:LNLK';
$p_ebay_selling = new Process_Item;

$f_ebay_sold = new File_Item "$config_parms{data_dir}/web/ebay_sold.html";
my $url_ebay_sold =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBaySold&ssPageName=STRK:ME:LNLK';
my $url_ebay_sold = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBaySold&ssPageName=STRK:ME:LNLK';
$p_ebay_sold = new Process_Item;

$f_ebay_unsold = new File_Item "$config_parms{data_dir}/web/ebay_unsold.html";
my $url_ebay_unsold =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayUnsold&ssPageName=STRK:ME:LNLK';
my $url_ebay_unsold = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayUnsold&ssPageName=STRK:ME:LNLK';
$p_ebay_unsold = new Process_Item;

$f_ebay_lost = new File_Item "$config_parms{data_dir}/web/ebay_lost.html";
my $url_ebay_lost =
'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayLost&ssPageName=STRK:ME:LNLK';
my $url_ebay_lost = 'http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&LogUID=slidekb&CurrentPage=MyeBayLost&ssPageName=STRK:ME:LNLK';
$p_ebay_lost = new Process_Item;

my $ebay_cookies;
Expand Down
3 changes: 1 addition & 2 deletions code/common/eliza_server.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
my ($eliza);
undef $eliza if $eliza and state_changed $eliza_rule;

$f_eliza_deep_thoughts =
new File_Item("$config_parms{data_dir}/remarks/deep_thoughts.txt");
$f_eliza_deep_thoughts = new File_Item("$config_parms{data_dir}/remarks/deep_thoughts.txt");

if ( defined( $state = state_now $eliza_data) ) {
my $msg = $state;
Expand Down
13 changes: 4 additions & 9 deletions code/common/internet_earthquakes_cal.pl
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,14 @@
$Earthquake_Count = $config_parms{Earthquake_Count};
}

$f_earthquakes_cal_html =
new File_Item("$config_parms{data_dir}/web/earthquakes_cal.html");
$f_earthquakes_cal_gif =
new File_Item("$config_parms{data_dir}/web/earthquakes_cal.gif");
$f_earthquakes_cal_html = new File_Item("$config_parms{data_dir}/web/earthquakes_cal.html");
$f_earthquakes_cal_gif = new File_Item("$config_parms{data_dir}/web/earthquakes_cal.gif");

my $image;
$p_earthquakes_image_cal = new Process_Item;
$p_earthquakes_cal = new Process_Item(
"get_url http://quake.wr.usgs.gov/recenteqs/Quakes/quakes0.htm "
. $f_earthquakes_cal_html->name );
$p_earthquakes_cal = new Process_Item("get_url http://quake.wr.usgs.gov/recenteqs/Quakes/quakes0.htm " . $f_earthquakes_cal_html->name );

$v_earthquakes_cal =
new Voice_Cmd('[Get,Show,Read,Clear] recent California earthquakes');
$v_earthquakes_cal = new Voice_Cmd('[Get,Show,Read,Clear] recent California earthquakes');
$v_earthquakes_cal->set_info(
'Display recent California earthquake information');
$v_earthquakes_cal->set_authority('anyone');
Expand Down
3 changes: 1 addition & 2 deletions code/common/internet_top10.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

#noloop=stop

$p_top10_list = new Process_Item(
"get_url http://www.cbs.com/latenight/lateshow/top_ten/ $f_top10_html");
$p_top10_list = new Process_Item("get_url http://www.cbs.com/latenight/lateshow/top_ten/ $f_top10_html");

# *** Split these up for security (allow anyone to read)

Expand Down
3 changes: 1 addition & 2 deletions code/common/mh_control.pl
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ sub serial_match_log {
}

# Repeat last spoken
$v_repeat_last_spoken =
new Voice_Cmd '{Repeat your last message, What did you say}', '';
$v_repeat_last_spoken = new Voice_Cmd '{Repeat your last message, What did you say}', '';
$v_repeat_last_spoken->tie_event('&handle_repeat_last_spoken_state()'); # noloop

sub handle_repeat_last_spoken_state() {
Expand Down
6 changes: 2 additions & 4 deletions code/common/monitor_router_lingo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@
# noloop=stop

$v_check_lingo_router = new Voice_Cmd('Check Lingo router');
$p_check_lingo_router = new Process_Item(
"get_url -quiet \"$lingo_status_url\" \"$f_lingo_status_html\"");
$p_reboot_lingo_router = new Process_Item(
"get_url -quiet \"$lingo_reboot_url\" \"$f_lingo_reboot_html\"");
$p_check_lingo_router = new Process_Item("get_url -quiet \"$lingo_status_url\" \"$f_lingo_status_html\"");
$p_reboot_lingo_router = new Process_Item("get_url -quiet \"$lingo_reboot_url\" \"$f_lingo_reboot_html\"");

# Run on the 3rd minute of every 5 minute block (or when requested by
# the voice command)
Expand Down
4 changes: 1 addition & 3 deletions code/common/mp3Rip_code.pl
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@

if ($Reload) {
$cd_drive_in_use = 0;
$get_cdinfo_process = new Process_Item(
"$config_parms{mp3Rip_cdinfo} > $config_parms{mp3Rip_work_dir}/cd-info.curr"
);
$get_cdinfo_process = new Process_Item("$config_parms{mp3Rip_cdinfo} > $config_parms{mp3Rip_work_dir}/cd-info.curr");
$cddbp = new CDDB;
print_log "mp3Rip: cddbids still being processed: $Save{'mp3Rip_pending'}"
if $main::Debug{mp3Rip};
Expand Down
4 changes: 1 addition & 3 deletions code/common/mp3_alsaplayer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ sub set_alsaplayer_in_use_notify {
$in_use_notify = $_[0];
}

$v_mp3_control_cmd = new Voice_Cmd(
"Set the house mp3 player to [Play,Stop,Pause,Restart,Next Song,Previous Song,Volume Down,Volume Up,Shuffle On,Shuffle Off,Repeat On,Repeat Off]"
);
$v_mp3_control_cmd = new Voice_Cmd("Set the house mp3 player to [Play,Stop,Pause,Restart,Next Song,Previous Song,Volume Down,Volume Up,Shuffle On,Shuffle Off,Repeat On,Repeat Off]");
my $state;
mp3_control($state) if $state = said $v_mp3_control_cmd;

Expand Down
8 changes: 2 additions & 6 deletions code/common/mp3_mpd.pl
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@
print_log "MPD Database Updated";
}

$v_mp3_control_cmd = new Voice_Cmd(
"Set the house mp3 player to [Play,Stop,Pause,Restart,Next Song,Previous Song,Volume Down,Volume Up,Shuffle On,Shuffle Off,Repeat On,Repeat Off,track]"
);
$v_mp3_vol_control = new Voice_Cmd(
"Set the house mp3 volume to [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]"
);
$v_mp3_control_cmd = new Voice_Cmd("Set the house mp3 player to [Play,Stop,Pause,Restart,Next Song,Previous Song,Volume Down,Volume Up,Shuffle On,Shuffle Off,Repeat On,Repeat Off,track]");
$v_mp3_vol_control = new Voice_Cmd("Set the house mp3 volume to [5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]");
$v_mpd_control = new Voice_Cmd("[Regenerate,Restart] MPD");

my $state;
Expand Down
4 changes: 1 addition & 3 deletions code/common/news_ap_breaking.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
my $f_ap_news = "$config_parms{data_dir}/web/ap_breaking_news.txt";
my $f_ap_news_html = "$config_parms{data_dir}/web/ap_breaking_news_pruned.html";
my $f_ap_news_rss = "$config_parms{data_dir}/web/ap_breaking_news.rss";
$p_ap_news = new Process_Item(
qq!get_url "http://hosted.ap.org/lineups/TOPHEADS.rss?SITE=NHPOR&SECTION=HOME" $f_ap_news_rss!
);
$p_ap_news = new Process_Item(qq!get_url "http://hosted.ap.org/lineups/TOPHEADS.rss?SITE=NHPOR&SECTION=HOME" $f_ap_news_rss!);
$v_ap_news = new Voice_Cmd('What is in the News');
$v_ap_news->set_info('Responds with headline stories from the AP');
$v_get_ap_news = new Voice_Cmd('[Get,Check,Mail,SMS] AP breaking news');
Expand Down
4 changes: 1 addition & 3 deletions code/common/news_onthisday.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
my $f_onthisday_html = "$config_parms{data_dir}/web/onthisday.html";
my $f_onthisday_html2 = "$config_parms{data_dir}/web/onthisday_pruned.html";

$p_onthisday = new Process_Item(
"get_url http://www.nytimes.com/learning/general/onthisday/index.html $f_onthisday_html"
);
$p_onthisday = new Process_Item("get_url http://www.nytimes.com/learning/general/onthisday/index.html $f_onthisday_html");
$v_onthisday = new Voice_Cmd('[Get,Show,Check] on this day');
$v_onthisday->set_info('Get or display the daily calendar facts');
$v_onthisday->set_authority('anyone');
Expand Down
3 changes: 1 addition & 2 deletions code/common/news_physics_web.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
my $f_physics_web = "$config_parms{data_dir}/web/physics_web.txt";
my $f_physics_web_html = "$config_parms{data_dir}/web/physics_web.html";

$p_physics_web = new Process_Item(
"get_url http://physicsweb.org/archive/news $f_physics_web_html");
$p_physics_web = new Process_Item("get_url http://physicsweb.org/archive/news $f_physics_web_html");
$v_physics_web = new Voice_Cmd('[Get,Read] physics web');
$v_physics_web->set_authority('anyone');

Expand Down
7 changes: 2 additions & 5 deletions code/common/news_yahoo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
$news_files{"Health"} = "$config_parms{data_dir}/web/Health_news.txt";
$news_files{"Sports"} = "$config_parms{data_dir}/web/Sports_news.txt";

$p_all_news =
new Process_Item("get_url http://dailynews.yahoo.com/fc $f_all_news_html");
$p_all_news = new Process_Item("get_url http://dailynews.yahoo.com/fc $f_all_news_html");
$v_all_news = new Voice_Cmd('Get current news');
$v_all_news->set_authority('anyone');
$v_news = new Voice_Cmd(
'Tell me the [Top,U S,World,Entertainment,Business,Technology,Science,Health,Sports] news'
);
$v_news = new Voice_Cmd('Tell me the [Top,U S,World,Entertainment,Business,Technology,Science,Health,Sports] news');
$v_news->set_authority('anyone');

# Create trigger
Expand Down
14 changes: 3 additions & 11 deletions code/common/pocketsphinx_control.pl
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,9 @@

# define some classes we need
$v_pocketsphinx_reset = new Voice_Cmd("reset pocket sphinx language files");
$v_pocketsphinx_awake = new Voice_Cmd(
$config_parms{pocketsphinx_awake_phrase},
$config_parms{pocketsphinx_awake_response}
);
$v_pocketsphinx_asleep = new Voice_Cmd(
$config_parms{pocketsphinx_asleep_phrase},
$config_parms{pocketsphinx_timeout_response}
);
$pocketsphinx_listener =
new PocketSphinx_Listener( "$config_parms{pocketsphinx_dev}",
$config_parms{pocketsphinx_rate} );
$v_pocketsphinx_awake = new Voice_Cmd($config_parms{pocketsphinx_awake_phrase},$config_parms{pocketsphinx_awake_response});
$v_pocketsphinx_asleep = new Voice_Cmd($config_parms{pocketsphinx_asleep_phrase},$config_parms{pocketsphinx_timeout_response});
$pocketsphinx_listener = new PocketSphinx_Listener( "$config_parms{pocketsphinx_dev}",$config_parms{pocketsphinx_rate} );
$t_awake_timer = new Timer;

# Set mode on startup and reload
Expand Down
Loading