[sword-devel] How do I install cipher keys

sword-devel@crosswire.org sword-devel@crosswire.org
Mon, 31 Jan 2000 15:37:09 +1300 (NZDT)


Hi,

I have compiled the sword library version 1.4.6 and successfully compiled
it.  I copied the sapphire.h and the sapphire.cpp to their respective
directories before compiling.

In trying to use the NIV translation I modified the testlib.cpp to the
following:

------------------------------------------------------------------------
#include <stdio.h>
#include <iostream.h>
#include <versekey.h>
#include <rawtext.h>
#include <zcom.h>
#include <rawcom.h>
#include <rawgbf.h>
#include <stdlib.h>
#include <rawfiles.h>


int main(int argc, char **argv)
{
	int loop;
	int max;
//	RawText text("src/modules/texts/rawtext/sve/", "Sven Text", "Sven Text");
//	RawText text("/usr/local/sword/modules/texts/rawtext/ylt/", "Young's Literal", "Young's Literal");
	RawText text("/usr/local/sword/modules/texts/rawtext/niv/", "NIV","NIV");
//	RawText text("src/modules/texts/rawtext/webster/", "Webster", "Webster Text");
//	RawText text("src/modules/texts/rawtext/orthjbc/", "Webster", "Webster Text");
//	RawGBF text("src/modules/texts/rawgbf/newtext/", "WEB", "World English Bible");
//	RawText text("src/modules/texts/rawtext/kjv/", "KJV", "KJV Text");
//	RawText text("src/modules/texts/rawtext/vnt/", "VNT", "Valera Spanish NT");
//	RawCom  commentary("src/modules/comments/rawcom/rwp/", "RWP", "Robertson's Word Pictures");
	RawCom  commentary("src/modules/comments/rawcom/mhc/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
//	RawFiles  commentary("src/modules/comments/rawfiles/personal/", "MHC", "Matthew Henry's Commentary on the Whole Bible");
	VerseKey mykey;


	if (argc > 3)
		mykey.AutoNormalize(0);  // Turn off autonormalize if 3 args to allow for intros
				// This is kludgy but at lease you can try it
				// with something like: sword "Matthew 1:0" 1 1


	mykey = (argc < 2) ? "James    1:19" : argv[1];
	mykey.Persist(1);
	text.SetKey(mykey);
	commentary.SetKey(mykey);


	max = (argc < 3) ? 1 : atoi(argv[2]);


	cout << "\n";


	for (loop = 0; loop < max; loop++) {
		cout << (SWKey &)text << ":\n";
		text.Display();
		cout << "\n";
		cout << "-------------\n";
		commentary.Display();
		cout << "\n";
		cout << "==========================\n";
		mykey++;
	}
	cout << "\n\n";
}

------------------------------------------------------------------------

The output generated from running the program is ...


James 1:19:
E<8E><DC><F1>6L<C2><B1>(%<E5><B6>|r<E9>i^R<81>`<DF>^W<82>+DV<D3>'<8F><AD>#^Up
<A3>
C5<F4>v_<B9><AB><AD>\L<D9><E4>^U<A8><A7><C3><B5><82>b}^K^Z<C5>W<A1>^Z<8E>
<C1><83><8B>_9<BD><E8><90>I<CA>]<D2>m6<8E>CI<AB>3V^L^Vbx^CM<A7><97>^E<D2><9F>e
<AC>?^EJ<F5>&^E<B8>ec<F5><88><CF><E2>I<96>^OC<EA>
-------------

==========================


Well this above is what it looks like after I have redirected the output
to a file and then viewed it using 'less' 

I have changed the cipher key from within the mods.conf directory from the
same directory as the testlib program is being run.  

[Globals]
AutoInstall=./newmods/

[-+*Personal*+-]
DataPath=/usr/local/sword/modules/comments/rawfiles/personal/
ModDrv=RawFiles
Description=Personal Commentary
About=This module allows you to store your own commentary.

[NIV]
DataPath=/usr/local/sword/modules/texts/rawtext/niv/
ModDrv=RawGBF
SourceType=GBF
CipherKey=7534pTkw8413iBrX
Version=1.1
History_1.1=enciphered module


Description=The New International Version
About=\qc -=+* see the file errata.doc for important verse descrepencies *+=- \par\par\pard \
Quotations designated (NIV) are from \par\par \
THE HOLY BIBLE: NEW INTERNATIONAL VERSION®. \par \
Copyright © 1973, 1978, 1984 by International Bible Society; \
Zondervan Publishing House. All rights reserved.  \par\par \
The "NIV" and "New International Version" trademarks are registered in \
the United States Patent and Trademark Office by International Bible \
Society.  \par\par \
The NIV text may be quoted in any form (written, visual, electronic, or \
audio), up to and inclusive of five hundred (500) verses or less without \
written permission, providing the verses quoted do not amount to a \
complete book of the Bible, do not comprise 25% or more of the total \
text of the work in which they are quoted, and the verses are not being \
quoted in a commentary or other Biblical reference work. This \
permission is contingent upon an appropriate copyright acknowledgment. \par\par \
The NIV database is not a shareware program and may not be \
duplicated.  \par\par\pard


----------------------------------------------------------------------

Still no good.  Can anyone help?

Regards
Glenn.