From dd7aad7b36cbbf945e58d329e8c32ef5b9152294 Mon Sep 17 00:00:00 2001 From: Henry Whitney Date: Fri, 24 Jul 2020 16:51:40 -0400 Subject: [PATCH] From work on MAST PDF --- .../Convert_OHSB_filenames_to_MAST_HB.pl | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 MAST_tW_PDF_Updater/FilesForUpdates/Convert_OHSB_filenames_to_MAST_HB.pl diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Convert_OHSB_filenames_to_MAST_HB.pl b/MAST_tW_PDF_Updater/FilesForUpdates/Convert_OHSB_filenames_to_MAST_HB.pl new file mode 100644 index 0000000..3b343cd --- /dev/null +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Convert_OHSB_filenames_to_MAST_HB.pl @@ -0,0 +1,68 @@ +# Step 1 in updating OSHB to MAST_HB +# Converts file names to WA MAST abbreviations +# After this, run Convert_refs_in_MAST_HB.pl to get data in file to conform +# This looks for the OSHB and MAST-HB folders in the same place + +while () { + chomp; + if (/([^\t]*)\t([^\t]*)/) { + #($oldName, $newName) = ($1, $2); + $new_name{$1} = $2; + } +} + +my $oldnames = "/Users/Henry/Documents/WACS/OSHB"; +my $newnames = "/Users/Henry/Documents/WACS/MAST_HB"; +chdir($oldnames); +mkdir($newnames) if !-e $newnames; + +foreach $old_name (sort keys %new_name) { + print "$old_name to $newnames/$new_name{$old_name}\n"; + system "cp $old_name $newnames/$new_name{$old_name}"; + system "cp VerseMap.xml $newnames/VerseMap.xml" + #system "mv $olddir/$old_name to $newdir/$new_name{$old_name}" + +} + +print "Done.\n" + +__DATA__ +Gen.xml 01-GEN.xml +Exod.xml 02-EXO.xml +Lev.xml 03-LEV.xml +Num.xml 04-NUM.xml +Deut.xml 05-DEU.xml +Josh.xml 06-JOS.xml +Judg.xml 07-JDG.xml +Ruth.xml 08-RUT.xml +1Sam.xml 09-1SA.xml +2Sam.xml 10-2SA.xml +1Kgs.xml 11-1KI.xml +2Kgs.xml 12-2KI.xml +1Chr.xml 13-1CH.xml +2Chr.xml 14-2CH.xml +Ezra.xml 15-EZR.xml +Neh.xml 16-NEH.xml +Esth.xml 17-EST.xml +Job.xml 18-JOB.xml +Ps.xml 19-PSA.xml +Prov.xml 20-PRO.xml +Eccl.xml 21-ECC.xml +Song.xml 22-SNG.xml +Isa.xml 23-ISA.xml +Jer.xml 24-JER.xml +Lam.xml 25-LAM.xml +Ezek.xml 26-EZK.xml +Dan.xml 27-DAN.xml +Hos.xml 28-HOS.xml +Joel.xml 29-JOL.xml +Amos.xml 30-AMO.xml +Obad.xml 31-OBA.xml +Jonah.xml 32-JON.xml +Mic.xml 33-MIC.xml +Nah.xml 34-NAM.xml +Hab.xml 35-HAB.xml +Zeph.xml 36-ZEP.xml +Hag.xml 37-HAG.xml +Zech.xml 38-ZEC.xml +Mal.xml 39-MAL.xml