FINISHED!

This commit is contained in:
boose_magoose 2023-12-01 21:46:19 -05:00
parent 6bc35810f3
commit 8c767b5235
7 changed files with 240 additions and 147 deletions

View File

@ -1058,7 +1058,10 @@ out of the grave, though it is <i>a land of darkness as darkness
itself, and without any order</i> (<scripRef passage="Job 10:22" id="Gen.ii-p14.5" parsed="|Job|10|22|0|0" osisRef="Bible:Job.10.22">Job x. 22</scripRef>), and can make them glorious
bodies.</p>
</div><scripCom type="Commentary" passage="Ge 1:3-5" id="Gen.ii-p14.6" parsed="|Gen|1|3|1|5" osisRef="Bible:Gen.1.3-Gen.1.5"/><div class="Commentary" id="Bible:Gen.1.3-Gen.1.5">
</div>
<scripCom type="Commentary" passage="Ge 1:3-5" id="Gen.ii-p14.6" parsed="|Gen|1|3|1|5" osisRef="Bible:Gen.1.3-Gen.1.5"/>
<div class="Commentary" id="Bible:Gen.1.3-Gen.1.5">
<h4 id="Gen.ii-p14.7">The Creation. (<span class="smallcaps" id="Gen.ii-p14.8">b. c.</span> 4004.)</h4>
<p class="passage" id="Gen.ii-p15">3 And God said, Let there be light: and there
@ -2050,7 +2053,8 @@ creation, to the honour of the great Creator, who is therefore
worthy to receive, on that day, blessing, and honour, and praise,
from all religious assemblies.</p>
</div><scripCom type="Commentary" passage="Ge 2:4-7" id="Gen.iii-p4.3" parsed="|Gen|2|4|2|7" osisRef="Bible:Gen.2.4-Gen.2.7"/><div class="Commentary" id="Bible:Gen.2.4-Gen.2.7">
</div><scripCom type="Commentary" passage="Ge 2:4-7" id="Gen.iii-p4.3" parsed="|Gen|2|4|2|7" osisRef="Bible:Gen.2.4-Gen.2.7"/>
<div class="Commentary" id="Bible:Gen.2.4-Gen.2.7">
<h4 id="Gen.iii-p4.4">The Creation. (<span class="smallcaps" id="Gen.iii-p4.5">b. c.</span> 4004.)</h4>
<p class="passage" id="Gen.iii-p5">4 These <i>are</i> the generations of the
@ -10810,7 +10814,7 @@ brother of Eshcol, and brother of Aner: and these <i>were</i>
confederate with Abram. &#160; 14 And when Abram heard that his
brother was taken captive, he armed his trained <i>servants,</i>
born in his own house, three hundred and eighteen, and pursued
<i>them</i> unto Dan. 15 And he divided himself against
<i>them</i> unto <scripRef passage="Dan. 15" id="Gen.xv-p7.1" parsed="|Dan|15|0|0|0" osisRef="Bible:Dan.15">Dan. 15</scripRef> And he divided himself against
them, he and his servants, by night, and smote them, and pursued
them unto Hobah, which <i>is</i> on the left hand of Damascus.
&#160; 16 And he brought back all the goods, and also brought again
@ -43213,7 +43217,7 @@ inducements to Moses not to intercede for them: <i>Therefore, let
me alone.</i> What did Moses, or what could he do, to hinder God
from consuming them? When God resolves to abandon a people, and the
decree of ruin has gone forth, no intercession can prevent it,
<scripRef passage="Eze 14:14,15:1" id="Ex.xxxiii-p15.3" osisRef="Bible:Eze.14.14 Bible:Eze.15.1">Ezek. xiv. 14; Jer. xv.
<scripRef passage="Eze 14:14,15:1" id="Ex.xxxiii-p15.3" osisRef="Bible:Ezek.14.14 Bible:Jer.15.1">Ezek. xiv. 14; Jer. xv.
1</scripRef>. But God would thus express the greatness of his just
displeasure against them, after the manner of men, who would have
none to intercede for those they resolve to be severe with. Thus
@ -45510,7 +45514,7 @@ gold, and in silver, and in brass, &#160; 33 And in the cutting of
stones, to set <i>them,</i> and in carving of wood, to make any
manner of cunning work. &#160; 34 And he hath put in his heart that
he may teach, <i>both</i> he, and Aholiab, the son of Ahisamach, of
the tribe of Dan. 35 Them hath he filled with wisdom of
the tribe of <scripRef passage="Dan. 35" id="Ex.xxxvi-p14.2" parsed="|Dan|35|0|0|0" osisRef="Bible:Dan.35">Dan. &#160; 35</scripRef> Them hath he filled with wisdom of
heart, to work all manner of work, of the engraver, and of the
cunning workman, and of the embroiderer, in blue, and in purple, in
scarlet, and in fine linen, and of the weaver, <i>even</i> of them

View File

