as-salamu alaykom,

        I just added azan playing feature to ireminder, attached is the diff
        from the latest stable release.

was-salamu alaykom.
--- /usr/local/bin/ireminder    2005-10-27 08:06:37.000000000 +0200
+++ ireminder   2005-11-06 22:01:47.438254722 +0200
@@ -458,6 +458,7 @@
        }
        #default
        $str            = "for Salat Al-$name";
+               if (defined $opt{azan}) { &play_azan(); } # (aelmahmoudy): only 
at salat time
     }
 
     &display("$ID $event_struct{$in_name} - Time NOW $str !!");
@@ -468,7 +469,15 @@
        sleep(1);
     }
 }
-
+##
+# Play an azan file (aelmahmoudy)
+sub play_azan
+{
+       my $playfile = $opt{azan} || "/usr/share/sounds/azan.wav";
+       my $playcmd = "mplayer -really-quiet -noconsolecontrols $playfile >& 
/dev/null";
+       
+       if(fork() == 0) { exec($playcmd); exit; }
+}
 ##
 # Play a sound file (if possible) else gimme a beep :-)
 sub play_sound
@@ -488,6 +497,7 @@
 |Usage: $in_script [-ipraytime path]
        $in_spaces [-skip event_name]
        $in_spaces [-reminder minutes]
+       $in_spaces [-azan [audio_file]]
        $in_spaces [-inplace]
        $in_spaces [-help]
 |;
@@ -508,6 +518,7 @@
     [-ipraytime path]   : Specify the executable path to program
     [-skip event_name]  : Specify name of prayer/event to skip (list ok)
     [-reminder minutes] : Specify prior to how many minutes to remind (list ok)
+    [-azan [audio_file]]: Specify to sound an azan, also can specify an audio 
file to play for azan
     [-inplace]          : Specify to print output in-place (without scrolling)
     [-help]             : Produce this help screen
 
@@ -524,6 +535,7 @@
                "ipraytime=s",  # specify the binary ipraytime executable
                "skip=s@",      # array'ed list of skip events
                "reminder=s@",  # array'ed list of reminder times (minutes)
+               "azan:s", # (aelmahmoudy)
                "inplace",      # specify to print in-place outputs (no scroll)
                "help",         # print a brief help screen
                ) || ( $? = 257, &usage(1, "$ID ERROR - Invalid argument\n") );
_______________________________________________
Developer mailing list
[email protected]
http://lists.arabeyes.org/mailman/listinfo/developer

رد على