Setting up borrowed machine

This commit is contained in:
Henry Whitney 2019-10-01 17:38:11 -04:00
parent 8ef2d51fe3
commit 282ddd047d
24 changed files with 384 additions and 9 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
MAST_tW_PDF_Updater/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,95 @@
use 5.12.0;
use File::Slurp;
use File::Find ;
use Cwd ;
use utf8;
#use open IN => ":utf8", OUT => ":utf8";
use open IO => ":utf8";
binmode STDOUT, ":encoding(UTF-8)";
open LOG, ">Logs/log.log";
my (%bk);
my ($last_bn, $last_ch, $last_vs, $bklc) = ("00", "00", "00");
while (<DATA>) {
chomp;
if (/^(\d\d)-(...)/) {
$bk{$1} = $2;
}
}
open IN, "/Users/virginiawhitney/Documents/Henry/WA/Repos/OpenGNT_version3_3.csv";
while (<IN>) {
chomp;
Separate();
}
say OUT " </verse>\n </chapter>\n </book>\n</xml>";
close OUT;
close OUT;
close IN;
close LOG;
say "Done.";
sub Separate {
if (/[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t-\t[^\t]*\t(\d+)(\d+)(\d+)\t[^\]*[^\]*([^\]*)([^\]*)([^\]*)([^\]*)/) {
my ($bn, $ch, $vs, $word, $lexeme, $gram, $sn) = ($1, $2, $3, $4, $5, $6, $7);
say LOG "$1, $2, $3, $4, $5, $6, $7";
$sn =~ s/[GH]//;
$bn = $bn + 1;
if ($bn ne $last_bn) {
my ($this_bk) = ($bk{$bn});
$bklc = lc $bk{$bn};
if (OUT-> opened()) {
say OUT " </verse>\n </chapter>\n </book>\n</xml>";
close OUT;
}
open OUT, ">:utf8", "$bn-$bk{$bn}.xml" or die "$! $bn-$bk{$bn}.xml";
say OUT "\n<xml>\n <div type=\"book\" osisID=\"$bklc\">\n <chapter osisID=\"$bklc.$ch\">\n <verse osisID=\"$bklc.$ch.$vs\">";
($last_bn, $last_ch, $last_vs) = ($bn, $ch, $vs)
}
elsif ($ch ne $last_ch) {
say OUT " </verse>\n </chapter>\n <chapter osisID=\"$bklc.$ch\">\n <verse osisID=\"$bklc.$ch.$vs\">";
($last_ch, $last_vs) = ($ch, $vs)
}
elsif ($vs ne $last_vs) {
my ($this_bk, $bklc) = ($bk{$bn}, lc $bk{$bn});
say OUT " </verse>\n <verse osisID=\"$bklc.$ch.$vs\">";
$last_vs = $vs;
}
say OUT "\t\t\t\t<w lemma=\"$sn\" morph=\"$gram\">$word</w>"
}
}
__DATA__
41-MAT.xml
42-MRK.xml
43-LUK.xml
44-JHN.xml
45-ACT.xml
46-ROM.xml
47-1CO.xml
48-2CO.xml
49-GAL.xml
50-EPH.xml
51-PHP.xml
52-COL.xml
53-1TH.xml
54-2TH.xml
55-1TI.xml
56-2TI.xml
57-TIT.xml
58-PHM.xml
59-HEB.xml
60-JAS.xml
61-1PE.xml
62-2PE.xml
63-1JN.xml
64-2JN.xml
65-3JN.xml
66-JUD.xml
67-REV.xml

View File

@ -22,6 +22,7 @@ chdir $Bin;
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "$Bin${d}User${d}$udf") or die "$Bin${d}User${d}$udf:\n$!";

View File

@ -10,8 +10,8 @@ while (<DATA>) {
}
}
my $oldnames = "/home/henry/Documents/WA_Repo/OSHB";
my $newnames = "/home/henry/Documents/WA_Repo/MAST_HB";
my $oldnames = "/Users/virginiawhitney/Documents/Henry/WA/Repos/OSHB";
my $newnames = "/Users/virginiawhitney/Documents/Henry/WA/Repos/MAST_HB";
chdir($oldnames);
mkdir($newnames) if !-e $newnames;

View File

@ -8,7 +8,7 @@ use utf8;
use open IO => ":utf8";
my ($oldName, $newName);
my $topDir = "/home/henry/Documents/WA_Repo/MAST_HB";
my $topDir = "/Users/virginiawhitney/Documents/Henry/WA/Repos/MAST_HB";
#my $topDir = "/Users/Henry/Documents/git.Door43/MAST_HB";
my (%new_name);

