Skip to content

Commit

Permalink
fix: Fix verses from Isaiah on 3rd Sunday of Advent
Browse files Browse the repository at this point in the history
  • Loading branch information
bbloomf committed Dec 13, 2023
1 parent a5e4c57 commit d61c4cc
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 4 deletions.
56 changes: 55 additions & 1 deletion canticumMap.json
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
{"Benedictus":{"ref":"Luc 1: 68-79","map":[0,1,2,3,4,5,6,7,8,9,10,11]},"Magnificat":{"ref":"Luc 1: 46-55","map":[0,1,2,3,4,5,6,7,8,9]},"Nunc dimittis":{"ref":"Luc 2: 29-32","map":[0,1,2,3]},"Canticum Annae":{"ref":"1 Reg 2: 1-10","map":[0,2,3,5,6,8,9,10,13,14]},"Canticum David":{"ref":"1 Par 29: 10-13","map":[0,1,4,6]},"Canticum Ecclesiastici":{"ref":"Eccli 36: 1-16","map":[0,1,3,4,5,6,6,7,7,8,9,10,11,13,14,15]},"Canticum Ezechiae":{"ref":"Is 38: 10-20","map":[0,1,3,5,6,8,10,10,12,13,14]},"Canticum Habacuc":{"ref":"Ha 3: 2-19","map":[0,3,5,6,7,10,11,13,14,16,17,18,20,22,23,26,29,30]},"Canticum Isaiae":{"ref":"Is 45: 15-25","map":[0,1,2,3,5,7,9,11,12,14,15]},"Canticum Isaiae (alterum)":{"ref":"Is 53: 1-5","map":[0,1,3,5,7]},"Canticum Jeremiae":{"ref":"Jer 31: 10-14","map":[0,2,3,6,8]},"Canticum Judith":{"ref":"Judith 16: 15-21","map":[0,1,2,4,5,6,7]},"Canticum Moysis":{"ref":"Exod 15: 1-19","map":[0,1,3,3,4,5,5,6,8,10,11,12,12,14,15,16,18,19,20]},"Canticum Moysis (Deut)":{"ref":"Deut 32: 1-18","map":[0,1,2,3,4,5,7,9,11,12,14,16,17,19,21,23,24,26]},"Canticum Tobiae":{"ref":"Tob 13: 1-10","map":[0,1,2,3,5,6,7,8,9,10]}}
{
"Benedictus": {
"ref": "Luc 1: 68-79",
"map": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
},
"Magnificat": {
"ref": "Luc 1: 46-55",
"map": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
},
"Nunc dimittis": { "ref": "Luc 2: 29-32", "map": [0, 1, 2, 3] },
"Canticum Annae": {
"ref": "1 Reg 2: 1-10",
"map": [0, 2, 3, 5, 6, 8, 9, 10, 13, 14]
},
"Canticum David": { "ref": "1 Par 29: 10-13", "map": [0, 1, 4, 6] },
"Canticum Ecclesiastici": {
"ref": "Eccli 36: 1-16",
"map": [0, 1, 3, 4, 5, 6, 6, 7, 7, 8, 9, 10, 11, 13, 14, 15]
},
"Canticum Ezechiae": {
"ref": "Is 38: 10-20",
"map": [0, 1, 3, 5, 6, 8, 10, 10, 12, 13, 14]
},
"Canticum Habacuc": {
"ref": "Ha 3: 2-19",
"map": [0, 3, 5, 6, 7, 10, 11, 13, 14, 16, 17, 18, 20, 22, 23, 26, 29, 30]
},
"Canticum Isaiae": {
"ref": "Is 45: 15-25",
"map": [0, 1, 2, 3, 5, 7, 9, 11, 12, 14, 15]
},
"Canticum Isaiae (alterum)": { "ref": "Is 53: 1-5", "map": [0, 1, 3, 5, 7] },
"Canticum Jeremiae": { "ref": "Jer 31: 10-14", "map": [0, 2, 3, 6, 8] },
"Canticum Judith": {
"ref": "Judith 16: 15-21",
"map": [0, 1, 2, 4, 5, 6, 7]
},
"Canticum Moysis": {
"ref": "Exod 15: 1-19",
"map": [0, 1, 3, 3, 4, 5, 5, 6, 8, 10, 11, 12, 12, 14, 15, 16, 18, 19, 20]
},
"Canticum Moysis (Deut)": {
"ref": "Deut 32: 1-18",
"map": [0, 1, 2, 3, 4, 5, 7, 9, 11, 12, 14, 16, 17, 19, 21, 23, 24, 26]
},
"Canticum Tobiae": {
"ref": "Tob 13: 1-10",
"map": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10]
},
"Canticum Isaiae (35)": {
"ref": "Is 35: 1-7",
"text": "Lætábitur desérta et ínvia: * et exsultábit solitúdo, et florébit quasi lílium.\nGlória Líbani data est ei, * decor Carméli, et Saron.\nIpsi vidébunt glóriam Dómini, * et decórem Dei nostri.\nConfortáte manus dissolútas, * et génua debília roboráte.\nTunc aperiéntur óculi cæcórum, * et aures surdórum patébunt.\nTunc sáliet sicut cervus claudus, * et apérta erit lingua mutórum.\nQuia scissæ sunt in desérto aquæ, et torréntes in solitúdine.\nEt quæ erat árida, erit in stagnum, * et sítiens in fontes aquárum.",
"map": [0, 1, 3, 3, 4, 5, 6]
}
}
2 changes: 1 addition & 1 deletion propersdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,7 @@ var proprium = {
"grID": 1007,
"gbid": "advent3",
"inVerses": "Ps 84: 3-5, 7-8, 10-12, 14",
"coVerses": "Isaiae 35: 1, 2-3, 5-7"
"coVerses": "Is 35: 1, 2-3, 5-7"
},
"Adv3w": {
"inID": 79,
Expand Down
8 changes: 6 additions & 2 deletions verseRef.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Ref.prototype.getLinesFromLiber = function() {
});
}
var book = mapBooks[self.book] || self.book;
var text = null;
if(book in canticumMapByFile) {
psalm = book;
map = canticumMapByFile[book].map;
Expand All @@ -81,11 +82,12 @@ Ref.prototype.getLinesFromLiber = function() {
var startVerse = Object.keys(chapterMap).map(function(i) { return parseInt(i); }).filter(function(i) { return i<=self.verse; }).sort().slice(-1)[0];
map = chapterMap[startVerse];
psalm = map.file;
text = map.text;
map = map.map;
}
}

return $.get(urlRoot+"psalms/"+psalm).pipe(function(liber) {
function produceResult(liber) {
liber = liber.trim().replace(/\r\n?/g,'\n').split('\n');
return [].concat.apply([], map.map(function(a, index) {
var b = map[index + 1],
Expand All @@ -105,7 +107,9 @@ Ref.prototype.getLinesFromLiber = function() {
}
return [];
}));
});
}
if (text) return produceResult(text);
return $.get(urlRoot+"psalms/"+psalm).pipe(produceResult);
}
function refArrayString(array) {
if(!array.length) return "";
Expand Down

0 comments on commit d61c4cc

Please sign in to comment.