Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mishnah Study Library

This node package is used to generate Mishnah learning calendars. It was primarily built for Mishnah Yomit but can be used to build calendars for other learning structures.

Install

$ npm install mishnah -S

Usage

var mishnah = require("mishnah");

//The total number of Mishanayot.
mishnah.total;

//An array of the names of all the tractates.
mishnah.names;

//An object of the structure of the Mishnah.
//Each key is the name of the tractate with the value an array of total mishnayot per perek.
mishnah.structure;

Functions

mishnah.getToday(date,pretty)

The function returns the Mishnayot to be studied on the given date according to the Mishnah Yomit program.

The function will return a mishnah range which is structured as follows, e.g.

 [{
    t: 0, // tractate index (use the mishnah.names property)
    p: 1, // perek number
    m: 1, // mishnah number
 },{
    t: 0, // tractate index (use the mishnah.names property)
    p: 1, // perek number
    m: 2, // mishnah number
 }]

If the value of pretty is true then a readable version will be returned, e.g.

Parah 12:6-7`

mishnah.buildCalendar(o)

The function builds a daily Mishnah learning calendar.

The argument is an optional object:

  {
     start: new Date(),  // starting date (defaults to  10 July 2010)
     per_day: 2,         // mishnayot to be learnt per day (default: 2)
     cycles:  1,         // cycles to generate (default: 1)
     perakim:  false,    // build a perakim based learning schedule (default: false)
     sun2thurs:  false,  // build a schedule for Sunday to Thursday only (default: false),
     seder: "nashim"     // build a schedule for a specific seder only (default: undefined)
  }

The function returns the following array:

[{
   d: [{
      t: 0, // tractate index (use the mishnah.names property)
      p: 1, // perek number
      m: 1, // mishnah number
   },{
      t: 0, // tractate index (use the mishnah.names property)
      p: 1, // perek number
      m: 2, // mishnah number
   }],
   date: Date, // date object
   english: "Monday, September 7th 2015" // nicely formated english date
   hebrew: "23 Elul 5775", // nicely formatted hebrew date
   pretty: "Berachot 1:1-2" // nicely formated mishnayot to study
}, { ...]

mishnah.prettyFormat(d)

Returns a pretty format of a Mishnah range (as already described above).

mishnah.source(mishnah, callback)

Returns the mishnah source/text in html format from wikisource.

The mishnah object expects the following format:

{
  t: 0, // tractate index (use the mishnah.names property)
  p: 1, // perek number
  m: 1, // mishnah number
}

If a callback is not provided, a promise will be returned.

Printable yearly calendar

Generate a branded, one-page PDF and its matching CSV for a Jewish year:

npm run calendar -- 5787

The calendar begins on the Sunday of the full week before Rosh Hashanah and ends on the Shabbat after Sukkot/Simchat Torah in the following Jewish year. Output is written to data/calendar-5787.pdf and data/calendar-5787.csv.

Use --format pdf or --format csv to create just one format, --output to choose a destination, and --israel for the Israeli holiday and Torah-reading cycle. Run npm run calendar -- --help for all options. When no year is given, the current or upcoming Jewish year is selected automatically.

Credits

The original sheet with the breakdown of mishnayot per perek was taken from here.

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages