Importing the bible into version 2.5

V2.5 If you need help and cannot find it in the FAQ area of this forum feel free to ask the question and someone will reply back.

Moderators: webmaster, Christian, Kuok-Tim, ChrisClark, Forum Support

Importing the bible into version 2.5

Postby kck » Wed Jan 03, 2007 8:18 pm

Many of us have expressed a desire to have the Bible fully integrated within Zionworx and I know the guys are working on it.

In the meantime I have been experimenting to see whether it is practical to import it as if it were a set of songs. At the same time I've been trying to create a general song import script that is reasonably easy to use.

I don't claim to have the perfect solution but if you'd like to see how far I've got and perhaps try it for yourselves you can find the instructions and all the relevant files at http://www.steveprior.plus.com/zionworx/zionworxbibleimport.htm

At the moment there is a download file for the King James Version and I am very close to creating one for the World English Bible (mentioned elsewhere on this forum - for full details go to http://ebible.org/).

I'd appreciate any feedback on any part of this process. Please leave comments on this forum thread; the more detailed, the better.

Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

World English Bible import

Postby kck » Thu Jan 11, 2007 8:00 pm

Apologies for the delay. An import file for the World English Bible is now available from the same place - http://www.steveprior.plus.com/zionworx/zionworxbibleimport.htm

Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

Postby Brother Blonde » Tue Jul 17, 2007 6:48 am

Hi from Australia.

Thanks for your efforts in allowing us to import the Bible. I have followed the instructions from your website to the letter (I think) and all that happens is:

A backup of the data folder is made, with the current songs carried across to it. (I haven't loaded our songs into ZW yet, only the default sample ones)

The kjv.sdf file is changed to kjv.sdf.imported(within the \..\zionworks folder)

I'm not sure how to "see" the bible appear as songs within ZW.

Thanks for any help you can offer.

Andrew.
Be blessed and be a blessing.
Brother Blonde
Junior
 
Posts: 6
Joined: Sun Aug 01, 2004 6:17 am
Location: Sydney Australia

Importing the bible into version 2.5 as a set of songs

Postby kck » Sat Jul 21, 2007 8:47 am

Hi Andrew,

Sorry about the delay. Life's rather busy at the moment.
I'd almost forgotten about this since no-one responded to it. I was going to remove it.

If the process worked the bible would appear as as list of songs after all the existing songs. It ought to be obvious, especially as you've only got the default sample songs in. (The picture on the instructions page should give you some idea.

It sounds like the batch file got all the way to the end but didn't actually import the data. (It renames the file after trying to import the data).

Did you see any error messages?
Did you save the batch file, import file and the TurboDB Data Extractor in the same folder?
Did you close Zionworx before running the batch script?

What version of Windows are you using? I've only used it on XP. I have a feeling it won't work on earlier versions.

The bit that does the hard work is the line that says:
tdbDataX %%f %ddir%\MainTable.dat -fsdf -s= -q#

You can do this manually by opening a command window (Start->Run->cmd), changing to the Zionworx directory (cd C:\Program Files\Zionworx) and running tdbDataX (tdbDataX importfilename Data\MainTable.dat -fsdf -s= -q#)

Cheers,
Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

Postby Brother Blonde » Sat Jul 21, 2007 9:21 am

Gday Steve,

thanks for your reply. I'm glad you didn't delete the post.
I'm still having probs.
Windows XP,
All 3 files are in the \Zionworx folder
Zionworx not running.
Double click on the .bat file & get the MSDos(Boy that takes me back) window:

It opens the \ZW\data folder then says:
"backing up data directory to ....\ Data.backup1"
"13file(s) copied"
Data backed up to ....\ Data.backup1"
About to import song files

###Import process complete###
Press any key to continue

I do this (it took a while to find the "any" key, ha ha), and DOS goes away & I still can't get the Bible into ZW. I tired with the dummy songs to no avail. The only ones in there are the default songs.

I'm sure there's an easy fix, I just haven't found it.

Cheers, Andrew.
Be blessed and be a blessing.
Brother Blonde
Junior
 
Posts: 6
Joined: Sun Aug 01, 2004 6:17 am
Location: Sydney Australia

Postby Brother Blonde » Sat Jul 21, 2007 9:32 am

Sorry, forgot to mention, on the DOS page,
before importing each file it said,

"options must be preceded by '-'
type tdbDataX -H for help"

then it said

"importing xxx.sdf" (xxx = file name)

then the copyright info.

after the last file it said "complete" as in the above post.

Andrew.
Be blessed and be a blessing.
Brother Blonde
Junior
 
Posts: 6
Joined: Sun Aug 01, 2004 6:17 am
Location: Sydney Australia

Importing the bible into version 2.5 as a set of songs

Postby kck » Sat Jul 21, 2007 8:34 pm

When you run the script you should get a cmd (aka "DOS") window that shows something like the following:


Code: Select all
##########################################################
########                                          ########
########     Zionworx Songfile Import Process     ########
########                                          ########
##########################################################

Current directory is C:\Program Files\ZionWorx


Data directory is C:\TEMP\ZionworxTestData\

Press any key to continue . . .
Backing up data directory to ..\Data.backup1

12 File(s) copied
Data backed up to ..\Data.backup1

About to import song files

Importing web_olb.sdf

dataWeb Turbo Database Data Exchange Version 2.0.0 (TDB 7.0.4)
Copyright (c) 2005 dataWeb GmbH, Aicha, Germany
Homepage http://www.dataweb.de, Mail info@dataweb.de

Importing to C:\TEMP\ZionworxTestData\\MainTable.dat from web_olb.sdf:
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
......................................................
Batch move has moved 1252 records.

### Import process complete ###
Press any key to continue . . .



It looks like the problem is with the line that runs the tbdDataX.exe file.
Try opening the zionworximport.bat file in Notepad and checking line 115 (near the bottom). It should say exactly the following:
Code: Select all
tdbDataX %%f %ddir%\MainTable.dat -fsdf -s= -q#


I've just downloaded the script again and run it, getting the results shown above. I've also checked on the TurboDB website and the version of tdbDataX.exe I'm using appears to be the latest one. If you're using a version from elsewhere, try this one instead.

Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

Postby Brother Blonde » Sat Jul 21, 2007 11:30 pm

Steve,

here's the bat file info, as copied from notepad.


@echo off
REM Batch file for importing song files into Zionworx
REM To work properly it should be put in the directory
REM that normally contains the Zionworx.exe
REM file and is usually C:\Program Files\Zionworx


echo.
echo ##########################################################
echo ######## ########
echo ######## Zionworx Songfile Import Process ########
echo ######## ########
echo ##########################################################
echo.

echo Current directory is %CD%
echo.

REM Check for existence of Settings.ini
if not exist Settings.ini (
echo ERROR: Can't find Settings.ini.
echo Please check you have saved this file in the right place.
echo Import process abandoned.
echo.
pause
exit 1
)

REM Get path of database directory from Settings.ini file.
REM If it isn't defined there, use this default value.
set ddir=Data

REM First get line from ini file into temp file.
type "Settings.ini" | find "Database Path=" >xxx.txt

REM Read temp file, split at "=" and get second field into ddir variable.
for /f "usebackq tokens=1,2* delims==" %%i in (`type xxx.txt`) do set ddir=%%j

del xxx.txt

echo.
echo Data directory is %ddir%
echo.

REM Check for existence of ZionWorx.exe
if not exist ZionWorx.exe (
echo ERROR: Can't find ZionWorx.exe.
echo Please check you have saved this file in the right place.
echo Import process abandoned.
echo.
pause
exit 1
)


REM Check for existence of tdbDataX.exe
if not exist tdbDataX.exe (
echo ERROR: Can't find tdbDataX.exe. Import process abandoned.
echo.
pause
exit 1
)


REM Copy data directory and its subtree to Data.backup1.
REM If Data.backup1 exists, try Data.backup2, etc.

set origdir=%CD%

cd /D %ddir%

REM echo Current directory is now %CD%

set dircount=1

pause


:loop1
set backdir=..\Data.backup%dircount%
if exist %backdir% (
set /A dircount=%dircount% + 1

goto :loop1
)


echo Backing up data directory to %backdir%
echo.


xcopy "*.*" "%backdir%" /I /E /K /S /Q


if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Couldn't backup Data directory.
echo Import process abandoned.
echo.
pause
exit 1
)

echo Data backed up to %backdir%
echo.

cd /D %origdir%

echo About to import song files
echo.


for %%f in (*.sdf) do (
echo Importing %%f
tdbDataX %%f %ddir%\MainTable.dat -fsdf -s= -q#
REM Rename files after importing them so they aren't imported twice.
move %%f %%f.imported
)

echo ### Import process complete ###


pause

It all looks ok, I got all the files from your website, linked from the ZW forum. I keep having the same prob.

I'm sure we can fix it,

thanks for your help

Andrew.
Be blessed and be a blessing.
Brother Blonde
Junior
 
Posts: 6
Joined: Sun Aug 01, 2004 6:17 am
Location: Sydney Australia

Importing the bible into version 2.5 as a set of songs

Postby kck » Wed Jul 25, 2007 9:05 pm

Try just opening a command window, going to the Zionworx directory and just typing the tbdDataX command directly, without the variable names, and see what it says. (I'm a little confused by the "options must be preceded by '-'" bit).

e.g.
Code: Select all
tdbDataX xxx.sdf Data\MainTable.dat -fsdf -s= -q#


Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

Postby Brother Blonde » Thu Jul 26, 2007 12:13 am

Hi
I did that and had the message below.

<Importing to Data\MainTable.dat from kjv.sdf

opening table "MainTable.dat":

Cannot open table. Table not found or access denied: "Data\MainTable.dat"

Type tdbDataX -h for help>


i tried manually re naming the maintable to maintable.dat to no avail.

I even ensured the "T" in "table" was uppercase in the cmd line, as in the error msg. (it is uppercase in windows explorer)

I uninstalled and re installed ZW to no avail.

I re downloded your programs to no avail.

Can't think of anything else.

Thanks,
Andrew.
Be blessed and be a blessing.
Brother Blonde
Junior
 
Posts: 6
Joined: Sun Aug 01, 2004 6:17 am
Location: Sydney Australia

Importing the bible into version 2.5 as a set of songs

Postby kck » Sun Aug 05, 2007 6:37 am

Hi Andrew,

Can you post a listing of the contents of your Data directory and also the directory where you've put the script, etc.?

Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK

Postby philmwebb » Thu Sep 06, 2007 5:26 pm

I experienced the same problem and resolved it by putting quotes around %ddir%\MainTable.dat in the call to tdbDataX to overcome the problem of the space in the data directory (e.g. C:\Program Files\ZionWorx\Data):

Code: Select all
tdbDataX %%f "%ddir%\MainTable.dat" -fsdf -s= -q#


Hope this helps
Phil
philmwebb
Junior
 
Posts: 3
Joined: Sat Feb 11, 2006 7:46 pm
Location: Gloucester, UK

Importing the bible into version 2.5

Postby kck » Fri Sep 14, 2007 6:16 pm

Thanks Phil. I'll change the script and try it again myself.

Andrew - does that work for you?

Steve
kck
Senior
 
Posts: 57
Joined: Mon Jul 12, 2004 3:39 pm
Location: Cumbria, UK


Return to Zionworx V2.5 Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron