From c0d77e93198e92cae1ad544254682b964eaedbab Mon Sep 17 00:00:00 2001 From: Henry Whitney Date: Mon, 24 Jun 2019 17:48:40 -0400 Subject: [PATCH] PDF Mat 10 --- .../Exceptions/Consistent_Deletes.NT.txt | 6 +++ .../Exceptions_tWs_from_MAST_NT.txt | 41 ++++++++++--------- .../FilesForUpdates/Logs/mine_log.log | 32 +++++++-------- .../Output/Entries_not_handled.txt | 16 -------- .../FilesForUpdates/Temp/Workdata.tmp | 2 +- .../FilesForUpdates/Temp/mine_results.html | 16 ++++---- .../FilesForUpdates/strongs.sh | 4 +- .../FilesForUpdates/tWs.from.MAST_HB.2.pl | 36 ++++++++++------ .../FilesForUpdates/tWs.from.MAST_NT.1.pl | 31 ++++++++++---- 9 files changed, 102 insertions(+), 82 deletions(-) diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Consistent_Deletes.NT.txt b/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Consistent_Deletes.NT.txt index 99f195f..1222b3c 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Consistent_Deletes.NT.txt +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Consistent_Deletes.NT.txt @@ -75,4 +75,10 @@ 4138 1427 1093 +2932 +5475 +3306 +5055 +4098 +3565 diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Exceptions_tWs_from_MAST_NT.txt b/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Exceptions_tWs_from_MAST_NT.txt index 25435f5..71af7ac 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Exceptions_tWs_from_MAST_NT.txt +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Exceptions_tWs_from_MAST_NT.txt @@ -622,7 +622,7 @@ Matthew 10:2 2532 || Matthew 10:3 2532 || Matthew 10:4 2581 Simon the Zealot Matthew 10:4 2532 || -Matthew 10:4 2469 +Matthew 10:4 2469 || Matthew 10:5 1427 || Matthew 10:5 3004 || Matthew 10:5 2532 || @@ -632,26 +632,23 @@ Matthew 10:7 3004 || Matthew 10:7 1448 || Matthew 10:7 3772 || Matthew 10:8 1325 || -Matthew 10:9 2932 -Matthew 10:9 5475 +Matthew 10:9 2932 || +Matthew 10:9 5475 || Matthew 10:11 4172 || Matthew 10:11 1525 || -Matthew 10:11 3306 +Matthew 10:11 3306 || Matthew 10:12 1525 || -Matthew 10:12 782 Matthew 10:13 2532 || Matthew 10:13 3303 || Matthew 10:14 2532 || Matthew 10:14 1854 || Matthew 10:14 4172 || -Matthew 10:14 2868 Matthew 10:14 4228 || Matthew 10:15 3004 || Matthew 10:15 2532 || Matthew 10:15 4172 || Matthew 10:16 1096 || Matthew 10:16 2532 || -Matthew 10:16 185 Matthew 10:17 444 || Matthew 10:17 2532 || Matthew 10:18 2532 || @@ -663,11 +660,10 @@ Matthew 10:22 2532 || Matthew 10:23 4172 || Matthew 10:23 2087 || Matthew 10:23 3004 || -Matthew 10:23 5055 +Matthew 10:23 5055 || Matthew 10:23 444 || Matthew 10:25 1096 || Matthew 10:25 2532 || -Matthew 10:25 3617 Matthew 10:26 3762 || Matthew 10:26 2572 || Matthew 10:26 2532 || @@ -675,15 +671,14 @@ Matthew 10:27 2036 || Matthew 10:27 2532 || Matthew 10:28 2532 || Matthew 10:29 2532 || -Matthew 10:29 4098 +Matthew 10:29 4098 || Matthew 10:30 2532 || Matthew 10:31 4183 || Matthew 10:32 444 || -Matthew 10:33 720 Matthew 10:33 444 || Matthew 10:35 444 || Matthew 10:35 2532 || -Matthew 10:35 3565 +Matthew 10:35 3565 || Matthew 10:36 2532 || Matthew 10:36 444 || Matthew 10:37 2532 || @@ -749,7 +744,7 @@ Matthew 11:22 3004 || Matthew 11:22 2532 || Matthew 11:23 2532 || Matthew 11:23 1096 || -Matthew 11:23 3306 +Matthew 11:23 3306 || Matthew 11:24 3004 || Matthew 11:25 2036 || Matthew 11:25 1843 @@ -1166,7 +1161,7 @@ Matthew 15:12 4624 Matthew 15:13 2036 || Matthew 15:13 3770 || Matthew 15:14 863 || -Matthew 15:14 4098 +Matthew 15:14 4098 || Matthew 15:15 2036 || Matthew 15:16 2036 || Matthew 15:16 2532 || @@ -1195,7 +1190,7 @@ Matthew 15:27 2036 || Matthew 15:27 3483 || Matthew 15:27 2532 || Matthew 15:27 2068 || -Matthew 15:27 4098 +Matthew 15:27 4098 || Matthew 15:28 5119 || Matthew 15:28 2036 || Matthew 15:28 3173 || @@ -1363,7 +1358,7 @@ Matthew 17:15 2532 || Matthew 17:15 3004 || Matthew 17:15 2560 Matthew 17:15 4178 -Matthew 17:15 4098 +Matthew 17:15 4098 || Matthew 17:16 2532 || Matthew 17:17 2036 || Matthew 17:17 2532 || @@ -1385,7 +1380,7 @@ Matthew 17:23 3076 Matthew 17:24 2983 || Matthew 17:24 2532 || Matthew 17:24 2036 || -Matthew 17:24 5055 +Matthew 17:24 5055 || Matthew 17:25 3004 || Matthew 17:25 3483 || Matthew 17:25 2532 || @@ -1795,7 +1790,7 @@ Matthew 21:43 2316 || Matthew 21:43 2532 || Matthew 21:43 1325 || Matthew 21:44 2532 || -Matthew 21:44 4098 +Matthew 21:44 4098 || Matthew 21:45 2532 || Matthew 21:45 1097 Matthew 21:45 3004 || @@ -2028,7 +2023,7 @@ Matthew 24:27 2532 || Matthew 24:27 444 || Matthew 24:29 2532 || Matthew 24:29 1325 || -Matthew 24:29 4098 +Matthew 24:29 4098 || Matthew 24:30 2532 || Matthew 24:30 5119 || Matthew 24:30 3708 || @@ -2287,7 +2282,7 @@ Matthew 26:37 757 || Matthew 26:37 3076 Matthew 26:38 5119 || Matthew 26:38 3004 || -Matthew 26:38 3306 +Matthew 26:38 3306 || Matthew 26:38 2532 || Matthew 26:39 2532 || Matthew 26:39 3004 || @@ -2626,6 +2621,12 @@ Matthew 28:20 2250 + + + + + + diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Logs/mine_log.log b/MAST_tW_PDF_Updater/FilesForUpdates/Logs/mine_log.log index 1fea4f9..4aa4d98 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Logs/mine_log.log +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Logs/mine_log.log @@ -1,20 +1,20 @@ ParseLine $book_name: Matthew, $bkno{Matthew}: 41 $exceptions_file: /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Exceptions/Exceptions_tWs_from_MAST_NT.txt -$blbRef: https://www.blueletterbible.org/net/mat/9/25 +$blbRef: https://www.blueletterbible.org/net/mat/10/35 xxx -$missingLine: Matthew 9:25 1453, $ref: Matthew 9:25, $book_name: Matthew, $ch: 9, $vs: 25 +$missingLine: Matthew 10:35 3565, $ref: Matthew 10:35, $book_name: Matthew, $ch: 10, $vs: 35 $dataFile: /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/User/tW_work_NT.txt $line: 41 Matthew mat Mt $fullBk: Matthew, $wabbr: mat, $numBk: Mt, $abr: Mt, $lbsBk: Mt $fullBk: |Matthew|, $wa{Matthew}: ||, $numBk: Mt, $abr: Mt, $book_name: |Matthew|, $lbsBk: Mt -logos4:TextComparison;ref=BibleNIV.Mt9.25;res=esv,niv2011,niv,nasb95,nrsv,gs-netbible,nlt,leb,kjv1900 +logos4:TextComparison;ref=BibleNIV.Mt10.35;res=esv,niv2011,niv,nasb95,nrsv,gs-netbible,nlt,leb,kjv1900 $abbr: mt -$wa{Matthew}/$ch/$vs: mat/09/25 +$wa{Matthew}/$ch/$vs: mat/10/35 To system: -open -a /Applications/BBEdit.app /Users/Henry/Documents/git.Door43/en_tn/mat/09/25.md +open -a /Applications/BBEdit.app /Users/Henry/Documents/git.Door43/en_tn/mat/10/35.md $line: 42 Mark mrk Mk $fullBk: Mark, $wabbr: mrk, $numBk: Mk, $abr: Mk, $lbsBk: Mk @@ -68,17 +68,17 @@ $line: 66 Jude jud Jud $fullBk: Jude, $wabbr: jud, $numBk: Jud, $abr: Jud, $lbsBk: Jud $line: 67 Revelation rev Re $fullBk: Revelation, $wabbr: rev, $numBk: Re, $abr: Re, $lbsBk: Re -FindVerse |G1453|. -$ref: Matthew 9:25 -$fore: When the crowd had been put outside, he entered the room and took her by the hand, and the girl got up. +FindVerse |G3565|. +$ref: Matthew 10:35 +$fore: For I came to set a man against his father, and a daughter against her mother, and a daughter-in-law against her mother-in-law. -But when the crowd had been put out, He entered and took her by the hand ; and the girl arose . +"For I came to set a man against his father , and a daughter against her mother , and a daughter-in-law against her mother-in-law ; $precon: -But when the crowd had been put out, He entered and took her by the hand ; and the girl arose < -$aft: >. -$thisULB: When the crowd had been put outside, he entered the room and took her by the hand, and the girl got up. +"For I came to set a man against his father , and a daughter against her mother , and a daughter-in-law < +$aft: > against her mother-in-law ; +$thisULB: For I came to set a man against his father, and a daughter against her mother, and a daughter-in-law against her mother-in-law. -$&: But when the crowd had been put out, He entered and took her by the hand ; and the girl arose < -$preprecon: But when the crowd had been put out, He entered and took her by the hand ; and the girl -$word: arose -<> +$&: "For I came to set a man against his father , and a daughter against her mother , and a daughter-in-law < +$preprecon: "For I came to set a man against his father , and a daughter against her mother , and a +$word: daughter-in-law +<> diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Output/Entries_not_handled.txt b/MAST_tW_PDF_Updater/FilesForUpdates/Output/Entries_not_handled.txt index ae18860..5a90869 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Output/Entries_not_handled.txt +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Output/Entries_not_handled.txt @@ -1,19 +1,3 @@ -Matthew 3:3 994[calling -Matthew 3:3 out] -Matthew 3:12 2618[burn.*up] -Matthew 7:3 2657[take -Matthew 7:3 notice] -Matthew 7:21 2307[will -Matthew 7:21 of -Matthew 7:21 my -Matthew 7:21 Father] -Matthew 8:31 1544[cast.*out] -Matthew 8:31 649[send.*away] -Matthew 9:25 1453[got -Matthew 9:25 up] -Matthew 10:4 2581[Simon -Matthew 10:4 the -Matthew 10:4 Zealot] Matthew 10:4 2469 Matthew 10:9 2932 Matthew 10:9 5475 diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Workdata.tmp b/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Workdata.tmp index 1ec35ac..a9f4495 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Workdata.tmp +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Workdata.tmp @@ -1 +1 @@ -Matthew 9:26 1093 +Matthew 10:35 3565 diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Temp/mine_results.html b/MAST_tW_PDF_Updater/FilesForUpdates/Temp/mine_results.html index 652628d..fbf48ec 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Temp/mine_results.html +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Temp/mine_results.html @@ -5,23 +5,25 @@ -

