[sword-svn] r267 - trunk/modules/geneve

refdoc at crosswire.org refdoc at crosswire.org
Wed Jan 13 01:41:29 MST 2010


Author: refdoc
Date: 2010-01-13 01:41:29 -0700 (Wed, 13 Jan 2010)
New Revision: 267

Added:
   trunk/modules/geneve/paralist.pl
Modified:
   trunk/modules/geneve/books
Log:
'paralist.pl' creates a list of USFM xrefs from a styled MS word -> abiword file
'books' is a list of USFM book ids, Jeremiah was missed out


Modified: trunk/modules/geneve/books
===================================================================
--- trunk/modules/geneve/books	2010-01-02 04:25:28 UTC (rev 266)
+++ trunk/modules/geneve/books	2010-01-13 08:41:29 UTC (rev 267)
@@ -21,6 +21,7 @@
 ECC
 SNG
 ISA
+JER
 LAM
 EZK
 DAN

Added: trunk/modules/geneve/paralist.pl
===================================================================
--- trunk/modules/geneve/paralist.pl	                        (rev 0)
+++ trunk/modules/geneve/paralist.pl	2010-01-13 08:41:29 UTC (rev 267)
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+use strict;
+
+my @files=`ls -1 *.abw`;
+
+foreach (@files){ 
+
+        my @lines;
+	chop;
+	open PARA, ">>$_.list";
+	chomp(@lines=`cat $_`);
+	
+
+	foreach (@lines) {
+                s/<m\ .*?\/m>//;
+                
+		s/<p\ style=\"Parallelen [Ü]*bers Kapitel\".*?><c.*?>\ *[K|P]\ (.*?)<\/c><\/p>//g;
+
+                s/<p\ style=\"Parallelenverweise\" xid=\"[0-9]+\"\ props=\"text-align:left; line-height:1.0; dom-dir:ltr; orphans:0; widows:0\"><\/p>//g;
+ 
+                s/<p\ style=\"Parallelenverweise\" xid=\"[1-7]\".+?><c.+?>.*?<\/c><\/p>//g;
+                s/<p style=\"Parallelenverweise\".*?>(.*?)<\/p>/\n$1\ \\x\*/g;
+		s/<c style=\"Verszahl\ Parallelensignal\".*?>(.*?)<\/c>//g;
+		s/<c style=\"Parallelentext Leerz\".*?>\ <\/c>/\ \\x\ /g;
+		s/<c style=\"Parallelentext kursiv\".*?>(.*?)<\/c>/\ \\xk\ $1\ /g;
+		s/<c .*?props=\"lang:de-DE;\ font-size:8pt;\ font-family:(Utopia|Times\ New\ Roman)\".*?>(.*?)<\/c>/\ \\xt\ $2/g;
+		s/^.*?style=\"Normal.*?$//g;
+		s/^.*?style=\"En-tête.*?$//g;
+		s/<br\ *\/>//g;
+		s/xid\=\".*?\"//g;
+		s/^\ x\*//;
+                s/<.*?>//g;
+                s/(\\xt.*?)(\\xk)/$1\ \\x\*\n\\x\ $2/g;
+                s/^\ //g;
+                s/\n\ /\n/g;
+                s/\ \ +/\ /g;
+}
+	
+	print (PARA @lines);
+	close PARA;
+}                                                                                  


Property changes on: trunk/modules/geneve/paralist.pl
___________________________________________________________________
Added: svn:executable
   + *




More information about the sword-cvs mailing list