Script to find out the name of the parsha

Script to find out the name of the parsha

Ron Varburg linux-il at hotmail.com
Wed Apr 28 20:41:23 IDT 2010


The names are in /usr/share/calendar/calensar.judaic.
Unfortunately, the dates are out of date.
See http://www.mail-archive.com/linux-il@cs.huji.ac.il/msg58148.html.
Opening a bug about it is in my to do list. I wonder 
when I'll do it.
----------------------------------------
> Date: Wed, 28 Apr 2010 10:46:58 +0300
> Subject: Re: Script to find out the name of the parsha
> From: kobi.zamir at gmail.com
> To: david at davidsconsultants.com; linux-il at cs.huji.ac.il
>
> here are scripts in perl and python:
>
> # apt-get install libhdate-python
> #--------------------------------------------------------
> import hdate
>
> year = 2010
>
> h = hdate.Hdate()
> h.set_gdate(1,1,year)
>
> julian = h.get_julian()
>
> for i in range(0,365):
> h.set_jd(julian)
> julian += 1
>
> day = h.get_gday()
> month = h.get_gmonth()
> parasha = h.get_parasha_string(1)
>
> if parasha != 'none':
> print "%02d/%02d %s" % (day, month, parasha)
> #-----------------------------------------------
>
> # apt-get install libhdate-perl
> #------------------------------------------
> use strict;
> use warnings;
> use hdate;
>
> my $year = 2010;
>
> my $h = new hdate::Hdate();
>
> $h->set_gdate(1,1,$year);
>
> my $julian = $h->get_julian();
>
> for(my $i = 0; $i < 365; $i++) {
> $h->set_jd($julian + $i);
>
> my $day = $h->get_gday();
> my $month = $h->get_gmonth();
> my $parasha = $h->get_parasha_string(1);
>
> if (not $parasha eq "none") {
> print "$day/$month $parasha\n";
> }
> }
> #-----------------------------------------------
>
> 2010/4/28 Orna Agmon Ben-Yehuda :
>> You can try to make something out of Hebcal -
>> http://www.hebcal.com/sedrot/
>>
>> On Wed, Apr 28, 2010 at 9:47 AM, David Suna 
>> wrote:
>>>
>>> Does anyone know of a script (preferably in PHP) that given a date will
>>> return the name of the parsha (torah portion) for that week?
>>>
>>> --
>>> David Suna
>>> david at davidsconsultants.com
>>>
>>>
>>> _______________________________________________
>>> Linux-il mailing list
>>> Linux-il at cs.huji.ac.il
>>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>>
>> --
>> Orna Agmon Ben-Yehuda.
>> http://ladypine.org
>>
>> _______________________________________________
>> Linux-il mailing list
>> Linux-il at cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
 		 	   		  
_________________________________________________________________
Hotmail: שירות דואר אלקטרוני מהימן ועשיר המסופק בחינם.
https://signup.live.com/signup.aspx?id=60969


More information about the Linux-il mailing list