38 |
use strict; |
use strict; |
39 |
my %opt; |
my %opt; |
40 |
use Getopt::Std; |
use Getopt::Std; |
41 |
getopts ("S:s:g:h:t:l:uf"); |
getopts ("S:s:g:h:t:l:uf", \%opt); |
42 |
|
|
43 |
# read addressbook |
# read addressbook |
44 |
my %name2phone; |
my %name2phone; |
71 |
|
|
72 |
my $sms = "From: mon\n"; |
my $sms = "From: mon\n"; |
73 |
$sms .= "Flash: yes\n" if $opt{f}; |
$sms .= "Flash: yes\n" if $opt{f}; |
74 |
$sms .= "\n$ALERT $opt{g}/$opt{s} $summary ($wday $mon $day $tm)\n"; |
$sms .= "\n$ALERT"; |
75 |
|
$sms .= " $opt{g}/$opt{s}" if ($opt{g} && $opt{s}); |
76 |
|
$sms .= " $summary ($wday $mon $day $tm)\n"; |
77 |
# add next alter time |
# add next alter time |
78 |
$sms .= "Secs until next alert: $opt{l}\n" if $opt{l}; |
$sms .= "Secs until next alert: $opt{l}\n" if $opt{l}; |
79 |
# add rest of text |
# add rest of text |