diff options
Diffstat (limited to 'modules/misc_cleanup')
-rwxr-xr-x | modules/misc_cleanup/order.pl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/misc_cleanup/order.pl b/modules/misc_cleanup/order.pl new file mode 100755 index 0000000..a650724 --- /dev/null +++ b/modules/misc_cleanup/order.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl +# This script will order an unsorted directory of usfm files by adding a number to the name of each file, in +# order of the books of the Bible. You need to edit the script to prepare for different versififcations/caanons, +# You also need to edit line 22 for your particular file naming scheme + +use strict; +use warnings; +use File::Copy; + +my @books = ( 'GEN','EXO','LEV','NUM','DEU','JOS','JDG','RUT','1SA','2SA','1KI','2KI', + '1CH','2CH','EZR','NEH','EST','JOB','PSA','PRO','ECC','SNG','ISA','JER', + 'LAM','EZK','DAN','HOS','JOL','AMO','OBA','JON','MIC','NAM','HAB','ZEP', + 'HAG','ZEC','MAL','MAT','MRK','LUK','JHN','ACT','ROM','1CO','2CO','GAL', + 'EPH','PHP','COL','1TH','2TH','1TI','2TI','TIT','PHM','HEB','JAS','1PE', + '2PE','1JN','2JN','3JN','JUD','REV'); +$/="\n"; +my $i = 1; + +foreach (@books) { + if ($i==40) {$i=41} + if ($i<10) {$i="0".$i} + my $old = $_.'.Nav.sfm'; + my $new = 'result/'.$i.$old; + + copy($old,$new); + $i++; + $i=int($i); + } +
\ No newline at end of file |