From 780ca32793601e072605e4562584af6654a88950 Mon Sep 17 00:00:00 2001 From: "Troy A. Griffitts" Date: Mon, 10 Oct 2005 11:58:38 +0000 Subject: Added converter for CCAT LXXMorph git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@46 07627401-56e2-0310-80f4-f8cd0041bdcd --- modules/lxxm/convert.sh | 3 + .../lxxm/lib/greekconverter-wont-compile-src.jar | Bin 0 -> 98761 bytes modules/lxxm/lib/greekconverter.jar | Bin 0 -> 100503 bytes modules/lxxm/lxxm.html | 33 ++++++++ modules/lxxm/lxxm.imp | 0 modules/lxxm/lxxm.jar | Bin 0 -> 26328 bytes modules/lxxm/lxxm.jpx | 70 ++++++++++++++++ modules/lxxm/lxxm.jpx.local | 20 +++++ modules/lxxm/src/lxxm/LXXMConv.java | 93 +++++++++++++++++++++ 9 files changed, 219 insertions(+) create mode 100644 modules/lxxm/convert.sh create mode 100644 modules/lxxm/lib/greekconverter-wont-compile-src.jar create mode 100644 modules/lxxm/lib/greekconverter.jar create mode 100644 modules/lxxm/lxxm.html create mode 100644 modules/lxxm/lxxm.imp create mode 100644 modules/lxxm/lxxm.jar create mode 100644 modules/lxxm/lxxm.jpx create mode 100644 modules/lxxm/lxxm.jpx.local create mode 100644 modules/lxxm/src/lxxm/LXXMConv.java (limited to 'modules/lxxm') diff --git a/modules/lxxm/convert.sh b/modules/lxxm/convert.sh new file mode 100644 index 0000000..20a7ac7 --- /dev/null +++ b/modules/lxxm/convert.sh @@ -0,0 +1,3 @@ +#!/bin/sh +java -jar lxxm.jar [0-9][0-9]\.* > lxxm-decomp.imp +uconv -x Any-NFC lxxm-decomp.imp > lxxm.imp diff --git a/modules/lxxm/lib/greekconverter-wont-compile-src.jar b/modules/lxxm/lib/greekconverter-wont-compile-src.jar new file mode 100644 index 0000000..30ac69f Binary files /dev/null and b/modules/lxxm/lib/greekconverter-wont-compile-src.jar differ diff --git a/modules/lxxm/lib/greekconverter.jar b/modules/lxxm/lib/greekconverter.jar new file mode 100644 index 0000000..4e540e5 Binary files /dev/null and b/modules/lxxm/lib/greekconverter.jar differ diff --git a/modules/lxxm/lxxm.html b/modules/lxxm/lxxm.html new file mode 100644 index 0000000..17c81d5 --- /dev/null +++ b/modules/lxxm/lxxm.html @@ -0,0 +1,33 @@ + + + +JBuilder Project lxxm.jpx + + +

Project lxxm Notes

+
+ + + + +
Title: + + +
Author: + + +
Company: + + +
Description: + + +

+

Things to do...

+
    + +
  1. First +
  2. Second +
