[sword-devel] ncurses front end

sword-devel@crosswire.org sword-devel@crosswire.org
Sun, 30 Jul 2000 21:33:13 -0400 (EDT)


Troy A. Griffitts wrote:
> 
> Went to update my ncurses version with webfind and notices zebra in the
> list of RPMs I could download.  I was excited for a second, but then
> read the description:
> 
> "Zebra is a free software that manages TCP/IP based routing protocol.
> It takes multi-server and multi-thread approach to resolve the current
> complexity of the Internet. Zebra supports RIPv1, RIPv2 and BGP-4 and
> will support OSPFv2.  Zebra works as Route Server and Route
> Reflector. IPv6 is also supported, so zebra can speak BGP4+ and RIPng."

Yes, well I suppose I should have searched harder to ensure that I
was choosing a unique name.

> 
> In any case, got ncurses-5.0-11 and things compiled just fine.  Looks
> like a good start.  I was able to change modules and search (though I
> believe it only took the first word that I typed).  I wasn't able to
> figure out how to select any of the search results, though.  Lookup of
> 'jn 3:16' seems to take me to the book of John but the screen didn't
> refresh until after I tried + or - after the lookup.
>
Yes, I do need to fix the code so that it will update the screen
immediately.
Only the text of the search results are displayed.  I didn't include
any way to automatically lookup any of the search results.
I suppose I need to rethink how input should be parsed.
The way I did it, input comes in from keyboard, command line string
or standard input, and is parsed in a space seperated manner.
so typing jn 3:16 on a lookup is simply read in as jn
jn3:16 parsed as john 3:16.
similarly searches are single word searches.

How should something like : zebra -c s peace l l
as I have implemented this, this parses as: search for word "peace"
look up Leviticus 1:1.

What would be a good syntax?

 
> Looking in the code, it seems that you even have support for saving
> personal commentary.  That's cool.
I pretty much just copied it in and did a few changes.  I don't think it works
yet.

> I wonder if the old dos-based OLB software might be a good interface
> reference.  I remember getting pretty good at moving around in that
> software.

I have never used any bible study software. (excluding the sword stuff.)
I really don't have any examples to follow. 
 
