Reminder for Gnome Panel

This is the program that lets us to enter the text and time at which it should be reminded me. The command has the following options

  • -d: date eg:  17/3/2009
  • -t : time [ It’s should be entered as 24hr clock] eg:   20:00:00
  • -r : reminder text [ It should be entered in between a double quotes ] eg: “This is a test”
  • -p :priority [ I hav’nt implemented it yet . Kept it for future implementation.] eg : 1
  • -b :Remind me before [ By using it we can change the default remind before time of 5mins ie it is used to remind from a specific mins before the time we have scheduled to remind. It is specified in mins] eg: 5
use Time::Local;
my @date;
my @time;
my $d=0,$t=0,$r=0,$p=0,$b=0;
my @deftime=localtime();
my $dv="$deftime[3]/$deftime[4]/$deftime[5]",$tv="$deftime[2]:$deftime[1]:$deftime[0]",$rv="",$pv=1,$bv=0;
foreach $argnum (0 .. $#ARGV)
if($ARGV[$argnum] eq "-d")
elsif($ARGV[$argnum] eq "-t")
elsif($ARGV[$argnum] eq "-r")
print "Remind Text:$rvn";
elsif($ARGV[$argnum] eq "-p")
print "Priority:$pvn";
elsif($ARGV[$argnum] eq "-b")
print "Remind Before:$bvn";
print "Date:$dvn";
print "Time:$tv";
my $time=timelocal($time[2],$time[1],$time[0],$date[0],$date[1],$date[2],);
my $nowtime=timelocal(localtime());
my $difftime=$time-$nowtime;
print "nTime Of Alarm:".$time."nTime Now:".$nowtime."nDifference in Seconds:".$difftime."n";</div>
<div class="prog">
open (FH,">>/home/rsrijith/perl/reminder");
print FH "$time:$pv:$bv:$rvn";
close FH;

This code is part of the Perl Panel Code. The related codes to this are:

, , , , , , , , ,

  1. #1 by Nesyengenry on August 11, 2010 - 4:14 pm


(will not be published)