+ + diff --git a/modules/lxxm/lxxm.imp b/modules/lxxm/lxxm.imp new file mode 100644 index 0000000..e69de29 diff --git a/modules/lxxm/lxxm.jar b/modules/lxxm/lxxm.jar new file mode 100644 index 0000000..ebbad2b Binary files /dev/null and b/modules/lxxm/lxxm.jar differ diff --git a/modules/lxxm/lxxm.jpx b/modules/lxxm/lxxm.jpx new file mode 100644 index 0000000..8fa87a8 --- /dev/null +++ b/modules/lxxm/lxxm.jpx @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/lxxm/lxxm.jpx.local b/modules/lxxm/lxxm.jpx.local new file mode 100644 index 0000000..bbf4d02 --- /dev/null +++ b/modules/lxxm/lxxm.jpx.local @@ -0,0 +1,20 @@ +build.menu.1[0]=com.borland.jbuilder.build.ProjectBuilder$ProjectBuildAction;make +build.menu.2[0]=com.borland.jbuilder.build.ProjectBuilder$ProjectBuildAction;rebuild +content.layout.xml.[0]= +debug.NoTracingClasses.1[0]=16 java.lang.Object1 1 -1 +debug.NoTracingClasses.2[0]=21 java.lang.ClassLoader1 1 -1 +debug.NoTracingClasses.3[0]=16 java.lang.String1 1 -1 +debug.SplitThreadsAndDataView[0]=0 +history.files.active[0]=src/lxxm/LXXMConv.java,F;19,2247 +history.files.open.1[0]=src/lxxm/LXXMConv.java,F;19,2247 +history.files.open.2[0]=[/space/usr/local/jdk1.5.0_04/src.zip]/java/lang/String.java,F;1743,69911 +import.optimize.legacyPropertiesRead[0]=1 +packagebrowser.lastClassName[0]=lxxm.LXXMConv +sys.Author[0]= +sys.DefaultPackage[0]=lxxm +sys.ReopenHistory.1[0]=[/space/usr/local/jdk1.5.0_04/src.zip]/java/io/BufferedReader.java +sys.ReopenHistory.2[0]=src/greekconverter/BetacodeToUnicode.java +sys.ReopenHistory.3[0]=classes/greekconverter/UC.class +sys.ReopenHistory.4[0]=src/lxxm/Untitled1.java +team.lastScanned[0]=1128944865968 +wizard.package.package_history.1[0]=lxxm diff --git a/modules/lxxm/src/lxxm/LXXMConv.java b/modules/lxxm/src/lxxm/LXXMConv.java new file mode 100644 index 0000000..5c6d74d --- /dev/null +++ b/modules/lxxm/src/lxxm/LXXMConv.java @@ -0,0 +1,93 @@ +package lxxm; + +import greekconverter.BetacodeToUnicode; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.*; + +public class LXXMConv { + public LXXMConv() { + } + + public static void main(String[] args) { + BetacodeToUnicode bc = new BetacodeToUnicode(); + BufferedReader input = null; + if (args.length < 1) { + System.err.println("usage: LXXMConv [fileName] ..."); + return; + } + for (int i = 0; i < args.length; i++) { + try { + input = new BufferedReader(new FileReader(args[i])); + } catch (FileNotFoundException ex) { + System.err.println("Couldn't open file: " + args[i]); + return; + } + String line = null; + try { + boolean first = true; + boolean heading = false; + String headingTxt = ""; + line = input.readLine(); + while (line != null) { + if ((line.length() > 0) && (line.length() < 36)) { + if (line.matches("...*[0-9].*")) { + System.out.println(""); + System.out.print("$$$"); + // book + System.out.print(line.substring(0, line.indexOf(' '))); + // chapter (or verse if no chapter) + System.out.print("/"+((line.indexOf(':') > 0) ? line.substring(line.indexOf(' ') + 1, line.indexOf(':')) : line.substring(line.indexOf(' ') + 1))); + // verse (if exists) + if (line.indexOf(':') > 0) { + System.out.print("/"+line.substring(line.indexOf(':') + 1)); + } + System.out.println(""); + if (headingTxt.length() > 0) { + System.out.println(""+headingTxt+""); + headingTxt = ""; + } + heading = false; + } + else { + heading = true; + } + first = true; + } + else { + String out = ""; + if (line.length() > 36) { + String word = line.substring(0, 25).trim(); + String parse = line.substring(25, 36).trim(); + String lemma = line.substring(36).trim(); + if (lemma.indexOf(' ') > 0) { + lemma = lemma.substring(0, lemma.indexOf(' ')) + "," + lemma.substring(lemma.lastIndexOf(' ')); + } + if (!first) { + // space between words + out += " "; + } else { + first = false; + } + out += "" + + bc.convertString(word). + substring(1) + ""; + } + if (heading) + headingTxt += out; + else + System.out.print(out); + } + + line = input.readLine(); + } + input.close(); + } catch (Exception ex1) { ex1.printStackTrace();} + } + } +} -- cgit