diff options
author | Peter von Kaehne <refdoc@gmx.net> | 2009-12-19 23:33:48 +0000 |
---|---|---|
committer | Peter von Kaehne <refdoc@gmx.net> | 2009-12-19 23:33:48 +0000 |
commit | 6bc298045391fcb094fadb572d2d2a5e0b48a45f (patch) | |
tree | 68b38f33bcde5842a72dc97e260cb2a8b10f4dbe | |
parent | b32fac481679ac933b608683c43042f9b1d5cf35 (diff) | |
download | sword-tools-6bc298045391fcb094fadb572d2d2a5e0b48a45f.tar.gz |
geneve2usfm first attempt
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@255 07627401-56e2-0310-80f4-f8cd0041bdcd
-rw-r--r-- | modules/geneve/books | 66 | ||||
-rwxr-xr-x | modules/geneve/transform.pl | 36 |
2 files changed, 102 insertions, 0 deletions
diff --git a/modules/geneve/books b/modules/geneve/books new file mode 100644 index 0000000..b45de57 --- /dev/null +++ b/modules/geneve/books @@ -0,0 +1,66 @@ +GEN
+EXO
+LEV
+NUM
+DEU
+JOS
+JDG
+RUT
+1sa
+2SA
+1KI
+2KI
+1CH
+2CH
+EZR
+NEH
+EST
+JOB
+PSA
+PRO
+ECC
+SNG
+ISA
+LAM
+EZK
+DAN
+HOS
+JOL
+AMO
+OBA
+JON
+MIC
+NAM
+HAB
+ZEP
+HAG
+ZEC
+MAL
+MAT
+MRK
+LUK
+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
diff --git a/modules/geneve/transform.pl b/modules/geneve/transform.pl new file mode 100755 index 0000000..89c5a94 --- /dev/null +++ b/modules/geneve/transform.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +my @files=`ls -1 *.abw`; +my @ident=`cat books`; + +foreach (@files){ + + my @lines; + chop; + open USFM, ">>$_.u"; + chomp(@lines=`cat $_`); + + @lines[1]="\\id @ident[$_-1] "; + + foreach (@lines) { + s/<m\ .*?\/m>//; + s/props\=\".*?\"//g; + s/<p\ style=\"Kapitel\".*?><c.*?>(.*?)<\/c><\/p>/\n\\c\ $1\ \n\\v\ 1\ /g; + s/<p\ style=\"Psalm Nr\".*?><c.*?>Psalm\ (.*?)<\/c><\/p>/\n\\c\ $1\n\\s1\ Psalm\ $1\n/g; + s/<c\ style=\"Verszahl\".*?>/\n\\v\ /g; + s/<p\ style=\"Buchtitel\".*?>/\n\\mt\ /g; + s/<p\ style=\"Bucheinleitung\".*?>/\n\\imt\n\\ip\ /g; + s/<p\ style=\"Spaltentitel\".*?>(.*?)<\/p>/\n\\s2\ $1\n\\p/g; + s/<p\ style=\"Spaltenparallelen\".*?>(.*?)<\/p>/\n\\r\ $1\n\\p/g; + s/<p style=\"Footnote Text\".*><field\ footnote-id=\".*?\"/\ \\f\ +\ /g; + s/<\/foot>/\\f\*\ /g; + s/type=\"footnote_anchor\"\ style=\"\"\ xid=\".*?\"\ >//g; + s/\\r\ Kapitel/\\mr Kapitel/g; + s/xid\=\".*?\"//g; + s/<.*?>//g; + + } + + print (USFM @lines); + close USFM; +} |