> I'm excited to see what others think and where this goes!  Thank you for
> contributing your time and talents!
> 
> 	-Troy.
> 
> 
> raholcom@eos.ncsu.edu wrote:
> > 
> > It definitely won't compile with version 4 of curses.  I have both
> > ncurses-devel-5.0-11
> > ncurses-5.0-11
> > 
> > installed.
> > I'll try to  build a statically linked version soon.
> > 
> > Troy A. Griffitts wrote:
> > >
> > > This is a multi-part message in MIME format.
> > > --------------3FFBEC5DFDD7183058777525
> > > Content-Type: text/plain; charset=us-ascii
> > > Content-Transfer-Encoding: 7bit
> > >
> > > > I would like to ask a second time if there is any interest
> > > > in an ncurses based front end to sword.
> > >
> > > I'm interested.  I think it would be really cool!  I can't seem to get
> > > it to work on my machine though.  It won't compile, I think, due to my
> > > curses version.  What do I need to compile the program?
> > >
> > > When I installed the rpm, it core dumps-- I'm thinking due to a mismatch
> > > of libsword.so versions.  Could you build a statically linked version?
> > >
> > >       Thanks!!!
> > >               -Troy.
> > >
> > > >
> > > > I have put together  a rough  but functioning (barely) ncurses
> > > > based interface to sword.
> > > >
> > > > I have rather arbitrily started calling it zebra.  I looked closely
> > > > at cheatah in throwing this together, but this is text only (black and white)
> > > > so zebra seemed reasonable.
> > > >
> > > > What are the advantages of a program like zebra.
> > > >
> > > > Sometimes you  only have a text based connection to a machine on which
> > > > you can install software (telnet).
> > > >
> > > > some machines may have very limited graphical capabilities.
> > > > (hand held devices, although I don't know that sword runs on any
> > > > such devices yet.)
> > > >
> > > > Interfacing to other programs such as text editors or scripts.
> > > >
> > > > It can be called on the commandline, or interact through
> > > > standard io.  This means that it interfaces well with other programs.
> > > >
> > > > simply typing :  zebra
> > > >
> > > > gets me the ncurses interface.
> > > >
> > > > I can type :  zebra -c l James1:1
> > > >
> > > > and I get:
> > > >
> > > >  James, a servant of God and of the Lord Jesus Christ, sends words of love to the twelve tribes of the Jews living in all parts of the earth.
> > > >
> > > > alternatively,
> > > > I can type: echo "l James1:1"|zebra -f
> > > > to get the same results.
> > > >
> > > > In particular I have written an emacs mode.  This means that you
> > > > can easily insert biblical reference while writing a file.
> > > >
> > > > When I have sword,zebra, and my emacs mode loaded, then while I am
> > > > editing in an emacs buffer, I can type cntrl C, l, and then type
> > > > James1:1, and get the verse in my emacs buffer.
> > > >
> > > > Similarly you can do searches, read commentaries , write personal commentaries
> > > > (I haven't tested writing to personal commentary yet.)
> > > >
> > > > If I decided that I needed to do a regular expression search, even
> > > > though regular expresion searching isn't implemented yet, I can copy
> > > > the entire bible to a buffer: cntrl C l, then gen1:1-Rev22:21
> > > > I then have my editor do the regular expression search.
> > > >
> > > > The point is that the added flexibility of such an interface permits
> > > > the use of many other independently developed tools with the interface.
> > > >
> > > > anyway if you run linux you can try it at:
> > > >
> > > > http://www4.ncsu.edu/unity/users/r/raholcom/www/zebra/index.html
> > > > where there are srpm,rpm, and tgz format install files available
> > > >
> > > > -------------------------
> > > >
> > > > There is much work that should be done to this code.
> > > >
> > > > example:
> > > >
> > > > Can someone explain why, if I declare and construct a VerseKey *vk
> > > > and then do :
> > > >
> > > > VerseKey copykey=vk->clone();
> > > >
> > > > or even
> > > >
> > > > VerseKey copykey=vk;
> > > >
> > > > All the information from vk is copied to copykey, except that chapter
> > > > and verse are set to 1.  The Book number, and everything else gets copied
> > > > to copykey.
> > > > So right now I have in my code, the very ugly:
> > > >
> > > > VerseKey copykey=vk->clone();
> > > > copykey.Chapter(vk->Chapter());
> > > > copykey.Verse(vk->Verse());
> > > >
> > > > --------------------
> > > > completely unrelated to anything else in this email:
> > > >
> > > > Is there any interest or effort in having sword compile for other machines?
> > > > It sounded like there was interest in palm, but what about other
> > > > operating systems like : mac os, bsd, solaris...
> > > >
> > > > Richard Holcombe
> > > --------------3FFBEC5DFDD7183058777525
> > > Content-Type: text/x-vcard; charset=us-ascii;
> > >  name="scribe.vcf"
> > > Content-Transfer-Encoding: 7bit
> > > Content-Description: Card for Troy A. Griffitts
> > > Content-Disposition: attachment;
> > >  filename="scribe.vcf"
> > >
> > > begin:vcard
> > > n:Griffitts;Troy A.
> > > tel;cell:(602) 628-7771
> > > tel;fax:(480) 926-8939
> > > tel;work:(480) 926-4500 Ext. 212
> > > x-mozilla-html:FALSE
> > > org:Evergreen;Java Development Group
> > > adr:;;3260 North Colorado;Chandler;AZ;85225;US
> > > version:2.1
> > > email;internet:troy@evergreen.com
> > > title:Sr. Software Architect / Engineer
> > > x-mozilla-cpt:;26144
> > > fn:Troy A. Griffitts
> > > end:vcard
> > >
> > > --------------3FFBEC5DFDD7183058777525--
> > >
> > >
> > 
> > Richard Holcombe
> 

Richard Holcombe