Matthew 9:25 When the crowd had been put outside, he entered the room and took her by the hand, and the girl got up. +

Matthew 10:35 For I came to set a man against his father, and a daughter against her mother, and a daughter-in-law against her mother-in-law.

-

But when <G3753> the crowd <G3793> had been put <G1544b> out, He entered <G1525> and took <G2902> her by the hand <G5495>; and the girl <G2877> arose <G1453>.

+

"For I came <G2064> to set <G1369> a man <G444> against <G2596> his father <G3962>, and a daughter <G2364> against <G2596> her mother <G3384>, and a daughter-in-law <G3565> against <G2596> her mother-in-law <G3994>;

-/Users/Henry/Documents/git.Door43/en_tw/bible/other/raise
+/Users/Henry/Documents/git.Door43/en_tw/bible/other/bride
-/Users/Henry/Documents/git.Door43/en_tw/bible/other/raise
+/Users/Henry/Documents/git.Door43/en_tw/bible/kt/lawofmoses

-/Users/Henry/Documents/git.Door43/en_tw/bible/other/raise: * Strong's: H1804, H2210, H2224, H5375, H5549, H5782, H5927, H5975, H6965, H6966, H6974, H7613, G305, G386, G393, G450, G1096, G1326, G1453, G1525, G1817, G1825, G1892, G1999, G4891, G5312
+/Users/Henry/Documents/git.Door43/en_tw/bible/other/bride: * Strong's: H3618, G3565 +
+ +/Users/Henry/Documents/git.Door43/en_tw/bible/kt/lawofmoses: * Strong's: H430, H1881, H1882, H2706, H3068, H4687, H4872, H4941, H8451, G2316, G3544, G3551, G3565 +

