[sword-svn] r485 - in trunk: misc modules modules/bibles modules/bibles/grc modules/bibles/grc/tr modules/bibles/grc/whnu
scribe at crosswire.org
scribe at crosswire.org
Sat Apr 12 21:30:58 MST 2014
Author: scribe
Date: 2014-04-12 21:30:58 -0700 (Sat, 12 Apr 2014)
New Revision: 485
Added:
trunk/misc/symbgreektoutf16.c
trunk/modules/bibles/
trunk/modules/bibles/grc/
trunk/modules/bibles/grc/tr/
trunk/modules/bibles/grc/tr/Makefile
trunk/modules/bibles/grc/whnu/
trunk/modules/bibles/grc/whnu/Makefile
trunk/modules/bibles/grc/whnu/convert.sh
Log:
added simple conversion scripts for maurice's stuff
Added: trunk/misc/symbgreektoutf16.c
===================================================================
(Binary files differ)
Property changes on: trunk/misc/symbgreektoutf16.c
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/modules/bibles/grc/tr/Makefile
===================================================================
--- trunk/modules/bibles/grc/tr/Makefile (rev 0)
+++ trunk/modules/bibles/grc/tr/Makefile 2014-04-13 04:30:58 UTC (rev 485)
@@ -0,0 +1,30 @@
+.SUFFIXES: .UTR .imp
+SOURCE = TR-PRSD
+TARGET = tr
+SOURCES = $(shell find $(SOURCE)/ -name '*.UTR')
+IMPS = $(SOURCES:%.UTR=%.imp)
+
+all: $(TARGET)/
+
+$(SOURCE).ZIP:
+ wget -O $(SOURCE).ZIP https://sites.google.com/a/wmail.fi/greeknt/home/greeknt/$(SOURCE).ZIP?attredirects=0
+
+$(SOURCE)/: $(SOURCE).ZIP
+ unzip $(SOURCE).ZIP -d $(SOURCE)/
+
+.UTR.imp:
+ ../whnu/convert.sh $< > $@
+
+$(SOURCE).imp: $(SOURCE)/ ../whnu/convert.sh symbgreektoutf16 $(IMPS)
+ cat $(IMPS) > $(SOURCE).imp
+
+$(TARGET)/: $(SOURCE).imp
+ mkdir -p $(TARGET)/
+ imp2vs $(SOURCE).imp -z -o $(TARGET)/
+
+clean:
+ rm -rf $(SOURCE).ZIP $(SOURCE) $(SOURCE).imp symbgreektoutf16 $(TARGET)
+
+symbgreektoutf16: ../../../../misc/symbgreektoutf16.c
+ gcc -o $@ $<
+
Added: trunk/modules/bibles/grc/whnu/Makefile
===================================================================
--- trunk/modules/bibles/grc/whnu/Makefile (rev 0)
+++ trunk/modules/bibles/grc/whnu/Makefile 2014-04-13 04:30:58 UTC (rev 485)
@@ -0,0 +1,30 @@
+.SUFFIXES: .UWH .imp
+SOURCE = WH27PRSD
+TARGET = whnu
+SOURCES = $(shell find $(SOURCE)/ -name '*.UWH')
+IMPS = $(SOURCES:%.UWH=%.imp)
+
+all: $(TARGET)/
+
+$(SOURCE).ZIP:
+ wget -O $(SOURCE).ZIP https://sites.google.com/a/wmail.fi/greeknt/home/greeknt/$(SOURCE).ZIP?attredirects=0
+
+$(SOURCE)/: $(SOURCE).ZIP
+ unzip $(SOURCE).ZIP -d $(SOURCE)/
+
+.UWH.imp:
+ ./convert.sh $< > $@
+
+$(SOURCE).imp: $(SOURCE)/ convert.sh symbgreektoutf16 $(IMPS)
+ cat $(IMPS) > $(SOURCE).imp
+
+$(TARGET)/: $(SOURCE).imp
+ mkdir -p $(TARGET)/
+ imp2vs $(SOURCE).imp -z -o $(TARGET)/
+
+clean:
+ rm -rf $(SOURCE).ZIP $(SOURCE) $(SOURCE).imp symbgreektoutf16 $(TARGET)
+
+symbgreektoutf16: ../../../../misc/symbgreektoutf16.c
+ gcc -o $@ $<
+
Added: trunk/modules/bibles/grc/whnu/convert.sh
===================================================================
--- trunk/modules/bibles/grc/whnu/convert.sh (rev 0)
+++ trunk/modules/bibles/grc/whnu/convert.sh 2014-04-13 04:30:58 UTC (rev 485)
@@ -0,0 +1,29 @@
+#!/bin/bash
+FILENAME=$(basename $1)
+BOOK=${FILENAME%.*}
+vn="0"
+sed -e 's/
+//g' $1| while read line; do
+ for i in $line; do
+ if [[ "$i" =~ [0-9]+:[0-9]+ ]]; then
+ echo; echo \$\$\$$BOOK $i
+ elif [[ "$i" =~ \{.*\} ]]; then
+ echo -n "<w lemma=\"strong:$lemma\" morph=\"robinson:${i:1:-1}"
+ if [[ "$sm" -ne "" ]]; then echo -n " strongsMorph:$sm"; fi
+ echo -n "\">$txt</w> "
+ sm=""
+ elif [[ "$i" =~ [0-9]+ ]]; then
+ if [[ "$i" > "5624" ]]; then sm=$i
+ else lemma=$i; fi
+ elif [[ "$i" = "|" ]]; then
+ ((vn = vn + 1))
+ if [[ "$vn" > "1" ]]; then echo -n "</seg>"; fi
+ if [[ "$vn" < "3" ]]; then echo -n "<seg type=\"x-variant\" subType=\"x-$vn\">"
+ else vn="0"; fi
+ elif [[ "$i" =~ [a-z]+ ]]; then
+ txt=$(echo $i |./symbgreektoutf16 -robinson| uconv --from-code UTF-16 --to-code UTF-8)
+ else
+ echo NOT HANDLED!: $i
+ fi
+ done
+done
Property changes on: trunk/modules/bibles/grc/whnu/convert.sh
___________________________________________________________________
Added: svn:executable
+ *
More information about the sword-cvs
mailing list