Changed keyword from 'Not' to 'No'

This commit is contained in:
Rickard Andersson 2008-03-05 22:31:40 +00:00
parent 6663c30ad5
commit 0f53ccbce9
4 changed files with 17 additions and 13 deletions

View file

@ -60,7 +60,7 @@
'Sunday'. A specified date like '2008-03-18', '2008-03-##',
'####-03-##' or '####-##-15' is also allowed.
The second part is mandatory and is either a expression or the
keyword 'None'. The expression can contain one or more of these
keyword 'No'. The expression can contain one or more of these
keywords 'Sunrise', 'Sunset', 'Random(HH:MM)' and 'HH:MM'.
Example rule: Weekend/07:15
Example rule: Monday+Sunday/07:15
@ -68,7 +68,7 @@
Example rule: 2008-03-##/12:10
Example rule: 07:15+Random(02:00)
Example rule: Sunset-00:30
Example rule: None
Example rule: No
AUTHOR
Original version written by Rickard Andersson

View file

@ -3,7 +3,7 @@
# Configuration file for tellstickController
#
# Copyright (C) 2008 Rickard Andersson (ran42ran@gmail.com)
# Version: 1.3
# Version: 1.3.1
#
################################################################################
#
@ -70,12 +70,12 @@ Alias Livingroom_mythtv_leds Yes Nexa G 8
#
Rule Bedroom_window Workweek/sunrise-00:30 Workweek/Sunrise+01:00
Rule Bedroom_window Sunset+Random(00:30) 00:00+Random(00:30)
Rule Bedroom_mythtv_leds Not 02:00
Rule Bedroom_mythtv_leds No 02:00
Rule kitchen_cabinets Sunrise-00:30 Sunrise+01:00
Rule kitchen_cabinets Workweek/Sunset Workweek/00:00+Random(00:30)
Rule kitchen_cabinets Weekend/Sunset-01:00 Weekend/00:30+Random(00:30)
Rule Livingroom_cabinets Sunset+01:00+Random(00:30) 00:15+Random(00:30)
Rule Livingroom_walls Sunset+Random(00:30) 00:15+Random(00:30)
Rule Livingroom_uplight Not 02:00
Rule Livingroom_mythtv_leds Not 02:00
Rule Livingroom_uplight No 02:00
Rule Livingroom_mythtv_leds No 02:00

View file

@ -4,7 +4,7 @@
# tellstickController program
#
# Copyright (C) 2008 Rickard Andersson (ran42ran@gmail.com)
# Version 1.3
# Version 1.3.1
#
######################################################################
#
@ -419,7 +419,10 @@ sub read_config($) {
printlogger $text;
foreach my $rule (@cfg_rule) {
my ($alias, $on, $off) = @$rule;
$text = "$alias = on at $on and off at $off";
$text = "$alias =";
$text .= " on at $on" if ($on !~ /no/);
$text .= " and" if (($on !~ /no/) && ($off !~ /no/));
$text .= " off at $off" if ($off !~ /no/);
println $text if ($option{"check"});
printlogger $text;
}
@ -579,7 +582,7 @@ sub get_rule_datetime($$$$) {
}
}
if (defined($time) && ($time !~ /^not$/)) {
if (defined($time) && ($time !~ /^no$/)) {
my $days = 0;
my $hours = 0;
my $minutes = 0;
@ -911,7 +914,7 @@ __DATA__
#- 'Sunday'. A specified date like '2008-03-18', '2008-03-##',
#- '####-03-##' or '####-##-15' is also allowed.
#- The second part is mandatory and is either a expression or the
#- keyword 'None'. The expression can contain one or more of these
#- keyword 'No'. The expression can contain one or more of these
#- keywords 'Sunrise', 'Sunset', 'Random(HH:MM)' and 'HH:MM'.
#- Example rule: Weekend/07:15
#- Example rule: Monday+Sunday/07:15
@ -919,7 +922,7 @@ __DATA__
#- Example rule: 2008-03-##/12:10
#- Example rule: 07:15+Random(02:00)
#- Example rule: Sunset-00:30
#- Example rule: None
#- Example rule: No
#-
#- AUTHOR
#- Original version written by Rickard Andersson
@ -927,7 +930,7 @@ __DATA__
#-
#- LICENSE
#- Copyright (C) 2008 Rickard Andersson
#- Version 1.3
#- Version 1.3.1
#- This program comes with ABSOLUTELY NO WARRANTY.
#- This is free software, and you are welcome to redistribute it
#- under certain conditions; See license file for details.

View file

@ -3,7 +3,7 @@
# Configuration file for tellstickController
#
# Copyright (C) 2008 Rickard Andersson (ran42ran@gmail.com)
# Version: 1.3
# Version: 1.3.1
#
################################################################################
#
@ -64,6 +64,7 @@ Alias device1 No Nexa A 1
# Rule BedroomWindow 18:33 23:10+Random(00:45)
# Rule MythTv_Backlight Weekend/20:00 Weekend/Sunset
# Rule device42 2008-03-##/18:45 2008-03-##/22:11
# Rule device42 No 02:00
#
#
Rule device1 weekend/sunrise weekend/08:45