-/Users/Henry/Documents/git.Door43/en_tw/bible/other/raise: raise, raises, raising, raising up, raised, rise, risen, arise, arisen, arises, rose, arose, get up, got up, stir ... up, stirs ... up, stirring up, stirred up, rises, rising, appear, stood up, stand up, gets up, awake, awaken, awakened, woke ... up, brought up, come up, lift ... up, stirs up
-

diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/strongs.sh b/MAST_tW_PDF_Updater/FilesForUpdates/strongs.sh index c1cd18c..bbc9b94 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/strongs.sh +++ b/MAST_tW_PDF_Updater/FilesForUpdates/strongs.sh @@ -1,4 +1,4 @@ -curl https://biblehub.com/greek/1453.htm > /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Strongs.html +curl https://biblehub.com/greek/3565.htm > /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Strongs.html perl get_strongs_gist.pl open -a /Applications/Firefox.app --new-window /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/This_interlinear.html /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/Strongs.html /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/This_verse.html /Users/Henry/Documents/git.Door43/Tips_and_Hacks/MAST_tW_PDF_Updater/FilesForUpdates/Temp/mine_results.html & -open -a /Applications/BBEdit.app --new-window /Users/Henry/Documents/git.Door43/en_tn/mat/09/25.md & +open -a /Applications/BBEdit.app --new-window /Users/Henry/Documents/git.Door43/en_tn/mat/10/35.md & diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_HB.2.pl b/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_HB.2.pl index 0b3db88..3b71395 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_HB.2.pl +++ b/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_HB.2.pl @@ -188,7 +188,6 @@ sub PairtWEntriesTotWPageAndUniqSNs { print "."; $file =~ s/\//\\/g unless $^O eq "linux" || $^O eq "darwin"; my ($thisList, $shortFile) = ("", $file); - #say "|$shortFile|\t|$topTwDir|"; $shortFile =~ s/^\Q$topTwDir${d}\E//; $shortFile =~ s/\.md$//; $shortFile =~ s/\Q$d\E/,/; @@ -228,9 +227,6 @@ sub PairtWEntriesTotWPageAndUniqSNs { } } close IN; - - #} - #say LOG "|$shortFile|: \t |$entriesThisPage{$shortFile}|" } say ""; #say LOG "===="; @@ -242,7 +238,6 @@ sub LinkULBtoCV { say LOG "LinkULBtoCV, \$ULBfile: $ULBfile"; open IN, "$ULBfile" or die "$ULBfile: $!"; while () { - #say LOG $_; if (/^([^\t]*)\t(.*)$/) { $cv ++; ($text{$1}, $fullText{$1}) = ($2, $2); @@ -252,9 +247,9 @@ sub LinkULBtoCV { #say LOG "First \$ref{$cv}: $ref{$cv}\n\$text{$ref{$cv}}: $text{$ref{$cv}}"; } close IN; - foreach my $key (sort keys %ref) { + #foreach my $key (sort keys %ref) { #say LOG "\$key: $key:, \$ref{$key}: $ref{$key}, \$text{$ref{$key}}: $text{$ref{$key}}" - } + #} } sub ReadLinkedSNs { @@ -315,11 +310,11 @@ sub LinkSNsToULBtextViaEntries { my (@allEntries); $listOfPages{$thisCV} = ""; #say LOG "\$SNsInCV{$thisCV}: |$SNsInCV{$thisCV}|\n$text{$thisCV}"; - say LOG "\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<\n\$text{$thisCV}: $text{$thisCV}"; + #say LOG "\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<\n\$text{$thisCV}: $text{$thisCV}"; $SNsInCV{$thisCV} =~ s/^ +//; $SNsInCV{$thisCV} =~ s/ +$//; $SNsInCV{$thisCV} =~ s/ {2,}/ /g; - say LOG "*\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<"; + #say LOG "*\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<"; if (exists $specifiedText{$thisCV}) { #say LOG "*\t\$SNsInCV{$thisCV}: $SNsInCV{$thisCV}"; @@ -330,13 +325,30 @@ sub LinkSNsToULBtextViaEntries { say LOG "**\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<"; } #say LOG "<>\t<>\t\$SNsInCV{$thisCV}: |$SNsInCV{$thisCV}|"; + $SNsInCV{$thisCV} =~ s/ \.\.\. /.*?/g; + say LOG "1\t\$SNsInCV{$thisCV}:$SNsInCV{$thisCV}"; + while ($SNsInCV{$thisCV} =~ s/(\[[^\]]*?) ([^\]]*?\] )/$1√$2/) {}; + say LOG "2\t\$SNsInCV{$thisCV}:$SNsInCV{$thisCV}"; my @regArray = split / /, $SNsInCV{$thisCV}; + $" = "|\n"; say LOG "\@regArray: >@regArray<"; foreach my $thisNum (@regArray) { my ($found, $specPage); - say LOG "\n\n\$thisNum: >$thisNum<\t\$entriesThisSN{$thisNum}: >$entriesThisSN{$thisNum}<"; - if ($thisNum =~ /\d+(\[([\w \-\']+)\])/) { - $outString .= "$1($pageThisEntry{$2})\n"; + if ($thisNum =~ /(\d+)\[(.*?)\]/) { + ($thisNum) = ($1); + my ($forced_entry_for_display) = ($2); + while ($forced_entry_for_display =~ s/([^ \]]*?)√([^ \]]*?)/$1 $2/) {} + my $forced_entry_for_search = $forced_entry_for_display; + while ($forced_entry_for_display =~ s/\.\*\?/ ... /) {} + say LOG "\n\n\$thisNum: >$thisNum<\t\$forced_entry_for_display: >$forced_entry_for_display<, \$forced_entry_for_search: >>$forced_entry_for_search<<"; + $outString .= "[$forced_entry_for_display]($pageThisEntry{$forced_entry_for_display})\n"; + if ($forced_entry_for_search =~ /([^,]*) \.\.\. ([^,]*) \.\.\. ([^,]*)/) { + my ($first, $second, $third) = ($1, $2, $3); + $text{$thisRef} =~ s/$first(.*?)$second(.*?)$third/$1 $2/; + } elsif ($forced_entry_for_search =~ /([^,]*) \.\.\. ([^,]*)/) { + my ($first, $second) = ($1, $2); + $text{$thisRef} =~ s/$first(.*?)$second/$1/; + } next; } elsif ($thisNum =~ /\d+(\(([\w\/]+)\))/) { $specPage .= $2; diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_NT.1.pl b/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_NT.1.pl index 7cba5d2..ddf754f 100644 --- a/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_NT.1.pl +++ b/MAST_tW_PDF_Updater/FilesForUpdates/tWs.from.MAST_NT.1.pl @@ -173,7 +173,6 @@ sub PairtWEntriesTotWPageAndUniqSNs { #say "|$shortFile|"; die; #if ($shortFile =~ /^(kt|names)/) { #my $fileText = read_file("$file", binmode => 'utf8'); - #say LOG "\$file: $file, \$shortFile: $shortFile, \$topTwDir: $topTwDir"; open IN, $file or die "$!"; while () { if (/^# ([^\n]*)$/) { @@ -291,6 +290,7 @@ sub LinkSNsToULBtextViaEntries { $listOfPages{$thisCV} = ""; #say LOG "\$SNsInCV{$thisCV}: |$SNsInCV{$thisCV}|\n$text{$thisCV}"; #say LOG "\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<"; + $SNsInCV{$thisCV} =~ s/^ +//; $SNsInCV{$thisCV} =~ s/ +$//; $SNsInCV{$thisCV} =~ s/ {2,}/ /g; @@ -305,13 +305,30 @@ sub LinkSNsToULBtextViaEntries { say LOG "**\t\$SNsInCV{$thisCV}: >$SNsInCV{$thisCV}<"; } #say LOG "<>\t<>\t\$SNsInCV{$thisCV}: |$SNsInCV{$thisCV}|"; + $SNsInCV{$thisCV} =~ s/ \.\.\. /.*?/g; + say LOG "1\t\$SNsInCV{$thisCV}:$SNsInCV{$thisCV}"; + while ($SNsInCV{$thisCV} =~ s/(\[[^\]]*?) ([^\]]*?\] )/$1√$2/) {}; + say LOG "2\t\$SNsInCV{$thisCV}:$SNsInCV{$thisCV}"; my @regArray = split / /, $SNsInCV{$thisCV}; - #say LOG "\@regArray: >@regArray<"; + $" = "|\n"; + say LOG "\$SNsInCV{$thisCV}:$SNsInCV{$thisCV}\n\@regArray: >@regArray<"; foreach my $thisNum (@regArray) { my ($found, $specPage); - say LOG "\n\n\$thisNum: >$thisNum<\t\$entriesThisSN{$thisNum}: >$entriesThisSN{$thisNum}<"; - if ($thisNum =~ /\d+(\[([\w \-\']+)\])/) { - $outString .= "$1($pageThisEntry{$2})\n"; + if ($thisNum =~ /(\d+)\[(.*?)\]/) { + ($thisNum) = ($1); + my ($forced_entry_for_display) = ($2); + while ($forced_entry_for_display =~ s/([^ \]]*?)√([^ \]]*?)/$1 $2/) {} + my $forced_entry_for_search = $forced_entry_for_display; + while ($forced_entry_for_display =~ s/\.\*\?/ ... /) {} + say LOG "\n\n\$thisNum: >$thisNum<\t\$forced_entry_for_display: >$forced_entry_for_display<, \$forced_entry_for_search: >>$forced_entry_for_search<<"; + $outString .= "[$forced_entry_for_display]($pageThisEntry{$forced_entry_for_display})\n"; + if ($forced_entry_for_search =~ /([^,]*) \.\.\. ([^,]*) \.\.\. ([^,]*)/) { + my ($first, $second, $third) = ($1, $2, $3); + $text{$thisRef} =~ s/$first(.*?)$second(.*?)$third/$1 $2/; + } elsif ($forced_entry_for_search =~ /([^,]*) \.\.\. ([^,]*)/) { + my ($first, $second) = ($1, $2); + $text{$thisRef} =~ s/$first(.*?)$second/$1/; + } next; } elsif ($thisNum =~ /\d+(\(([\w\/]+)\))/) { $specPage .= $2; @@ -339,7 +356,7 @@ sub LinkSNsToULBtextViaEntries { if ($testEntry =~ /\(\.\*\?\)/ && $text{$thisCV} =~ s/\b($testEntry)\b/$3/i) { say LOG "\n===\n$thisNum |$testEntry| is found in first test.\n==="; $outString .= "[$entry]($pageThisEntry{$entry})\n"; - say LOG $outString . "\n" . $text{$thisCV}; + say LOG $outString . "\n==" . $text{$thisCV}; $found = 1; goto Breakout; } elsif ($text{$thisCV} =~ s/\b($testEntry)\b//i) { @@ -400,11 +417,9 @@ sub Adjust { say LOG "\$snsOld: $snsOld"; } } - # Figure out how to get [word ... word] to search before others in $snsNew. say LOG "\$snsNew: >$snsNew<\n\$snsOld+\$snsNew: >$snsOld< >$snsNew<"; $snsNew = "$snsOld $snsNew"; while ($snsNew =~ s/(\d+) (\d+\[[^\[\]]*\])/$2 $1/) {} - $snsNew =~ s/ \.\.\. /.*?/g; return $snsNew; }