summaryrefslogtreecommitdiffstats
path: root/modules/hebrew-wlc
diff options
context:
space:
mode:
authorMartin Gruner <mg.pub@gmx.net>2004-06-04 12:49:16 +0000
committerMartin Gruner <mg.pub@gmx.net>2004-06-04 12:49:16 +0000
commitce1ee7f0f733f4576171887c530ccb5b3954cd1e (patch)
treedff4b04ac7db1ae9eb7559683b7c07aad11514d5 /modules/hebrew-wlc
parent1b4907ef4310be86946da07b2f74d186ef5088f6 (diff)
downloadsword-tools-ce1ee7f0f733f4576171887c530ccb5b3954cd1e.tar.gz
mgruner: now processes into a single xml file. still buggy, no osis yet.
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@17 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/hebrew-wlc')
-rw-r--r--modules/hebrew-wlc/WLC2OSIS/Makefile4
-rw-r--r--modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java18
-rw-r--r--modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java9
-rw-r--r--modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Header.java2
-rw-r--r--modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/WLC2OSIS.java34
5 files changed, 33 insertions, 34 deletions
diff --git a/modules/hebrew-wlc/WLC2OSIS/Makefile b/modules/hebrew-wlc/WLC2OSIS/Makefile
index 2ab3871..15da210 100644
--- a/modules/hebrew-wlc/WLC2OSIS/Makefile
+++ b/modules/hebrew-wlc/WLC2OSIS/Makefile
@@ -71,10 +71,10 @@ VERSION = CHANGE_ME
PACKAGES = \
Utilities \
WLC2OSIS.Utilities \
- WLC2OSIS \
WLC2OSIS.Parse \
WLC2OSIS.Translate \
- WLC2OSIS.GUI
+ WLC2OSIS.GUI \
+ WLC2OSIS
# Resource packages
diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java
index 036fafb..a02597f 100644
--- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java
+++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Books.java
@@ -2,7 +2,7 @@ package WLC2OSIS.Parse ;
import WLC2OSIS.* ;
import WLC2OSIS.Translate.* ;
-import WLC2OSIS.Utilities.* ;
+//import WLC2OSIS.Utilities.* ;
//==============================================================================
/**
* <b>Processes books.</b>
@@ -16,7 +16,6 @@ WLC2OSIS A ;
Parser P ;
public BookName[] BookNames ;
BookName BookObject ;
-String Filename ;
//-----------------------------------------------------------------------------
public Books(WLC2OSIS A, Parser P ) {
@@ -38,17 +37,8 @@ public void start(String BookCode){
//-----------------------------------------------------------------------------
-// Begin writing the book as a file
+// Begin writing the book into the existing file
- Filename = BookObject.filename ;
-
- A.w = new XMLWriter(A.OutputDirectory, Filename, "Tanach",
- "Tanach", "" ) ;
-
-// Write the header
- Header.writeHeader(A, A.w) ;
-
-//-----------------------------------------------------------------------------
P.ChapterNumber = 0 ;
P.VerseNumber = 0 ;
@@ -81,8 +71,8 @@ public void end(){
// Add the transcription notes.
Note.writeNotes(A.w) ;
- A.w.close() ;
- System.out.println( Filename + ".xml has been written." ) ;
+// A.w.close() ;
+ System.out.println( BookObject.filename + " has been written." ) ;
}
}
//----------------------------------------------------------------------------
diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java
index fd726a5..086109a 100644
--- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java
+++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Parse/Parser.java
@@ -2,6 +2,7 @@ package WLC2OSIS.Parse ;
import WLC2OSIS.* ;
import WLC2OSIS.Translate.* ;
+import WLC2OSIS.Utilities.* ;
//==============================================================================
/**
* <b>Parser dispatches tokens to Books, Chapters, Markers, Tanach,
@@ -84,7 +85,15 @@ public void parse(){
String s ;
boolean PreviousEOL = true ;
System.out.println("\n") ;
+
+ A.w = new XMLWriter(A.OutputDirectory, "WLC_OSIS", "Tanach", "Tanach", "" ) ;
+
+ // Write the header
+ Header.writeHeader(A, A.w) ;
+
tanach.start() ;
+
+
for (int k = 0; k < A.InputChars.length ; k++){
s = t.nextToken() ;
diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Header.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Header.java
index 1052d0d..9260fa1 100644
--- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Header.java
+++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/Translate/Header.java
@@ -33,7 +33,7 @@ public static void writeHeader(WLC2OSIS A, XMLWriter w) {
for (int i =0; i < A.Description.length; i++){
A.w.writeString("description", 1, A.Description[i]) ;
}
- A.w.writeString("date", 1, A.Date) ;
+ //A.w.writeString("date", 1, A.Date) ;
A.w.writeString("transcriptiondate", 1, DateTime) ;
A.w.writeString("copyright", 1, "\u00A9 C. V. Kimball 2004") ;
A.w.writeString("filename", 1, A.InputFilename) ;
diff --git a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/WLC2OSIS.java b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/WLC2OSIS.java
index bb404c3..a1f117a 100644
--- a/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/WLC2OSIS.java
+++ b/modules/hebrew-wlc/WLC2OSIS/WLC2OSIS/WLC2OSIS.java
@@ -24,11 +24,11 @@ public class WLC2OSIS implements Stoppable {
// Definitions of input and output to be set by user.
public String ProgramDate = "30 May 2004" ;
-public String DefaultInputFilename = "" ;
-public String InputFilename ;
+public String DefaultInputFilename = "/home/Martin/dev/swordtools/modules/hebrew-wlc/" ;
+public String InputFilename;
public String DefaultInputDate = "5 March 2004" ;
public String Date ;
-public String DefaultOutputDirectory = "" ;
+public String DefaultOutputDirectory = "/home/Martin/KDesktop/" ;
public String OutputDirectory ;
// Define the title and descriptions.
public String Title = "The Westminster Leningrad Codex (WLC)" ;
@@ -109,7 +109,7 @@ public WLC2OSIS( Container InputContainer ){
F.bar("=", 80) ;
System.out.println("\nWLC2OSIS: " + Title + " " + ShortDescription ) ;
System.out.println("\nInput file: " + InputFilename ) ;
- System.out.println( "Input file date: " + Date ) ;
+// System.out.println( "Input file date: " + Date ) ;
System.out.println("\nOutput directory: " + OutputDirectory ) ;
FileRead FR = new FileRead(this) ;
@@ -120,10 +120,10 @@ public WLC2OSIS( Container InputContainer ){
//L5253W.L\"815253)5253]4
//YI&:RF)\"80L
- if(false){
- String TestString = "HA/$.FMA73YIM" ;
- Test.test(this, TestString) ;
- }
+// if(false){
+// String TestString = "HA/$.FMA73YIM" ;
+// Test.test(this, TestString) ;
+// }
//-----------------------------------------------------------------------------
// Read, parse, and write the book files.
@@ -133,8 +133,8 @@ public WLC2OSIS( Container InputContainer ){
// Write the Tanach.xml file
- Index.writeIndex(this) ;
- System.out.println("\nThe index file, Tanach.xml, has been written.\n") ;
+// Index.writeIndex(this) ;
+// System.out.println("\nThe index file, Tanach.xml, has been written.\n") ;
//-----------------------------------------------------------------------------
M.doneMessage() ;
@@ -142,13 +142,13 @@ public WLC2OSIS( Container InputContainer ){
// Launch the browser on Tanach.xml
- try{
- BrowserLauncher.openURL("file:\\" + OutputDirectory
- + File.separator + "Tanach.xml") ;
- }
- catch(IOException e){
- System.out.println("WLC2OSIS: Couldn't launch browser.") ;
- }
+// try{
+// BrowserLauncher.openURL("file:\\" + OutputDirectory
+// + File.separator + "Tanach.xml") ;
+// }
+// catch(IOException e){
+// System.out.println("WLC2OSIS: Couldn't launch browser.") ;
+// }
done() ;
}