View File

@ -9500,5 +9500,45 @@ Colossians 4:17 2036 ||
2 Thessalonians 3:12 2068 ||
2 Thessalonians 3:16 1325 ||
1 Timothy 1:7 2309 ||
1 Timothy 1:7 3004 ||
1 Timothy 1:10 2087 ||
1 Timothy 1:12 5087
1 Timothy 1:14 2424
1 Timothy 1:15 4413
1 Timothy 1:16 4413
1 Timothy 1:18 3908 ||
1 Timothy 2:1 4413
1 Timothy 2:1 1162
1 Timothy 2:1 4335
1 Timothy 2:1 1783
1 Timothy 2:1 444
1 Timothy 2:2 4587
1 Timothy 2:4 444
1 Timothy 2:4 2309
1 Timothy 2:5 444
1 Timothy 2:6 1325
1 Timothy 2:7 2783
1 Timothy 2:7 3004
1 Timothy 2:8 1014
1 Timothy 2:8 5117 ||
1 Timothy 2:9 127
1 Timothy 2:10 1861
1 Timothy 2:13 4413
1 Timothy 2:13 4111
1 Timothy 2:15 3306
1 Timothy 2:15 4997 ||
1 Timothy 3:2 1210
1 Timothy 3:4 4587
1 Timothy 3:7 1210
1 Timothy 3:8 4183
1 Timothy 3:8 4337
1 Timothy 3:10 4413
1 Timothy 3:13 4183
1 Timothy 3:15 1210
1 Timothy 3:15 2198
1 Timothy 3:16 3173
1 Timothy 3:16 3708 ||
1 Timothy 3:16 2784

View File