@ -97478,7 +97478,7 @@ idolatry notwithstanding (<scripRef passage="2Ch 28:22-25" id="iiCh.xxix-p1.5" p
22-25</scripRef>), and so his story ends, <scripRef passage="2Ch 28:26,27" id="iiCh.xxix-p1.6" parsed="|2Chr|28|26|28|27" osisRef="Bible:2Chr.28.26-2Chr.28.27">ver. 26, 27</scripRef>.</p>
<scripCom type="Commentary" passage="2Ch 27" id="iiCh.xxix-p0.1_1" parsed="|2Chr|27|0|0|0" osisRef="Bible:2Chr.27"/>
<scripCom type="Commentary" passage="2Ch 27:1-5" id="iiCh.xxix-p0.2_1" parsed="|2Chr|27|1|27|5" osisRef="Bible:2Chr.27.1-2Chr.27.5"/><div class="Commentary" id="Bible:2Chr.27.1-2Chr.27.5">
<scripCom type="Commentary" passage="2Ch 27:1-5" id="iiCh.xxix-p0.2_1" parsed="|2Chr|27|1|27|5" osisRef="Bible:2Chr.28.1-2Chr.28.5"/><div class="Commentary" id="Bible:2Chr.28.1-2Chr.28.5">
<h4 id="iiCh.xxix-p1.9">The Wickedness of Ahaz. (<span class="smallcaps" id="iiCh.xxix-p1.10">b. c.</span> 738.)</h4>
<p class="passage" id="iiCh.xxix-p2">1 Ahaz <i>was</i> twenty years old when he began
@ -97535,7 +97535,7 @@ departed from them and an inundation of judgments broke in upon
them. Those that knew not their happiness in the foregoing reign
were taught to value it by the miseries of this reign.</p>
</div><scripCom type="Commentary" passage="2Ch 27:6-15" id="iiCh.xxix-p0.3" parsed="|2Chr|27|6|27|15" osisRef="Bible:2Chr.27.6-2Chr.27.15"/><div class="Commentary" id="Bible:2Chr.27.6-2Chr.27.15">
</div><scripCom type="Commentary" passage="2Ch 27:6-15" id="iiCh.xxix-p0.3" parsed="|2Chr|27|6|27|15" osisRef="Bible:2Chr.28.6-2Chr.28.15"/><div class="Commentary" id="Bible:2Chr.28.6-2Chr.28.15">
<h4 id="iiCh.xxix-p3.6">The King of Israel Defeats
Ahaz. (<span class="smallcaps" id="iiCh.xxix-p3.7">b. c.</span> 738.)</h4>
@ -97705,7 +97705,7 @@ grace as, in obedience to the calls of God by so many prophets, to
root idolatry out of their kingdom, which, soon after this, was the
ruin of it.</p>
</div><scripCom type="Commentary" passage="2Ch 27:16-27" id="iiCh.xxix-p0.4" parsed="|2Chr|27|16|27|27" osisRef="Bible:2Chr.27.16-2Chr.27.27"/><div class="Commentary" id="Bible:2Chr.27.16-2Chr.27.27">
</div><scripCom type="Commentary" passage="2Ch 27:16-27" id="iiCh.xxix-p0.4" parsed="|2Chr|27|16|27|27" osisRef="Bible:2Chr.28.16-2Chr.28.27"/><div class="Commentary" id="Bible:2Chr.28.16-2Chr.28.27">
<h4 id="iiCh.xxix-p14.4">The Death of Ahaz. (<span class="smallcaps" id="iiCh.xxix-p14.5">b. c.</span> 738.)</h4>
<p class="passage" id="iiCh.xxix-p15">16 At that time did king Ahaz send unto the
@ -97870,7 +97870,7 @@ last reign, and the wheels were set a-going again, to the great
satisfaction of king and people, <scripRef passage="2Ch 29:20-36" id="iiCh.xxx-p1.3" parsed="|2Chr|29|20|29|36" osisRef="Bible:2Chr.29.20-2Chr.29.36">ver. 20-36</scripRef>.</p>
<scripCom type="Commentary" passage="2Ch 28" id="iiCh.xxx-p0.1_1" parsed="|2Chr|28|0|0|0" osisRef="Bible:2Chr.28"/>
<scripCom type="Commentary" passage="2Ch 28:1-11" id="iiCh.xxx-p0.2_1" parsed="|2Chr|28|1|28|11" osisRef="Bible:2Chr.28.1-2Chr.28.11"/><div class="Commentary" id="Bible:2Chr.28.1-2Chr.28.11">
<scripCom type="Commentary" passage="2Ch 28:1-11" id="iiCh.xxx-p0.2_1" parsed="|2Chr|28|1|28|11" osisRef="Bible:2Chr.29.1-2Chr.29.11"/><div class="Commentary" id="Bible:2Chr.29.1-2Chr.29.11">
<h4 id="iiCh.xxx-p1.6">Hezekiah's Good Reign. (<span class="smallcaps" id="iiCh.xxx-p1.7">b. c.</span> 726.)</h4>
<p class="passage" id="iiCh.xxx-p2">1 Hezekiah began to reign <i>when he was</i>
@ -98019,7 +98019,7 @@ minister to him. They must therefore be ashamed of their late
remissness, and, now that the doors of the temple were opened
again, must set about their work with double diligence.</p>
</div><scripCom type="Commentary" passage="2Ch 28:12-19" id="iiCh.xxx-p0.3" parsed="|2Chr|28|12|28|19" osisRef="Bible:2Chr.28.12-2Chr.28.19"/><div class="Commentary" id="Bible:2Chr.28.12-2Chr.28.19">
</div><scripCom type="Commentary" passage="2Ch 28:12-19" id="iiCh.xxx-p0.3" parsed="|2Chr|28|12|28|19" osisRef="Bible:2Chr.29.12-2Chr.29.19"/><div class="Commentary" id="Bible:2Chr.29.12-2Chr.29.19">
<h4 id="iiCh.xxx-p10.5">The Temple Cleansed. (<span class="smallcaps" id="iiCh.xxx-p10.6">b. c.</span> 726.)</h4>
<p class="passage" id="iiCh.xxx-p11">12 Then the Levites arose, Mahath the son of
@ -98117,7 +98117,7 @@ the vessels of the sanctuary may be profaned for a while, God will
find a time and a way to sanctify them. Neither his ordinances nor
his people shall be suffered to fail for ever.</p>
</div><scripCom type="Commentary" passage="2Ch 28:20-36" id="iiCh.xxx-p0.4" parsed="|2Chr|28|20|28|36" osisRef="Bible:2Chr.28.20-2Chr.28.36"/><div class="Commentary" id="Bible:2Chr.28.20-2Chr.28.36">
</div><scripCom type="Commentary" passage="2Ch 28:20-36" id="iiCh.xxx-p0.4" parsed="|2Chr|28|20|28|36" osisRef="Bible:2Chr.29.20-2Chr.29.36"/><div class="Commentary" id="Bible:2Chr.29.20-2Chr.29.36">
<h4 id="iiCh.xxx-p16.3">Hezekiah's Sacrifice. (<span class="smallcaps" id="iiCh.xxx-p16.4">b. c.</span> 726.)</h4>
<p class="passage" id="iiCh.xxx-p17">20 Then Hezekiah the king rose early, and
@ -103024,7 +103024,7 @@ God, been made serviceable to it, <scripRef passage="Php 1:12" id="Ez.vii-p10.2"
appealing to Darius, hoped to get an order to suppress them, but,
instead of that, they got an order to supply them. Thus <i>out of
the eater comes forth meat.</i> The apocryphal Esdras (or Ezra),
<scripRef id="Ez.vii-p10.3">Book I. <i>ch.</i> iii. and iv.</scripRef>, gives another account of
Book I. <i>ch.</i> iii. and iv., gives another account of
this decree in favour of the Jews, that Darius had vowed that if
ever he came to the kingdom he would build the temple at Jerusalem,
and that Zerubbabel, who was one of his attendants (whereas it is
@ -111570,7 +111570,7 @@ my people: if the worst come to the worst," as we say, "<i>I shall
but die.</i>" Nothing venture, nothing win. She said not this in
despair or passion, but in a holy resolution to do her duty and
trust God with the issue; welcome his holy will. In the apocryphal
part of this book (<scripRef id="Esth.v-p14.2"><i>ch.</i> xiii. and xiv.</scripRef>) we have
part of this book (<i>ch.</i> xiii. and xiv.) we have
Mordecai's prayer and Esther's upon this occasion, and both of them
very particular and pertinent. In the sequel of the story we shall
find that God said not to this seed of Jacob, <i>Seek you me in

View File

@ -4709,7 +4709,7 @@ those have no fear of the rod of God upon themselves who have no
compassion for those that feel the smart of it. See <scripRef passage="Jam 1:27" id="Job.vii-p18.3" parsed="|Jas|1|27|0|0" osisRef="Bible:Jas.1.27">Jam. i. 27</scripRef>. 3. Troubles are the
trials of friendship. When a man is afflicted he will see who are
his friends indeed and who are but pretenders; for <i>a brother is
born for adversity,</i> <scripRef passage="Pr 17:17,18:24" id="Job.vii-p18.4">Prov.
born for adversity,</i> <scripRef passage="Pr 17:17,18:24" id="Job.vii-p18.4" osisRef="Bible:Prov.17.17 Bible:Prov.18.24">Prov.
xvii. 17; xviii. 24</scripRef>.</p>
<p class="indent" id="Job.vii-p19">II. He shows how wretchedly he was
@ -41372,7 +41372,7 @@ pretend to be an equivalent, much less an expedient to preserve the
honour of God's government and laws and repair the injury done to
that honour by the sin of man. They could not take away the terror
of sin by pacifying the conscience, nor the power of sin by
sanctifying the nature; it was impossible, <scripRef passage="Heb 9:9,10:1-4" id="Ps.xli-p16.4">Heb. ix. 9; x. 1-4</scripRef>. What there was in
sanctifying the nature; it was impossible, <scripRef passage="Heb 9:9,10:1-4" id="Ps.xli-p16.4" osisRef="Bible:Heb.9.9 Bible:Heb.10.1-Heb.10.4">Heb. ix. 9; x. 1-4</scripRef>. What there was in
them that was valuable resulted from their reference to Jesus
Christ, of whom they were types&#8212;shadows indeed, but shadows of
good things to come, and trials of the faith and obedience of God's
@ -65177,7 +65177,7 @@ pleasures. 2. Let the joy terminate in God (<scripRef passage="Ps 97:12" id="Ps.
righteous.</i> Let all the streams of comfort, which flow to us in
the channel of Christ's kingdom, lead us to the fountain, and
oblige us to <i>rejoice in the Lord.</i> All the lines of joy must
meet in him as in the centre. See <scripRef passage="Php 3:3,4:4" id="Ps.xcviii-p12.2">Phil. iii. 3; iv. 4</scripRef>. 3. Let it express
meet in him as in the centre. See <scripRef passage="Php 3:3,4:4" id="Ps.xcviii-p12.2" osisRef="Bible:Phil.3.3 Bible:Phil.4.4">Phil. iii. 3; iv. 4</scripRef>. 3. Let it express
itself in praise and thanksgiving: <i>Give thanks at the
remembrance of his holiness.</i> Whatever is the matter of our
rejoicing ought to be the matter of our thanksgiving, and
@ -94730,7 +94730,7 @@ conscience of speaking truly (it is his <i>heart</i> that
<i>answers,</i> that is, he speaks as he thinks, and dares not do
otherwise, he <i>speaks the truth in his heart,</i> <scripRef passage="Ps 15:2" id="Prov.xvi-p56.2" parsed="|Ps|15|2|0|0" osisRef="Bible:Ps.15.2">Ps. xv. 2</scripRef>), and of speaking
pertinently and profitably, and therefore he <i>studies to
answer,</i> that his speech may be with grace, <scripRef passage="Ne 2:4,5:7" id="Prov.xvi-p56.3">Neh. ii. 4; v. 7</scripRef>. 2. A wicked man is proved
answer,</i> that his speech may be with grace, <scripRef passage="Ne 2:4,5:7" id="Prov.xvi-p56.3" osisRef="Bible:Neh.2.4 Bible:Neh.5.7">Neh. ii. 4; v. 7</scripRef>. 2. A wicked man is proved
to be a fool by this, that he never heeds what he says, but his
<i>mouth pours out evil things,</i> to the dishonour of God and
religion, his own reproach, and the hurt of others. Doubtless that
@ -103599,7 +103599,7 @@ and likely to answer his intention; he will not deliver himself in
a continued speech, or starched discourse, but with pauses, that he
may hear what is to be objected and answer it. <i>Non minus
interdum oratorium est tacere quam dicere</i>&#8212;<i>True oratory
requires an occasional pause.</i> Plin. <scripRef passage="Eph. 7" id="Prov.xxx-p22.1" parsed="|Eph|7|0|0|0" osisRef="Bible:Eph.7">Ep. 7</scripRef>.6.</p>
requires an occasional pause.</i> Plin. Ep. 7.6.7</p> <!-- https://anastrophe.uchicago.edu/cgi-bin/perseus/citequery3.pl?dbname=LatinAugust21&getid=0&query=Plin.%20Ep.%207.6 -->
</div><scripCom type="Commentary" passage="Pr 29:12" id="Prov.xxx-p22.2" parsed="|Prov|29|12|0|0" osisRef="Bible:Prov.29.12"/><div class="Commentary" id="Bible:Prov.29.12">
<p class="passage" id="Prov.xxx-p23">12 If a ruler hearken to lies, all his servants
@ -105535,7 +105535,7 @@ and sincerity, <scripRef passage="Pr 10:18,12:17,19,22,13:5,17:4,20:14,17" id="P
<li class="small" id="Prov.xxxii-p23.40">Of slandering, <scripRef passage="Pr 10:18,16:27,25:23" id="Prov.xxxii-p23.41" parsed="|Prov|10|18|0|0;|Prov|16|27|0|0;|Prov|25|23|0|0" osisRef="Bible:Prov.10.18 Bible:Prov.16.27 Bible:Prov.25.23"><i>ch.</i> x. 18; xvi. 27; xxv.
23</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.42">Of talkativeness and silence, <scripRef passage="Pr 10:19,11:12,12:23,13:3,17:27,28,29:11,20" id="Prov.xxxii-p23.43"><i>ch.</i> x. 19; xi.
<li class="small" id="Prov.xxxii-p23.42">Of talkativeness and silence, <scripRef passage="Pr 10:19,11:12,12:23,13:3,17:27,28,29:11,20" id="Prov.xxxii-p23.43" osisRef="Bible:Prov.10.19 Bible:Prov.11.12 Bible:Prov.12.23 Bible:Prov.13.3 Bible:Prov.17.27-Prov.17.28 Bible:Prov.29.11 Bible:Prov.29.20"><i>ch.</i> x. 19; xi.
12; xii. 23; xiii. 3; xvii. 27, 28; xxix. 11, 20</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.44">Of justice and injustice, <scripRef passage="Pr 11:1,13:16,16:8,11,17:15,26,18:5,20:10,23" id="Prov.xxxii-p23.45" parsed="|Prov|11|1|0|0;|Prov|13|16|0|0;|Prov|16|8|0|0;|Prov|16|11|0|0;|Prov|17|15|0|0;|Prov|17|26|0|0;|Prov|18|5|0|0;|Prov|20|10|0|0;|Prov|20|23|0|0" osisRef="Bible:Prov.11.1 Bible:Prov.13.16 Bible:Prov.16.8 Bible:Prov.16.11 Bible:Prov.17.15 Bible:Prov.17.26 Bible:Prov.18.5 Bible:Prov.20.10 Bible:Prov.20.23"><i>ch.</i> xi. 1;
@ -105554,7 +105554,7 @@ xxix. 23</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.52">Of tale-bearing, <scripRef passage="Pr 11:13,16:28,18:8,20:19,26:20,22" id="Prov.xxxii-p23.53" parsed="|Prov|11|13|0|0;|Prov|16|28|0|0;|Prov|18|8|0|0;|Prov|20|19|0|0;|Prov|26|20|0|0;|Prov|26|22|0|0" osisRef="Bible:Prov.11.13 Bible:Prov.16.28 Bible:Prov.18.8 Bible:Prov.20.19 Bible:Prov.26.20 Bible:Prov.26.22"><i>ch.</i> xi. 13; xvi. 28;
xviii. 8; xx. 19; xxvi. 20, 22</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.54">Of rashness and deliberation, <scripRef passage="Pr 11:14,15:22,18:13,19:2,20:5,18,21:29,22:3,25:8-10" id="Prov.xxxii-p23.55"><i>ch.</i>
<li class="small" id="Prov.xxxii-p23.54">Of rashness and deliberation, <scripRef passage="Pr 11:14,15:22,18:13,19:2,20:5,18,21:29,22:3,25:8-10" id="Prov.xxxii-p23.55" osisRef="Bible:Prov.11.14 Bible:Prov.15.22 Bible:Prov.18.13 Bible:Prov.19.2 Bible:Prov.20.5 Bible:Prov.20.18 Bible:Prov.21.29 Bible:Prov.22.3 Bible:Prov.25.8-Prov.25.10"><i>ch.</i>
xi. 14; xv. 22; xviii. 13; xix. 2; xx. 5, 18; xxi. 29; xxii. 3;
xxv. 8-10</scripRef>.</li>
@ -105636,7 +105636,7 @@ xvi. 1, 4, 9, 33; xvii. 3; xix. 21; xx. 12, 24</scripRef>;
26</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.103">Of devotion towards God, and dependence on him,
<scripRef passage="Pr 16:3,18:10,23:26,27:1,28:25,29:25" id="Prov.xxxii-p23.104"><i>ch.</i>
<scripRef passage="Pr 16:3,18:10,23:26,27:1,28:25,29:25" id="Prov.xxxii-p23.104" osisRef="Bible:Prov.16.3 Bible:Prov.18.10 Bible:Prov.23.26 Bible:Prov.27.1 Bible:Prov.28.25 Bible:Prov.29.25"><i>ch.</i>
xvi. 3; xviii. 10; xxiii. 26; xxvii. 1; xxviii. 25; xxix.
25</scripRef>.</li>
@ -105666,7 +105666,7 @@ xxviii. 23; xxix. 1</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.121">Of ingratitude, <scripRef passage="Pr 17:13" id="Prov.xxxii-p23.122" parsed="|Prov|17|13|0|0" osisRef="Bible:Prov.17.13"><i>ch.</i> xvii. 13</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.123">Of friendship, <scripRef passage="Pr 17:17,18:24,27:9,10,14,17" id="Prov.xxxii-p23.124"><i>ch.</i> xvii. 17; xviii. 24;
<li class="small" id="Prov.xxxii-p23.123">Of friendship, <scripRef passage="Pr 17:17,18:24,27:9,10,14,17" id="Prov.xxxii-p23.124" osisRef="Bible:Prov.17.17 Bible:Prov.18.24 Bible:Prov.27.9 Bible:Prov.27.10 Bible:Prov.27.14 Bible:Prov.27.17"><i>ch.</i> xvii. 17; xviii. 24;
xxvii. 9, 10, 14, 17</scripRef>.</li>
<li class="small" id="Prov.xxxii-p23.125">Of sensual pleasures, <scripRef passage="Pr 21:17,23:1-3,6-8,19-21,27:7" id="Prov.xxxii-p23.126" parsed="|Prov|21|17|0|0;|Prov|23|1|23|3;|Prov|23|6|23|8;|Prov|23|19|23|21;|Prov|27|7|0|0" osisRef="Bible:Prov.21.17 Bible:Prov.23.1-Prov.23.3 Bible:Prov.23.6-Prov.23.8 Bible:Prov.23.19-Prov.23.21 Bible:Prov.27.7"><i>ch.</i> xxi. 17; xxiii. 1-3,

View File

@ -583,7 +583,8 @@ it is not recorded. But, prophecy growing into contempt with many,
God revived the honour of it, and put a new lustre upon it, in the
power given to Elijah and Elisha to work miracles, and the great
things that God did by them for the confirming of the people's
faith in it, and the awakening of their regard to it, <scripRef id="iv-p16.1" passage="2Ki 2:3,4:1,38,5:22,6:1">2 Kings ii. 3; iv. 1, 38; v. 22;
faith in it, and the awakening of their regard to it, <scripRef id="iv-p16.1" passage="2Ki 2:3,4:1,38,5:22,6:1" osisRef="Bible:2Kings2.3 Bible:2Kings4.1 Bible:2Kings4.38 Bible:2Kings5.22 Bible:2Kings6.1"
>2 Kings ii. 3; iv. 1, 38; v. 22;
vi. 1</scripRef>. In their time, and by their agency, it should
seem, the schools of the prophets were revived, and we find sons of
the prophets, fellows of those sacred colleges, employed in
@ -22124,7 +22125,7 @@ completing of the same blessed work which was begun in the first
preaching and planting of Christianity in the world.</p>
<p class="intro" id="Is.xli-p2" shownumber="no">In this chapter we have, I. Orders given to preach
and publish the glad tidings of redemption, <scripRef id="Is.xli-p2.1" osisRef="Bible:Isa.401 Bible:Isa.2" parsed="|Isa|401|0|0|0;|Isa|2|0|0|0" passage="Isa 401,2">ver. 1, 2</scripRef>. II. These glad tidings introduced
and publish the glad tidings of redemption, <scripRef id="Is.xli-p2.1" osisRef="Bible:Isa.40.1 Bible:Isa.40.2" parsed="|Isa|401|0|0|0;|Isa|2|0|0|0" passage="Isa 40:1,2">ver. 1, 2</scripRef>. II. These glad tidings introduced
by a voice in the wilderness, which gives assurance that all
obstructions shall be removed (<scripRef id="Is.xli-p2.2" osisRef="Bible:Isa.40.3-Isa.40.5" parsed="|Isa|40|3|40|5" passage="Isa 40:3-5">ver.
3-5</scripRef>), and that, though all creatures fail and fade, the
@ -30914,7 +30915,7 @@ ever to watch against all impurity. But especially let those be
<i>clean</i> who <i>bear the vessels of the Lord,</i> that is, the
priests, who had the charge of the vessels of the sanctuary (when
they were restored by a particular grant) to carry them to
Jerusalem, <scripRef id="Is.liii-p12.4" passage="Ezr 1:7,8:23">Ezra i. 7; viii.
Jerusalem, <scripRef id="Is.liii-p12.4" passage="Ezr 1:7,8:23" osisRef="Bible:Ezra.1.7 Bible:Ezra.8.23">Ezra i. 7; viii.
24</scripRef>, &amp;c. Let them not only avoid touching any unclean
thing, but be very careful to <i>cleanse themselves according to
the purification of the sanctuary.</i> Christians are made to our
@ -37905,7 +37906,7 @@ enmity of Esau against Jacob (<scripRef id="Is.lxiv-p3.4" osisRef="Bible:Gen.27.
xxvii. 41</scripRef>) and perhaps with an allusion to David's
glorious triumphs over the Edomites, by which it should seem, more
than by any other of his victories, he <i>got himself a name,</i>
<scripRef id="Is.lxiv-p3.5" passage="Ps 60:1,2Sa 8:13,14">Ps. lx., <i>title,</i> 2
<scripRef id="Is.lxiv-p3.5" passage="Ps 60:1,2Sa 8:13,14 Bible:2Sam.8.13-2Sam.8.14" osisRef="Bible:Psa.60.1">Ps. lx., <i>title,</i> 2
Sam. viii. 13, 14</scripRef>. But this is not all: 2. It is a
victory obtained by the grace of God in Christ over our spiritual
enemies. We find the garments dipped in blood adorning him whose
@ -43756,7 +43757,7 @@ will thus return to God, 1. They shall be blessed themselves; for
to that sense the first words may be read: "<i>If thou wilt return
to me,</i> then <i>thou shalt return,</i> that is, thou shalt be
brought back out of thy captivity into thy own land again, as was
of old promised," <scripRef id="Jer.v-p5.1" passage="De 4:29,30:2">Deut. iv. 29;
of old promised," <scripRef id="Jer.v-p5.1" passage="De 4:29,30:2" osisRef="Bible:Deut.4.29 Bible:Deut.30.2">Deut. iv. 29;
xxx. 2</scripRef>. Or, "Then <i>thou shalt rest in me,</i> shalt
return to me as thy rest, even while thou art in the land of thy
captivity." 2. They shall be blessings to others; for their
@ -78089,7 +78090,7 @@ away for their iniquity.</p>
<p class="indent" id="Ez.v-p9" shownumber="no">The best exposition of this part of
Ezekiel's prediction of Jerusalem's desolation is Jeremiah's
lamentation of it, <scripRef id="Ez.v-p9.1" passage="La 4:3,4,5:10">Lam. iv. 3, 4,
lamentation of it, <scripRef id="Ez.v-p9.1" passage="La 4:3,4,5:10" osisRef="Bible:Lam.4.3-Lam.4.4 Bible:Lam.5.10">Lam. iv. 3, 4,
&amp;c., and v. 10</scripRef>, where he pathetically describes the
terrible famine that was in Jerusalem during the siege and the sad
effects of it.</p>
@ -86051,7 +86052,7 @@ uncleanness;</i> and therefore he has not dared to <i>defile his
neighbour's wife,</i> nor said or done any thing which had the
least tendency to corrupt or debauch her, no, nor will he make any
undue approaches to his own wife when she is <i>put apart for her
uncleanness,</i> for it was forbidden by the law, <scripRef id="Ez.xix-p11.8" passage="Le 18:19,20:18">Lev. xviii. 19; xx. 18</scripRef>. Note,
uncleanness,</i> for it was forbidden by the law, <scripRef id="Ez.xix-p11.8" passage="Le 18:19,20:18" osisRef="Bible:Lev.None.18:19-Lev.None.20:18">Lev. xviii. 19; xx. 18</scripRef>. Note,
It is an essential branch of wisdom and justice to keep the
appetites of the body always in subjection to reason and virtue.
(3.) From sins against the eighth commandment. He is a <i>just
@ -111176,7 +111177,7 @@ supply it either with <i>sacrifice,</i> which was suppressed by
Antiochus, or with <i>gospel-worship,</i> which was suppressed by
the Antichrist. Then he <i>set up the abomination of desolation
upon the altar</i> (<scripRef id="Dan.xii-p20.6" osisRef="Bible:1Macc.1.54" parsed="|1Macc|1|54|0|0" passage="1 Mac. i. 54">1 Mac. i. 54</scripRef>), even an <i>idol altar</i>
(<scripRef id="Dan.xii-p20.7"><i>v.</i> 59</scripRef>), and called the temple the temple of
(<scripRef id="Dan.xii-p20.7" osisRef="Bible:1Macc.1.59"><i>v.</i> 59), and called the temple the temple of
<i>Jupiter Olympius,</i> <scripRef id="Dan.xii-p20.8" osisRef="Bible:2Macc.6.2" parsed="|2Macc|6|2|0|0" passage="2 Mac. vi. 2">2 Mac. vi. 2</scripRef>.</p>
<p class="indent" id="Dan.xii-p21" shownumber="no">4. He persecuted those who retained their
@ -112166,7 +112167,7 @@ which are carefully gathered up by the divine Providence and the
care of the church, that nothing might be lost, as St. Paul's short
epistles after his long ones. The son of Sirach speaks of these
twelve prophets with honour, as men that <i>strengthened Jacob,</i>
<scripRef id="Hos.i-p2.2"><i>Ecclus.</i> xlix. 10</scripRef>. Nine of these prophets prophesied
<i>Ecclus.</i> xlix. 10. Nine of these prophets prophesied
before the captivity, and the last three after the return of the
Jews to their own land. Some difference there is in the order of
these books. We place them as the ancient Hebrew did; and all agree
@ -117888,7 +117889,7 @@ hearken to the word of God, that would teach and persuade them to
do well? And no wonder that there were wicked doings among them
when, 3. Their worship was corrupt (<scripRef id="Hos.x-p20.3" osisRef="Bible:Hos.9.15" parsed="|Hos|9|15|0|0" passage="Ho 9:15"><i>v.</i> 15</scripRef>): <i>All their wickedness is in
Gilgal,</i> which was a place infamous for idolatry, as appears,
<scripRef id="Hos.x-p20.4" passage="Ho 4:15,12:11,Am 4:4,5:5"><i>ch.</i> iv. 15;
<scripRef id="Hos.x-p20.4" passage="Ho 4:15,12:11,Am 4:4,5:5" osisRef="Bible:Hos.4.15 Bible:Hos.12.11 Bible:Amos.4.4 Bible:Amos.5.5"><i>ch.</i> iv. 15;
xii. 11; Amos iv. 4; v. 5</scripRef>. It is probable that the
idolaters chose that place for their head-quarters because it had
been famous in other ages for solemn transactions between God and

View File

@ -23083,7 +23083,7 @@ we find in scripture, were designed to reach the like persons and
practices to the end of the world; for they are not of private
interpretation, <scripRef passage="2Pe 1:20" id="Matt.xvi-p21.2" parsed="|2Pet|1|20|0|0" osisRef="Bible:2Pet.1.20">2 Pet. i.
20</scripRef>. The sinners of the latter days are prophesied of,
<scripRef passage="1Ti 4:1,2Ti 3:1,2,3:3" id="Matt.xvi-p21.3">1 Tim. iv. 1; 2 Tim. iii.
<scripRef passage="1Ti 4:1,2Ti 3:1,2,3:3" id="Matt.xvi-p21.3" osisRef="Bible:1Tim.4.1 Bible:2Tim.3.1-2Tim.3.2 Bible:2Tim.3.3">1 Tim. iv. 1; 2 Tim. iii.
1; 2 Pet. iii. 3</scripRef>. Threatenings directed against others,
belong to us, if we be guilty of the same sins. Isaiah prophesied
not of them only, but of all other hypocrites, against whom that
@ -47216,7 +47216,7 @@ exalted state; it was therefore <i>made in secret. Blessed are they
that have not seen, and yet have believed.</i> Christ gave such
proofs of his resurrection as were <i>corroborated</i> by the
scriptures, and by the <i>word</i> which he had <i>spoken</i>
(<scripRef passage="Lu 24:6,7-44,Mk 16:7" id="Matt.xxix-p3.1">Luke xxiv. 6, 7-44; Mark
(<scripRef passage="Lu 24:6,7-44,Mk 16:7" id="Matt.xxix-p3.1" osisRef="Bible:Luke.24.6 Bible:Luke.24.7-Luke.24.44 Bible:Mark.16.7">Luke xxiv. 6, 7-44; Mark
xvi. 7</scripRef>); for here we must <i>walk by faith, not by
sight.</i> We have here,</p>
@ -127234,7 +127234,7 @@ an eye-witness (<scripRef passage="Joh 19:35" id="John.xx-p88.1" parsed="|John|1
matters of fact. (1.) What he bore record of he saw; he had it not
by hearsay, nor was it only his own conjecture, but he was an
eyewitness of it; it is <i>what we have seen and looked upon</i>
(<scripRef passage="1Jo 1:1,2Pe 1:16" id="John.xx-p89.1">1 John i. 1; 2 Pet. i.
(<scripRef passage="1Jo 1:1,2Pe 1:16" id="John.xx-p89.1" osisRef="Bible:1John.1.1 Bible:2Peter.1.16">1 John i. 1; 2 Pet. i.
16</scripRef>), and <i>had perfect understanding of,</i> <scripRef passage="Lu 1:3" id="John.xx-p89.2" parsed="|Luke|1|3|0|0" osisRef="Bible:Luke.1.3">Luke i. 3</scripRef>. (2.) What he saw he
faithfully bore record of; as a faithful witness, he told not only
the truth, but the whole truth; and did not only attest it by word

View File

@ -13040,7 +13040,7 @@ fortified by Herod the Great, and called <i>Cesarea</i> in honour
of Augustus C&#230;sar. It lay upon the sea-shore, very convenient for
the keeping up of a correspondence between Rome and its conquests
in those parts. The Roman governor or proconsul ordinarily resided
here, <scripRef passage="Ac 23:23,24,25:6" id="Acts.xi-p4.2"><i>ch.</i> xxiii. 23,
here, <scripRef passage="Ac 23:23,24,25:6" id="Acts.xi-p4.2" osisRef="Bible:Acts.23.23-Acts.23.24 Bible:Acts.25.6"><i>ch.</i> xxiii. 23,
24; xxv. 6</scripRef>. Here there was a band, or cohort, or
regiment, of the Roman army, which probably was the governor's
life-guard, and is here called <i>the Italian band,</i> because,
@ -13935,7 +13935,7 @@ cause. God never perverts judgment upon personal regards and
considerations, nor countenances a wicked man in a wicked thing for
the sake of his beauty, or stature, his country, parentage,
relations, wealth, or honour in the world. God, as a benefactor,
gives favours arbitrarily and by sovereignty (<scripRef passage="De 7:7,8,9:5,6,Mt 20:10" id="Acts.xi-p32.4">Deut. vii. 7, 8; ix. 5, 6; Matt. xx.
gives favours arbitrarily and by sovereignty (<scripRef passage="De 7:7,8,9:5,6,Mt 20:10" id="Acts.xi-p32.4" osisRef="Bible:Deut.7.7-Deut.7.8 Bible:Deut.9.5-Deut.9.6 Bible:Matt.20.10">Deut. vii. 7, 8; ix. 5, 6; Matt. xx.
10</scripRef>); but he does not, as a judge, so give sentence;
<i>but in every nation,</i> and under ever denomination, <i>he that
fears God and works righteousness is accepted of him,</i> <scripRef passage="Ac 10:35" id="Acts.xi-p32.5" parsed="|Acts|10|35|0|0" osisRef="Bible:Acts.10.35"><i>v.</i> 35</scripRef>. The case is plainly
@ -17679,7 +17679,7 @@ instead of justifying us it condemns us. Not by his remedial law,
for it was not possible that the <i>blood of bulls and goats should
take away sin,</i> should satisfy God's offended justice, or pacify
the sinner's wounded conscience. It was but a ritual and typical
institution. See <scripRef passage="Heb 9:9,10:1,4" id="Acts.xiv-p58.3">Heb. ix. 9; x.
institution. See <scripRef passage="Heb 9:9,10:1,4" id="Acts.xiv-p58.3" osisRef="Bible:Heb.9.9 Bible:Heb.10.1 Bible:Heb.10.4">Heb. ix. 9; x.
1, 4</scripRef>. 4. By Jesus Christ we obtain a complete
justification; for by him a complete atonement was made for sin. We
are justified, not only by him as our Judge, but by him as our
@ -87479,7 +87479,7 @@ fables and commands of men,</p>
<p class="indent" id="Tit.ii-p32">6. He gives the reasons of this, from the
liberty we have by the gospel from legal observances, and the evil
and mischief of a Jewish spirit under the Christian dispensation in
the <scripRef passage="Tit 15,16" id="Tit.ii-p32.1" parsed="|Titus|15|0|0|0;|Titus|16|0|0|0" osisRef="Bible:Titus.15 Bible:Titus.16">last two verses</scripRef>. To
the <scripRef passage="Tit 15,16" id="Tit.ii-p32.1" parsed="|Titus|15|0|0|0;|Titus|16|0|0|0" osisRef="Bible:Titus.1.15-Titus.1.16">last two verses</scripRef>. To
good Christians that are sound in the faith and thereby purified
<i>all things are pure.</i> Meats and drinks, and such things as
were forbidden under the law (the observances of which some still
@ -89956,7 +89956,7 @@ aught,</i> &amp;c., <scripRef passage="Phm 1:18,19" id="Phm.ii-p28.1" parsed="|P
Philemon: <i>If he hath wronged thee, or oweth thee aught.</i> It
is not an <i>if</i> of doubting, but of illation and concession;
<i>seeing he hath wronged thee,</i> and thereby has become indebted
to thee; such an <i>if</i> as <scripRef passage="Col 3:1,2Pe 2:4" id="Phm.ii-p29.1">Col. iii. 1 and 2 Pet. ii. 4</scripRef>, &amp;c.
to thee; such an <i>if</i> as <scripRef passage="Col 3:1,2Pe 2:4" id="Phm.ii-p29.1" osisRef="Bible:Col.3.1 Bible:2Peter.2.4">Col. iii. 1 and 2 Pet. ii. 4</scripRef>, &amp;c.
Observe, True penitents will be ingenuous in owning their faults,
as doubtless Onesimus had been to Paul, upon his being awakened and
being brought to repentance; and especially is this to be done in
@ -90121,7 +90121,7 @@ prison-doors. <i>The fervent effectual prayer of the righteous
availeth much.</i> [4.] Prayer of people for ministers, especially
when they are in distress and danger, is their great duty;
ministers need and request it. Paul, though an apostle, did so with
much earnestness, <scripRef passage="Ro 15;30;2Co 1:11;Eph 6:18,19;1Th 5:25" id="Phm.ii-p38.1" parsed="|Rom|15|0|0|0;|Rom|30|0|0|0;|2Cor|1|11|0|0;|Eph|6|18|6|19;|1Thess|5|25|0|0" osisRef="Bible:Rom.15 Bible:Rom.30 Bible:2Cor.1.11 Bible:Eph.6.18-Eph.6.19 Bible:1Thess.5.25">Rom. xv. 30; 2 Cor. i. 11;
much earnestness, <scripRef passage="Ro 15;30;2Co 1:11;Eph 6:18,19;1Th 5:25" id="Phm.ii-p38.1" parsed="|Rom|15|0|0|0;|Rom|30|0|0|0;|2Cor|1|11|0|0;|Eph|6|18|6|19;|1Thess|5|25|0|0" osisRef="Bible:Rom.15.30 Bible:2Cor.1.11 Bible:Eph.6.18-Eph.6.19 Bible:1Thess.5.25">Rom. xv. 30; 2 Cor. i. 11;
Eph. vi. 18, 19; 1 Thess. v. 25</scripRef>. The least may in this
way be helpful to the greatest. Yet, [5.] Though prayer obtains,
yet it does not merit the things obtained: they are God's gift, and
@ -96912,7 +96912,7 @@ torture, and would not accept of deliverance upon such vile terms;
and that which animated them thus to suffer was the hope they had
of <i>obtaining a better resurrection,</i> and deliverance upon
more honourable terms. This is thought to refer to that memorable
story, <scripRef id="Heb.xii-p90.2">2 Macc. <i>ch.</i> vii.</scripRef>, &amp;c. 2. They endured
story, 2 Macc. <i>ch.</i> vii., &amp;c. 2. They endured
<i>trials of cruel mockings and scourgings, and bonds and
imprisonment,</i> <scripRef passage="Heb 11:36" id="Heb.xii-p90.3" parsed="|Heb|11|36|0|0" osisRef="Bible:Heb.11.36"><i>v.</i>
36</scripRef>. They were persecuted in their reputation by
@ -113637,7 +113637,7 @@ this will always be so, till men have learnt to speak better than
God himself. (3.) We ought not to be offended if errors and
persecutions arise and prevail in the Christian church; this was
foretold, and therefore we should not think worse of Christ's
person, doctrine, or cross, when we see it fulfilled. See <scripRef passage="1Ti 4:1,2Ti 3:1,2Pe 3:3" id="Ju.ii-p29.2">1 Tim. iv. 1, and 2 Tim. iii. 1,
person, doctrine, or cross, when we see it fulfilled. See <scripRef passage="1Ti 4:1,2Ti 3:1,2Pe 3:3" id="Ju.ii-p29.2" osisRef="Bible:1Tim.4.1 Bible:2Tim.3.1 Bible:2Peter.3.3">1 Tim. iv. 1, and 2 Tim. iii. 1,
and 2 Pet. iii. 3</scripRef>. We must not think it strange, but
comfort ourselves with this, that in the midst of all this
confusion Christ will maintain his church, and make good his

View File

@ -1,18 +1,24 @@
import re
import string
import sys
from html.parser import HTMLParser
from pathlib import Path
import pythonbible as bible
from bs4 import BeautifulSoup
from loguru import logger
from tqdm import tqdm
base = Path('./Matthew Henry Commentary/xml').absolute()
base = Path('./Matthew Henry Commentary/xlm').absolute()
logger.remove(0)
logger.add('log.txt')
class MyHTMLParser(HTMLParser):
file = None
passage_verse = None
tag = None
tag_type = None
tag_type = None # 'start' or 'end'
attrs = dict()
# All the patterns are for re.sub(). This is specifically for getting
@ -24,11 +30,13 @@ class MyHTMLParser(HTMLParser):
(r"\[(\d+\.)\]", lambda x: f'\n{x.group(1)}~4'),
(r"\((\d+\.)\)", lambda x: f'\n{x.group(1)}~3'),
# These share the same id. The reason
# These share the same id. There are times were the two are a mixed
# within the parent lists.
(r"^\b(\d+\.)", lambda x: f'\n{x.group(1)}~2'),
(r"(\S\s)(\d+\.)(\s\b|\W)",
lambda x: f'{x.group(1)}\n{x.group(2)}~2{x.group(3)}'),
(r"(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})\.",
lambda x: f'\n{parser.roman_to_int(x.group())}.~1'),
]
@ -38,6 +46,8 @@ class MyHTMLParser(HTMLParser):
if number is None:
return 0
# Sometimes the roman numeral comes with a '.'. Striping to not cause
# issues
number = number.strip('.')
roman = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
@ -52,19 +62,24 @@ class MyHTMLParser(HTMLParser):
return total
def create_md_file(self, base_dir: Path, folder: str, file: str):
""" Create the path of the md file that will be written to as the
program process the xml file.
"""
md_file = Path(f'{base_dir}/{folder}/{file}.md').absolute()
md_file.parent.mkdir(parents=True, exist_ok=True)
md_file.unlink(missing_ok=True)
print(md_file.absolute())
# print(md_file.absolute())
self.file = md_file
return md_file
def write_to_file(self, data):
# if self.writeable is False:
# return
if self.file is None:
raise ValueError('No File specified')
# Here the list/sublist are searched for and altered for later
# processing in self.clean_file()
for pattern, sub in self.patterns:
# print(f'Running Pattern: {pattern}')
data = re.sub(pattern, sub, data)
@ -75,47 +90,64 @@ class MyHTMLParser(HTMLParser):
file.write(data)
def clean_file(self):
print(' CLEANING FILE')
logger.info(' CLEANING FILE')
if self.file is None:
raise ValueError('No File specified')
# Read all the lines
with open(self.file, 'r') as file:
lines = file.readlines()
indent = 0 # Current number of '\t' to add in front of the list number
sublist = dict() # Track the indent number based on the id.
with open(self.file, 'w') as file:
indent = 0
sublist = dict()
for line in lines:
if line.strip():
if line.startswith('#'):
line = f'\n{line}'
file.write('# Chapter Introduction\n\n')
header = None
for line in lines:
# Do not write blank lines
if not line.strip():
continue
# Main header, if a header has already been written skip it
if line.strip().startswith('# '):
if header == line.strip():
continue
header = line.strip()
# Add a `\n` if line is a heading.
if line.startswith('#'):
line = f'\n{line.strip()}'
# If line is not a list then add a `\n` after the paragraph,
# and reset the indent tracker
if line.strip()[0] not in string.digits:
line = f'{line}\n'
# print('resetting indent')
indent = 0
sublist.clear()
else:
# Get the list id
start = line.find('~')
end = start + 2
list_id = line[start:end]
if list_id not in sublist:
sublist[list_id] = indent
indent += 1
# print(f'{indent=}')
# print(f'{sublist=}')
indents = "\t" * sublist[list_id]
# Get the number of indents based on the list id, if it does
# not exist they set the value to the max value +1. If this
# is the first it will be set to 0 (-1 +1 = 0)
indents = "\t" * sublist.setdefault(
list_id, max(sublist.values(), default=-1)+1
)
line = f'{indents}{line.replace(list_id, "")}'
# line = f'{"\t" * sublist[list_id]}{line}'
# print(f'{sublist[list_id]=}, {list_id=}')
if line.startswith('Passage: '):
line = line.removeprefix('Passage: ')
file.write(line)
@staticmethod
def normalize_verses(verses):
def normalize_osis_verses(verses):
"""Takes this 'Bible:John.1.3 Bible:John.1.10 Bible:Eph.3.9 Bible:Col.1.16 Bible:Heb.1.2 Bible:Acts.17.24-Acts.17.25'
and turns it into somthing more readable"""
normalized_refs = list()
@ -123,17 +155,26 @@ class MyHTMLParser(HTMLParser):
spanned_verses = list()
for ref in chunks.split('-'):
verse = ref.replace('.', ' ', 1).replace('.', ':')
spanned_verses.append(verse)
normalized = bible.format_scripture_references(
bible.get_references(str(spanned_verses))
spanned_verses.append(
bible.format_scripture_references(
bible.get_references(verse.strip())
)
)
try:
normalized = bible.format_scripture_references(
bible.get_references('-'.join(spanned_verses))
)
except:
logger.warning(f"Error with: {verses=}: {spanned_verses=}")
raise
normalized_refs.append(normalized)
return ';'.join(normalized_refs)
@staticmethod
def obsidian_links(verses):
"""Take `Book Chapter:Ver-Ver and turn it into a obsidian bible link"""
links = []
for verse in verses.split(';'):
links.append(f"[[{verse.replace(':', '#').replace('-', '..')}]]")
@ -142,46 +183,79 @@ class MyHTMLParser(HTMLParser):
def process_tag(self, test=None):
match self.tag:
case 'b': # Bold
self.write_to_file('**')
case 'i': # Italics
self.write_to_file('*')
case 'scripcom':
# This saves the verse for the section.
if self.tag_type == 'start':
if self.attrs['type'] == 'Commentary':
self.passage_verse = self.attrs['osisref']
case 'h4': # this is the section header. Need to keep track of it per file.
if self.tag_type == 'start':
self.write_to_file('\n## ')
self.write_to_file('\n# ')
if self.tag_type == 'end':
self.write_to_file('\n')
#
if self.passage_verse:
try:
verse = bible.get_references(
self.normalize_osis_verses(
self.passage_verse)
)[0]
except:
logger.debug(self.passage_verse)
raise
self.write_to_file('## Verses: ')
self.write_to_file(
f'{verse.start_verse} - {verse.end_verse}'
)
self.write_to_file('\n\n')
case 'b':
self.write_to_file('**')
case 'i':
self.write_to_file('*')
case 'hr':
pass
case 'scripref': # Scripture ref
# get attr 'osisref' and parse [..., ('passage', 'Bible:Rev.14.6-Rev.14.7')]
# bible.format_scripture_references(bible.get_references(attrs['osisref']))
if self.tag_type == 'start':
verse_link = self.obsidian_links(
self.normalize_verses(self.attrs['osisref'])
if 'osisref' in self.attrs:
verses = self.normalize_osis_verses(
self.attrs['osisref']
)
self.write_to_file(verse_link)
case 'p':
else:
verses = self.normalize_osis_verses(
self.convert_passage(self.attrs['passage'])
)
self.write_to_file(self.obsidian_links(verses))
case 'p': # Paragraph
if self.tag_type == 'start':
if self.attrs.get('class', False) == 'passage':
# Need this do the regex in self.clean does not pick
# this up. Will be also cleaned in the same function.
self.write_to_file('Passage: ')
if self.tag_type == 'end':
self.write_to_file('\n\n')
# case 'html':
# if self.tag_type == 'end':
# self.clean_file()
case _:
# print(tag.upper())
pass
case 'li':
if self.tag_type == 'start':
self.write_to_file('- ')
else:
self.write_to_file('\n')
def handle_starttag(self, tag, attrs):
attrs = dict(attrs)
# print(f'Start: {tag}, {attrs}')
# Set taf trackers
self.tag_type = 'start'
self.tag = tag
self.attrs = attrs
self.process_tag(f'what what {tag}')
self.attrs = dict(attrs)
self.process_tag()
def handle_endtag(self, tag):
# print(f'End: {tag}')
@ -189,6 +263,7 @@ class MyHTMLParser(HTMLParser):
self.tag_type = 'end'
self.process_tag()
# Clear tag tracker
self.tag = None
self.tag_type = None
self.attrs.clear()
@ -208,52 +283,65 @@ class MyHTMLParser(HTMLParser):
self.write_to_file(data.replace('\n', ' '))
parser = MyHTMLParser()
soup = BeautifulSoup(Path('./vol_1.xml').read_text(), 'xml')
if __name__ == '__main__':
parser = MyHTMLParser()
# Clearing all scripRef of internal text. That way if it
# had other tags in it would not be processed
for i in soup.find_all('scripRef'):
i.clear()
# Process each volume file.
pbar = tqdm(total=1273)
for vol in sorted(Path('./').glob('*.xml')):
logger.info(vol)
soup = BeautifulSoup(vol.read_text(), 'xml')
# May need to add a loop to look in all <p class='passage> and
# unrap any scripref that is in them. the place Dan is getting confused
# with the book Daniel.
# ??????????
# for passage in soup.find_all('p', class='passage'):
# for ref in passafe.find_all('scripRef'):
# ref.unwrap()
# Get each book in the volume
# This will be the main folder for all the book's chapters
for book in soup.find_all('div1'):
logger.info(book['title'])
book_name = book['title'].replace('First', '1').replace('Second', '2').replace('Third', '3')
# for vol in Path('./').glob('*.xml'):
# soup = BeautifulSoup(vol.read_text(), 'xml')
# These are the chapters/files for each book folder
for chapter in book.find_all('div2'):
logger.info(chapter['title'])
for book in soup.find_all('div1')[2:3]:
# this is the folder for the books
print(book.attrs)
# These are the chapters/files for each folder
for chapter in book.find_all('div2')[:2]:
# for chapter in book.find_all('div2'):
print('\t', chapter.attrs)
filename = chapter['title']
# Remove Roman Numerals from file name
if 'CHAPTER' in filename.upper():
_, roman_num = chapter['title'].split(' ')
filename = f'Chapter {parser.roman_to_int(roman_num)}'
parser.create_md_file(base, book['title'], filename)
parser.create_md_file(base, book_name, filename)
pbar.set_description(f"Processing: {vol.name}: {book_name}: {filename}")
# Parse the text of the chapter
# May need to add a loop to look in all <p class='passage> and
# unrap any scripref that is in them. the place Dan is getting confused
# with the book Daniel.
for passage in chapter.find_all('p', {'class': 'passage'}):
# print(passage.text)
new_t = soup.new_tag('p', attrs=passage.attrs)
new_t.string = passage.text
passage.replace_with(new_t)
# Clearing all scripRef of internal text. That way if it
# had other tags in it would not be processed
for scripture in chapter.find_all('scripRef'):
scripture.clear()
# this is the text that needs parsing
for doc in chapter.children:
# for doc in chapter.find_all(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']):
# for doc in chapter.find_all('scripRef'):
# for doc in chapter.find_all('span'):
# sr = str(doc['osisRef'])
# passage = parser.normalize_verses(sr)
# print('\t\tPassage: ', passage)
# print('\t\tLink: ', parser.obsidian_links(passage))
# print('\t\tDATA: ', str(doc).strip())
try:
parser.feed(str(doc))
# pass
except Exception as e:
logger.exception(e)
logger.debug(chapter.attrs)
raise
parser.clean_file()
pbar.update(1)
# if pbar.last_print_n > 2:
# sys.exit()
pbar.close()
parser.close()