From work on PDF Nahum 1

This commit is contained in:
Henry Whitney 2019-01-22 14:59:30 -05:00
parent d2e755ed0c
commit d8f45184d2
23 changed files with 96 additions and 134 deletions

View File

@ -11,27 +11,38 @@ use Cwd ;
binmode(STDOUT, "encoding(UTF-8)");
say "not adapted for OT yet"; die;
my ($outputFiles, $topDir, $xmlFile, $txtFile, $lbsBk, $dataFile, $doFlag) = (
my ($outputFiles, $topDir, $xmlFile, $txtFile, $lbsBk, $dataFile, $xmlDir, $doFlag) = (
"/Users/Henry/Documents/git.Door43/en_tw/bible/",
"/Users/Henry/Documents/git.Door43/en_tw/bible",
"",
"/Users/Henry/Google Drive/WA/Test/data/ULB.NASB.Strongs.txt",
"",
"/Users/Henry/Google Drive/WA/Test/data/tW.work.dat"
"/Users/Henry/Google Drive/WA/Test/data/tW.work.OT.dat",
"/Users/Henry/Google Drive/WA/OSHB"
);
my ($missingLine, $bk, $ch, $vs, $ref, $url, $strong, $word, $flag, $putative, $tNid, $abbr);
my ($missingLine, $bk, $ch, $vs, $ref, $sn, $strong, $word, $flag, $tNid, $abbr, $xfAbr);
my (%bkAbr, %bkFull, %wa);
open LOG, ">:utf8", "/Users/Henry/Google Drive/WA/Test/out/mine.log.log" or die;
#open OUT, ">:utf8", $outputFile or die;
while (<DATA>) {
chomp;
if (/([^\t]*)\t([^\t]*)\t([^\t]*)/) {
$bkAbr{$1} = $2;
$bkFull{$2} = $1;
$wa{$1} = $3;
}
}
ParseLine();
FindURL();
#FindURL();
FindVerse($ref);
ChecktWPages($word);
Finish();
#ChecktWPages($word);
#Finish();
#close OUT;
close LOG;
@ -43,9 +54,8 @@ sub ParseLine {
chomp $missingLine; # Get rid of newline character at the end
exit 0 if ($missingLine eq ""); # If empty string, exit.
#$missingLine = "Mark 11:6 kt/command";
if ($missingLine =~ /^(([^:]*) (\d+):(\d+))\t([^\/]*\/([^\t]*))/) {
($ref, $bk, $ch, $vs, $url, $putative) = ($1, $2, $3, $4, $5, $6);
$outputFiles .= "${url}.md ";
if ($missingLine =~ /^(([^:]*) (\d+):(\d+))\t(\d+)/) {
($ref, $bk, $ch, $vs, $sn, $xfAbr) = ($1, $2, $3, $4, $5, $bkAbr{$1});
say LOG "\$bk: $bk";
open (my $file, "<:utf8", "$dataFile") or die "$dataFile:\n$!";
@ -57,18 +67,16 @@ sub ParseLine {
if ($fullBk eq $bk) {
say LOG "\$fullBk: |$fullBk|, \$bk: |$bk|";
$lbsBk = $abr;
if ($numBk =~ /(\d\d)-(...)/) {
$abbr = lc $2;
say LOG "\$abbr: $abbr";
my $mxl;
if ($bk eq "Psalms?") {$mxl = 3}
else {$mxl = 2}
while (length $ch < $mxl) {$ch =~ s/^/0/}
while (length $vs < $mxl) {$vs =~ s/^/0/}
}
$abbr = lc $numBk;
say LOG "\$abbr: $abbr";
my $mxl;
if ($bk eq "Psalms?") {$mxl = 3}
else {$mxl = 2}
while (length $ch < $mxl) {$ch =~ s/^/0/}
while (length $vs < $mxl) {$vs =~ s/^/0/}
$xmlFile = "/Users/Henry/Google Drive/WA/OSHB/${numBk}.xml";
say LOG "\$abbr/\$ch/\$vs: $abbr/$ch/$vs";
system `open -a /Applications/BBEdit.app /Users/Henry/Documents/git.Door43/en_tn/$abbr/$ch/$vs.md`;
system `open -a /Applications/BBEdit.app /Users/Henry/Documents/git.Door43/en_tn/$wa{$fullBk}/$ch/$vs.md`;
}
}
}
@ -78,58 +86,12 @@ sub ParseLine {
} else {
die "\n\tInput unreadable.\n"
}
say LOG "Looking for $putative in $xmlFile";
say LOG "\$missingLine: $missingLine, \$ref: $ref, \$bk: $bk, \$ch: $ch, \$vs: $vs, \$url: $url\n\n";
#say LOG "Looking for $sn in $xmlFile";
#say "Looking to open \$lbsBk\${ch}.\$vs: $lbsBk${ch}.$vs";
# say LOG "\$missingLine: $missingLine, \$ref: $ref, \$bk: $bk, \$ch: $ch, \$vs: $vs, \$url: $url\n\n";
#system `open -a /Applications/Logos.app "logosres:esv;ref=BibleESV.$lbsBk${ch}.$vs"`;
system `open -a /Applications/Logos.app "logos4:TextComparison;ref=BibleESV.$lbsBk${ch}.$vs;res=esv,niv2011,niv,nasb95,nrsv,gs-netbible,nlt,leb,kjv1900"
`;
system `open -a /Applications/Logos.app "logos4:TextComparison;ref=BibleESV.$lbsBk${ch}.$vs;res=esv,niv2011,niv,nasb95,nrsv,gs-netbible,nlt,leb,kjv1900"`;
}
sub FindURL {
my ($thisChap, $thisVers);
open (my $file, "<:utf8", "$xmlFile") or die "$xmlFile:\n$!";
while (my $line = <$file>) {
chomp $line;
if ($line =~ /\\mt (.*)$/) {
my $thisBook = $1;
if ($thisBook eq $bk) {
say LOG "\$thisBook: $thisBook\t\$bk: $bk";
$doFlag = 1;
} else {
say LOG "\nThe wrong book is being searched.\n"
}
} elsif ($doFlag && $line =~ /^\\c (\d+)$/) {
$thisChap = $1
} elsif ($doFlag && $line =~ /^\\v (\d+)$/) {
$thisVers = $1
} elsif ($doFlag && $thisChap == $ch && $thisVers == $vs) {
say LOG "$thisChap:$thisVers $line";
if ($line =~ /strong="([GH]....)(.).*$url/) {
say "\n\$line:\n$line\n";
$strong = $1;
my $test = $2;
if ($test ne "0") {die "\n\t\tStrong's number won't work.\n\n"}
unless ($strong =~ /^.+$/) {die "\nThe Strong's number <$strong> is not found.\n"}
while ($strong =~ s/([GH])0/$1/) {}
if ($strong =~ /^.+$/) {
say "\033[0;1;31m$strong\033[m\n";
last
}
} elsif ($line =~ /\\k-s[^\n]*$url/) {
say "\n\t$url is part of a phrase\n";
$flag = 1;
}
} elsif ($line =~ /\\mt (.*)$/) {
$doFlag = 0
}
}
close $file;
}
sub FindVerse {
@ -162,43 +124,43 @@ sub FindVerse {
return $word;
}
sub ChecktWPages{
say LOG "<<$word>>";
die "\n\$word is empty.\n" if $word eq "";
my $topDir = "/Users/Henry/Documents/git.Door43/en_tw/bible";
my @filesToRun = ();
my $filePattern = '*.md' ;
find( sub { push @filesToRun, $File::Find::name if ( m/^(.*)$filePattern$/ ) }, $topDir) ;
foreach my $file ( @filesToRun ) {
my $fileText = read_file("$file", binmode => 'utf8');
# While finds entries and Strong's numbers
while ($fileText =~ /($strong)[^\d]|^(# [^\n]*\b$word\b)/g) {
#system `clear`;
my $abb = $file;
$abb =~ s/.md$//;
say "\033[0;1;31m$abb\033[m";
$outputFiles .= "$file "
}
}
}
sub Finish {
say "\nLooking for $strong.";
# find $topDir -name "*.md" -exec grep -H '($strong[^\d]|$strong$)' {} +
system ("find $topDir -name \"*.md\" -exec grep -H --color \"$strong\[, \\n\\r\]\" {} \\;");
system ("find $topDir -name \"*.md\" -exec grep -H --color \"$strong\$\" {} \\;");
#system ("find $topDir -name \"*.md\" -exec grep -H --color \"\($strong\[, \\n\\r\]\|$strong\$\)\" {} \\;");
say "\nLooking for $putative.";
#system ("find $topDir -name \"*.md\" -exec grep -Hi --color \"^# $putative\[^A-Za-z\]\" {} \\;");
#system ("find $topDir -name \"*.md\" -exec grep -Hi --color \"^# .*\[^A-Za-z\]$putative\[^A-Za-z\]\" {} \\;");
system ("find $topDir -name \"*.md\" -exec egrep -Hi --color \"^# (.*\[^A-Za-z\])?$putative\[^A-Za-z\]\" {} \\;");
say "\nLooking for $word.";
#system ("find $topDir -name \"*.md\" -exec grep -Hi --color \"^#$word\[^A-Za-z\]\" {} \\;");
#system ("find $topDir -name \"*.md\" -exec grep -Hi --color \"^# .*\[^A-Za-z\]$word\[^A-Za-z\]\" {} \\;");
system ("find $topDir -name \"*.md\" -exec egrep -Hi --color \"^# (.*\[^A-Za-z\])?$word\[^A-Za-z\]\" {} \\;");
say "Opening .md files.";
system `open -a /Applications/Firefox.app https://www.blueletterbible.org/lang/lexicon/lexicon.cfm?strongs=$strong`;
system `open -a /Applications/BBEdit.app $outputFiles`;
}
__DATA__
1 Chronicles 1Chr 1ch
1 Kings 1Kgs 1ki
1 Samuel 1Sam 1sa
2 Chronicles 2Chr 2ch
2 Kings 2Kgs 2ki
2 Samuel 2Sam 2sa
Amos Amos amo
Daniel Dan dan
Deuteronomy Deut deu
Ecclesiastes Eccl ecc
Esther Esth est
Exodus Exod exo
Ezekiel Ezek ezk
Ezra Ezra ezr
Genesis Gen gen
Habakkuk Hab hab
Haggai Hag hag
Hosea Hos hos
Isaiah Isa isa
Jeremiah Jer jer
Job Job job
Joel Joel jol
Jonah Jonah jon
Joshua Josh jos
Judges Judg jdg
Lamentations Lam lam
Leviticus Lev lev
Malachi Mal mal
Micah Mic mic
Nahum Nah nam
Nehemiah Neh neh
Numbers Num num
Obadiah Obad oba
Proverbs Prov pro
Psalms Ps psa
Ruth Ruth rut
Song of Songs Song sng
Zechariah Zech zec
Zephaniah Zeph zep

View File

@ -1,4 +1,4 @@
# appoint, appoints, appointed, appointed by lot, appointment, desired, directed, selected, reserved, set ... over, set in place, determined, ordained #
# appoint, appoints, appointed, appointed by lot, appointment, desired, directed, selected, reserved, set ... over, set in place, determined, ordained, prepare #
## Definition: ##

View File

@ -44,4 +44,4 @@ The terms "call to" and "call out" mean to say something loudly to someone who i
## Word Data: ##
* Strong's: H559, H2199, H4744, H6817, H7121, H7123, H7769, H7773, G154, G1528, G1941, G1951, G2028, G2046, G2564, G2821, G2822, G2840, G2919, G3004, G3106, G3333, G3343, G3603, G3686, G3687, G3870, G4341, G4377, G4779, G4867, G5455, G5537, G5581
* Strong's: H2199, H4744, H6817, H7121, H7123, H7769, H7773, G154, G1528, G1941, G1951, G2028, G2046, G2564, G2821, G2822, G2840, G2919, G3004, G3106, G3333, G3343, G3603, G3686, G3687, G3870, G4341, G4377, G4779, G4867, G5455, G5537, G5581

View File

@ -29,4 +29,4 @@ The term to "command" means to order someone to do something. A "command" or "co
## Word Data: ##
* Strong's: H559, H560, H565, H1696, H1697, H1881, H2706, H2708, H2710, H2942, H2951, H3027, H3982, H3983, H4406, H4687, H4929, H4931, H5713, H5749, H6310, H6346, H6490, H6673, H6680, H7101, H7218, H7227, H7262, H7970, H8269, G1263, G1291, G1296, G1297, G1299, G1690, G1778, G1781, G1785, G2003, G2004, G2008, G2036, G2753, G3056, G3143, G3726, G3852, G3853, G4367, G4487, G5506
* Strong's: H560, H565, H1696, H1697, H1881, H2706, H2708, H2710, H2942, H2951, H3027, H3982, H3983, H4406, H4687, H4929, H4931, H5713, H5749, H6310, H6346, H6490, H6673, H6680, H7101, H7218, H7227, H7262, H7970, H8269, G1263, G1291, G1296, G1297, G1299, G1690, G1778, G1781, G1785, G2003, G2004, G2008, G2036, G2753, G3056, G3143, G3726, G3852, G3853, G4367, G4487, G5506

View File

@ -37,4 +37,4 @@ The terms "pray" and "prayer" refer to talking with God. These terms are used to
## Word Data: ##
* Strong's: H559, H577, H1156, H2470, H3908, H4994, H6279, H6293, H6419, H6739, H7592, H7879, H8034, H8605, G154, G1162, G1189, G1783, G2065, G2171, G2172, G3870, G4335, G4336
* Strong's: H577, H1156, H2470, H3908, H4994, H6279, H6293, H6419, H6739, H7592, H7879, H8034, H8605, G154, G1162, G1189, G1783, G2065, G2171, G2172, G3870, G4335, G4336

View File

@ -35,4 +35,4 @@ A promise is a pledge to do a certain thing. When someone promises something, it
## Word Data: ##
* Strong's: H559, H562, H1696, G1860, G1861, G1862, G3670, G4279
* Strong's: H562, H1696, G1860, G1861, G1862, G3670, G4279

View File

@ -31,4 +31,4 @@ The term "world" usually refers to the part of the universe where people live: t
## Word Data: ##
* Strong's: H776, H2309, H2465, H5769, H8398, G165, G1093, G2886, G2889, G3625
* Strong's: H776, H2309, H2465, H2717, H5769, H8398, G165, G1093, G2886, G2889, G3625

View File

@ -1,4 +1,4 @@
# Mount Hermon #
# Hermon, Mount Hermon #
## Facts: ##
@ -22,4 +22,4 @@ Mount Hermon is the name of the tallest mountain in Israel at the southern tip o
## Word Data: ##
* Strong's: H2022, H2768, H2769, H8149
* Strong's: H2768, H2769, H8149

View File

@ -24,4 +24,4 @@ The Mount of Olives is a mountain or large hill located near the east side of th
## Word Data: ##
* Strong's: H2022, H2132, G3735, G1636
* Strong's: H2132, G3735, G1636

View File

@ -27,4 +27,4 @@ Mount Sinai is a mountain that was probably located in the southern part of what
## Word Data: ##
* Strong's: H2022, H5514, G3735, G4614
* Strong's: H5514, G3735, G4614

View File

@ -21,4 +21,4 @@ To be "barren" means to not be fertile or fruitful.
## Word Data: ##
* Strong's: H4420, H6115, H6135, H6723, H7921, G692, G4723
* Strong's: H2717, H3001, H4420, H6115, H6135, H6723, H7921, G692, G4723

View File

@ -26,4 +26,4 @@ The term "census" refers to a formal counting of the number of people in a natio
## Word Data: ##
* Strong's: H3789, H5674, H5921, H6485, H7218, G582, G583
* Strong's: H3789, H5674, H6485, H7218, G582, G583

View File

@ -22,4 +22,4 @@ The terms "confirm" and "confirmation" refer to stating or assuring that somethi
## Word Data: ##
* Strong's: H559, H1396, H3045, H3559, H4390, H4672, H5414, H5975, H6213, H6965, G950, G951, G3315, G4972
* Strong's: H1396, H3045, H3559, H4390, H4672, H5414, H5975, H6213, H6965, G950, G951, G3315, G4972

View File

@ -1,4 +1,4 @@
# cut off, cut ... off, cuts ... off, cutting ... off, cut ... out of #
# cut off, cut ... off, cuts ... off, cutting ... off, cut ... out of, sheared #
## Definition: ##

View File

@ -26,4 +26,4 @@ The terms "declare" and "declaration" refer to making a formal or public stateme
## Word Data: ##
* Strong's: H262, H559, H816, H874, H1319, H1696, H1697, H2199, H3045, H3745, H4161, H4853, H5002, H5042, H5046, H5608, H6567, H6963, H7121, H7150, H7440, H7561, H7878, H8085, G312, G518, G591, G669, G1229, G1344, G1555, G1718, G1861, G2097, G2511, G2605, G2607, G2782, G2784, G2980, G3004, G3140, G3142, G3670, G3724, G3822, G3870, G3955, G4135, G5335
* Strong's: H262, H816, H874, H1319, H1696, H1697, H2199, H3045, H3745, H4161, H4853, H5002, H5042, H5046, H5608, H6567, H6963, H7121, H7150, H7440, H7561, H7878, H8085, G312, G518, G591, G669, G1229, G1344, G1555, G1718, G1861, G2097, G2511, G2605, G2607, G2782, G2784, G2980, G3004, G3140, G3142, G3670, G3724, G3822, G3870, G3955, G4135, G5335

View File

@ -23,4 +23,4 @@ A decree is a proclamation or law that is publicly declared to all the people.
## Word Data: ##
* Strong's: H559, H633, H1697, H5715, H1504, H1510, H1881, H1882, H1696, H2706, H2708, H2710, H2711, H2782, H2852, H2941, H2942, H3791, H3983, H4055, H4406, H4687, H5407, H5713, H6599, H6600, H6680, H7010, H7761, H8421, G1378
* Strong's: H633, H1697, H5715, H1504, H1510, H1881, H1882, H1696, H2706, H2708, H2710, H2711, H2782, H2852, H2941, H2942, H3791, H3983, H4055, H4406, H4687, H5407, H5713, H6599, H6600, H6680, H7010, H7761, H8421, G1378

View File

@ -1,4 +1,4 @@
# destroy, destroys, destroyed, destroyer, destroyers, destroying, destruction, be destroyed, wasting away #
# destroy, destroys, destroyed, destroyer, destroyers, destroying, destruction, be destroyed, pass away, wasting away #
## Definition: ##

View File

@ -1,4 +1,4 @@
# endure, endures, endured, enduring, endurance, patient endurance, put up with #
# endure, endures, endured, enduring, endurance, patient endurance, put up with, resist #
## Definition: ##
@ -30,4 +30,4 @@ The term "endure" means to last a long time or to bear something difficult with
## Word Data: ##
* Strong's: H386, H3201, H3557, H5331, H5375, H5975, G430, G907, G1526, G2005, G2076, G2594, G3306, G4722, G5278, G5281, G5297, G5342
* Strong's: H386, H3201, H3557, H5331, H5375, H5975, H6965, G430, G907, G1526, G2005, G2076, G2594, G3306, G4722, G5278, G5281, G5297, G5342

View File

@ -24,4 +24,4 @@ The terms "instruct" and "instruction" refer to giving specific directions about
## Word Data: ##
* Strong's: H241, H559, H631, H1696, H1697, H3256, H3289, H3384, H3948, H4148, H4156, H4687, H4931, H4941, H6098, H6310, H6490, H6680, H7919, H8451, G1256, G1291, G1299, G1319, G1321, G1378, G1781, G1785, G2727, G2753, G3559, G3560, G3807, G3810, G3811, G3852, G3853, G4264, G4367, G4822, G4929
* Strong's: H241, H631, H1696, H1697, H3256, H3289, H3384, H3948, H4148, H4156, H4687, H4931, H4941, H6098, H6310, H6490, H6680, H7919, H8451, G1256, G1291, G1299, G1319, G1321, G1378, G1781, G1785, G2727, G2753, G3559, G3560, G3807, G3810, G3811, G3852, G3853, G4264, G4367, G4822, G4929

View File

@ -10,7 +10,7 @@ This main meaning of "run" is also used in figurative expressions such as the fo
* To "run after other gods" means to persist in worshiping other gods.
* "I run to you to hide me" means to quickly turn to God for refuge and safety when faced with difficult things.
* Water and other liquids such as tears, blood, sweat, and rivers are said to "run." This could also be translated as, "flow."
The border of a country or region is said to "run along" a river or the border of a different country. This could be translated by saying that the countrys border "is next to" the river or other country or by saying that the country "borders" the river or other country."
* The border of a country or region is said to "run along" a river or the border of a different country. This could be translated by saying that the countrys border "is next to" the river or other country or by saying that the country "borders" the river or other country."
* Rivers and streams can "run dry," which means that they no longer have water in them. This could be translated as "have dried up" or "have become dry."
* The days of a feast can "run their course," which means they "have passed by" or "are finished" or "are over."*

View File

@ -1,4 +1,4 @@
# send, sends, sent, sending, send out, sends out, sent out, sending out, dismissed, send ... away #
# send, sends, sent, sending, send out, sends out, sent out, sending out, dismissed, send ... away, come out #
## Definition: ##

View File

@ -1,4 +1,4 @@
# tremble, trembles, trembled, trembling, staggering, shook #
# tremble, trembles, trembled, trembling, staggering, shake, shook #
## Definition: ##

View File

@ -1,4 +1,4 @@
# waste, wastes, wasted, wasting, wasteland, wastelands, becomes weak, devastates, laid waste #
# waste, wastes, wasted, wasting, wasteland, wastelands, become weak, becomes weak, devastates, laid waste #
## Definition: ##