@ -34,6 +34,7 @@ sub GetUserDefaults {
if ($^O eq "linux") {
$defaults_file = "User${d}User_defaults.linux.txt"
} elsif ($^O eq "darwin") {
# $defaults_file = "User${d}User_defaults.mac.txt"
$defaults_file = "User${d}User_defaults.mac.txt"
} elsif ($^O eq "MSWin32" || $^O eq "MSWin64") {
$defaults_file = "User${d}User_defaults.windows.txt"

View File

@ -20,6 +20,7 @@ if ($^O eq "linux" || $^O eq "darwin") {$d = "/"}
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "$Bin${d}User${d}$udf") or die "$Bin${d}User${d}$udf:\n$!";

View File

@ -43,6 +43,7 @@ while (<DATA>) {
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
chdir $Bin;

View File

@ -9,6 +9,7 @@ if ($^O eq "darwin" || $^O eq "linux") {$d = "/"}
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "User${d}$udf") or die "User${d}$udf:\n$!";

View File

@ -0,0 +1,131 @@
1 Timothy 4:1 3004
1 Timothy 4:1 868
1 Timothy 4:3 3336
1 Timothy 4:4 2938
1 Timothy 4:4 3762
1 Timothy 4:5 2316
1 Timothy 4:7 952
1 Timothy 4:8 3568
1 Timothy 4:10 444
1 Timothy 4:13 4337
1 Timothy 4:14 1325
1 Timothy 5:1 3962
1 Timothy 5:4 4413
1 Timothy 5:5 4335
1 Timothy 5:10 4228
1 Timothy 5:11 2309
1 Timothy 5:12 2917
1 Timothy 5:12 4413
1 Timothy 5:12 114
1 Timothy 5:13 692
1 Timothy 5:13 2980
1 Timothy 5:14 1014
1 Timothy 5:14 1325
1 Timothy 5:14 5484
1 Timothy 5:17 515
1 Timothy 5:18 3004
1 Timothy 5:22 245
1 Timothy 5:24 444
1 Timothy 6:1 514
1 Timothy 6:2 2108
1 Timothy 6:3 5198
1 Timothy 6:5 444
1 Timothy 6:6 3173
1 Timothy 6:7 3762
1 Timothy 6:7 1627
1 Timothy 6:9 4147
1 Timothy 6:9 1939
1 Timothy 6:9 4183
1 Timothy 6:9 983 ||
1 Timothy 6:9 444
1 Timothy 6:9 684
1 Timothy 6:10 4183
1 Timothy 6:11 2150
1 Timothy 6:12 75
1 Timothy 6:12 3671 ||
1 Timothy 6:12 4183
1 Timothy 6:13 4091
1 Timothy 6:14 423
1 Timothy 6:16 1492
1 Timothy 6:16 3762
1 Timothy 6:16 444
1 Timothy 6:17 3568
1 Timothy 6:18 2570
1 Timothy 6:20 5442
1 Timothy 6:20 1624
1 Timothy 6:20 2757
2 Timothy 1:1 2316
2 Timothy 1:4 1492
2 Timothy 1:5 2983
2 Timothy 1:5 505
2 Timothy 1:5 4413
2 Timothy 1:7 1325
2 Timothy 1:9 1325
2 Timothy 1:10 3568
2 Timothy 1:10 861
2 Timothy 1:11 2783
2 Timothy 1:13 5198
2 Timothy 1:14 40
2 Timothy 1:16 1325
2 Timothy 1:18 1325
2 Timothy 1:18 1247
2 Timothy 2:2 4183
2 Timothy 2:2 3908 ||
2 Timothy 2:2 444
2 Timothy 2:2 2425
2 Timothy 2:2 2087
2 Timothy 2:4 3762
2 Timothy 2:4 4758 ||
2 Timothy 2:6 1210
2 Timothy 2:6 4413
2 Timothy 2:7 3004
2 Timothy 2:7 1325
2 Timothy 2:7 4907
2 Timothy 2:9 2316
2 Timothy 2:13 3306
2 Timothy 2:14 1263
2 Timothy 2:14 3762
2 Timothy 2:15 3936
2 Timothy 2:15 225
2 Timothy 2:16 2757
2 Timothy 2:18 3004
2 Timothy 2:19 4973
2 Timothy 2:19 868
2 Timothy 2:20 3173
2 Timothy 2:20 4632
2 Timothy 2:21 18
2 Timothy 2:23 3163
2 Timothy 2:24 1210
2 Timothy 2:24 3164
2 Timothy 2:25 1325
2 Timothy 3:1 2540
2 Timothy 3:2 444
2 Timothy 3:4 5187
2 Timothy 3:8 436
2 Timothy 3:8 444
2 Timothy 3:8 96
2 Timothy 3:10 5281
2 Timothy 3:12 2309
2 Timothy 3:13 444
2 Timothy 3:14 3306
2 Timothy 3:15 1121 ||
2 Timothy 3:17 444
2 Timothy 4:2 2008
2 Timothy 4:3 5198
2 Timothy 4:3 189
2 Timothy 4:4 189
2 Timothy 4:7 75
2 Timothy 4:8 591
2 Timothy 4:10 3568
2 Timothy 4:11 353
2 Timothy 4:13 5342
2 Timothy 4:14 4183
2 Timothy 4:15 436
2 Timothy 4:16 4413
2 Timothy 4:16 3762
2 Timothy 4:17 3936
2 Timothy 4:17 4135
2 Timothy 4:17 4750
2 Timothy 4:18 2032
2 Timothy 4:20 3306

View File

@ -1,3 +1,3 @@
2 Thessalonians 2:6 2722
1 Timothy 1:12 5087
greek
open -a /Applications/Firefox.app<>

View File

@ -0,0 +1,57 @@
Instructions for use of this file are below the second "===============" line.
Here are the current defaults the scripts will be looking for.
===============
# For Mac
Text editor: /Applications/BBEdit.app
HTML browser: /Applications/Firefox.app
Repository directory: /Users/Henry/Documents/git.Door43
translationNotes path: en_tn
translationWords path: bible.en_tw
Unlocked Literal Bible path: en_ulb
# translationNotes path: gl_.*_tn
# translationWords path: gl_.*_bible.en_tw
# Unlocked Literal Bible path: gl_.*_ulb
Hebrew Bible XML directory: MAST_HB
Greek Bible XML directory: MAST_NT
===============
INSTRUCTIONS
To find the path to the required files, use either Windows File Explorer, Linux Files, or Mac Finder to navigate to where your files are located. Right-click (secondary click) on the file name.
In Windows or Linux, this will open a dialog box that gives you the path name and the name of the program. Put the path name, either a backslash (Windows) or a forward slash (Linux), and the application name in the appropriate line below.
In Mac, this will open a menu. If the menu offers "Services," click that and then click "Copy Path"; otherwise click "Copy Path." Then paste the full path in the line below.
Note in the samples that any program or application that you can call any program or application you care to use.
The Text Editor
The text editor is the program or application you will use to edit the files produced by the scripts.
This line (without the #) will call Komodo Edit 10 on a Mac
# Text editor: /Applications/Komodo Edit 10.app
This line (without the #) will call Komodo Edit on a Linux machine.
# Text editor: Komodo-Edit-9/lib/mozilla/Komodo
This line (without the #) will call Notepad ++ on a Windows machine.
# Text editor: "C:\Program Files (x86)\Notepad++\notepad++"
The Repository Directory
This is the top directory for all ULB, translationNotes, translationWords, and UDB files.
Sample Mac path
# Repository directory: /Users/John/Documents/git.Door43
Sample Windows path
# Repository directory: C:\Documents\TranslationFiles
Sample Linux path
# Repository directory: home/john/Documents/TranslationFiles

View File

@ -7,7 +7,7 @@ Here are the current defaults the scripts will be looking for.
# For Mac
Text editor: /Applications/BBEdit.app
HTML browser: /Applications/Firefox.app
Repository directory: /Users/Henry/Documents/git.Door43
Repository directory: /Users/virginiawhitney/Documents/Henry/WA/Repos
translationNotes path: en_tn
translationWords path: bible.en_tw

View File

@ -10,10 +10,10 @@
#50 Ephesians eph Ep
#51 Philippians php Pp
#52 Colossians col Co
53 1 Thessalonians 1th 1th
54 2 Thessalonians 2th 2th
#55 1 Timothy 1ti 1ti
#56 2 Timothy 2ti 2ti
#53 1 Thessalonians 1th 1th
#54 2 Thessalonians 2th 2th
55 1 Timothy 1ti 1ti
56 2 Timothy 2ti 2ti
#57 Titus tit Ti
#58 Philemon phm Pm
#59 Hebrews heb He

View File

@ -0,0 +1,10 @@
echo Updating ...
echo Making ULB
perl "MakeULB.4.pl"
echo Combining ULB and NASB
perl "CombineULBandNASBwithCodes.pl";
echo Building extract file
perl "Build_extract_NT.pl";
echo Extracting tWs from Source language
# perl "tWs.from.UGNT.8.pl"
perl "tWs.from.MAST_NT.pl"

View File

@ -0,0 +1,24 @@
use 5.12.0;
use File::Slurp;
use File::Find ;
use Cwd ;
use utf8;
#use open IN => ":utf8", OUT => ":utf8";
use open IO => ":utf8";
open IN, "/Users/virginiawhitney/Documents/Henry/WA/Repos/OpenGNT_version3_3.csv";
open OUT, ">/Users/virginiawhitney/Documents/Henry/WA/Repos/Sample.txt";
my $count;
while (<IN>) {
my $count ++;
if ($count < 6) {
chomp;
say OUT $_
}
}
close OUT;
close IN;

View File

@ -0,0 +1,9 @@
use strict;
use autodie;
use warnings qw< FATAL all >;
use IO::Handle;
use Scalar::Util qw< openhandle >;
open OUT, ">/Users/virginiawhitney/Documents/Henry/WA/Repos/Samplex.txt";
printf "OUT is %sopened.\n", OUT->opened() ? "" : "not ";
if (OUT-> opened()) {print "OUT is open"}

View File

@ -34,6 +34,7 @@ if ($^O eq "MSWin32") {
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "$pwd${d}User${d}$udf") or die "$pwd${d}User${d}$udf:\n$!";

View File

@ -35,6 +35,7 @@ if ($^O eq "MSWin32") {
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "$pwd${d}User${d}$udf") or die "$pwd${d}User${d}$udf:\n$!";

View File

@ -31,6 +31,7 @@ if ($^O eq "MSWin32") {
my ($udf) = "User_defaults.windows.txt";
if ($^O eq "linux") {$udf = "User_defaults.linux.txt"}
#elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
elsif ($^O eq "darwin") {$udf = "User_defaults.mac.txt"}
open (my $defaults, "<:utf8", "$pwd${d}User${d}$udf") or die "$pwd${d}User${d}$udf:\n$!";

View File

@ -2,3 +2,4 @@ Hebrew Bible:
http://ancientworldonline.blogspot.com/2019/01/open-scriptures-hebrew-bible-oshb.html
New Testament:
https://github.com/eliranwong/OpenGNT/blob/master/mapping_BGB/compare_OGNT_NA28/diff_main.tsv
/Users/virginiawhitney/Documents/Henry/WA/Repos/OpenGNT_version3_3.csv