[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PrayerTime Library



Nadim Shaikli writes:
 > Salam all - I wanted to commend and congratulate Thamer and Ahmad.T
 > for a job well done.  Your PrayerTime code works very well - I tried
 > it for a couple of places and was VERY impressed.
 > 
 >   http://cvs.arabeyes.org/viewcvs/projects/itl/libs/PrayerTime/
 > 
 > I have a couple of notes with regard to its command-line user interface
 > (this would be mostly directed to you Thamer),
 > 
 >  1. Currently to enter one's location one has to modify the prayert.c
 >     file and recompile.
 > 
 >     It would be best if 'prayert',
 > 
 >         A. Allowed for command-line options
 >            -city "strings here"
 >            -lat "number"
 >            -lon "number"
 >            -UTCdiff "number"  (if not presented use `date`)
 >            -date "number"     (if not presented use `date`)
 >            ...others...
 > 
 >            You could also offer a preselected list of cities and then
 >            simply allow the user to enter just -city.
 > 
 >         B. Allowed a user to define a file for inclusion (or even a
 >            ~/.prayerc file) which would contain all those settings.
 > 
 >         C. Allow the user to pick between military time (ie. 14:00 vs.
 >            2pm) among various minor options
 > 
 >         D. Offer a man page which explains all the above and details
 >            the format of the .prayerc file
 > 
 >  2. The code as it stands now is not really a library.  The API and
 >     the variable passing and access needs a bit more tightening (such
 >     as access to n1/n2/n3, etc).  In other words, be more explicit
 >     with your what is passed-in and what is passed-back.  I'm no
 >     expert on library creation, but thought I'd point it out in case
 >     there was agreement to seek some help on how to best package
 >     the library.
 > 
 > Hope this makes sense and GREAT work BTW, keep it up !!!
 > 
 > Salam.
 > 
 >  - Nadim
 > 
 > 


Thanks Nadim. I'm new at this, and library creation is an uncharted
land for me, so any feedback or suggestions are highly appreciated.
			   
I'm not sure what the plans are for the ITL project now that we have
hijri and prayer code. My speculations and suggestions, and correct me
if I'm wrong here, is that we need to complete these two tasks:


1- Create a shared library (hypothetically named libprayer) which
   should be packaged separatly from any program. The same goes to
   the hijri code either in a separate library or included in the same
   library as the prayer code (libitl?).

   Is this appropriate for such code or would it be an overkill to the
   task at hand (considering the small size of the code)?


2- Develop a beefed up "prayert" that would depend on libprayer. The
   feature list should include all the features suggested above plus a
   daemon mode to work as a command line preyer notifier.
 

If that's the plan then I'd be interested in doing (1) but not (2) at
the moment, at least not before (1) is in a usable "shared library"
state. also looking at CVS I realize that work on a command line app
(2) has already started :). I'd be willing to help if needed in anyway
I can with both tasks.

BTW Nadim, you have all permissions to modify the prayert.c file, but
before doing so, please rename the original one to prayert-demo.c or
something since it was designed as a simplistic example of using the
prayer code.


Regards,

Thamer Mahmoud