diff options
author | Peter von Kaehne <refdoc@gmx.net> | 2009-12-20 00:37:47 +0000 |
---|---|---|
committer | Peter von Kaehne <refdoc@gmx.net> | 2009-12-20 00:37:47 +0000 |
commit | ce5dfe64d3d0a4bf1c78c012e03cea5ed28685c8 (patch) | |
tree | c8d4107bf30bb6942347e44af418c6ba31cea5ce /modules/geneve | |
parent | a062147266fd64c4205cb9f10b4da1188b5ed109 (diff) | |
download | sword-tools-ce5dfe64d3d0a4bf1c78c012e03cea5ed28685c8.tar.gz |
clean up
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@258 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/geneve')
-rwxr-xr-x | modules/geneve/transform.pl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/geneve/transform.pl b/modules/geneve/transform.pl index 89c5a94..f551fcb 100755 --- a/modules/geneve/transform.pl +++ b/modules/geneve/transform.pl @@ -7,7 +7,7 @@ foreach (@files){ my @lines; chop; - open USFM, ">>$_.u"; + open USFM, ">>$_.usfm"; chomp(@lines=`cat $_`); @lines[1]="\\id @ident[$_-1] "; @@ -15,9 +15,9 @@ foreach (@files){ 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=\"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/<c\ style=\"Verszahl\".*?>(.*?)<\/c>/\n\\v\ $1\ \ /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; @@ -26,6 +26,13 @@ foreach (@files){ s/<\/foot>/\\f\*\ /g; s/type=\"footnote_anchor\"\ style=\"\"\ xid=\".*?\"\ >//g; s/\\r\ Kapitel/\\mr Kapitel/g; + if (!(/\\f.*?\[.*?\\f\*/)) { + s/\[/\ \\add\ /g; + } + if (!(/\\f.*?\[.*?\\f\*/)) { + s/\]/\ \\add\*\ /g; + } + s/<p\ style=\"Kopfzeile\".*?p>//; s/xid\=\".*?\"//g; s/<.*?>//g; |