Script to find out the name of the parsha

Script to find out the name of the parsha

kobi zamir kobi.zamir at gmail.com
Wed Apr 28 10:46:58 IDT 2010


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 <ladypine at gmail.com>:
> 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 <david at davidsconsultants.com>
> 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
>
>



More information about the Linux-il mailing list