Xsword/Cheatah Bible reader

Word processors, spreadsheets, presentations, translation, etc.
Post Reply
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

Xsword/Cheatah Bible reader

#1 Post by disciple »

Requires the Sword library from here
You might want to install psword from there as well, as it has a convenient way to install Bibles. But what about installing other things? Hmmm.

Cheatah was originally part of the Sword project but I gather they dropped it after more Linux guis became available. Apparently Gnomesword was originally based on it too.

Development was supposed to be continuing under the name xsword, and this is the most recent development version - it hasn't been touched for a couple of years, and the "cheatah" name is all through it still. (FWIW there was a RC windows build with a third name :) )

I had to edit the source ever so slightly to get it to compile.

Enhancing this would be a great project for someone :) The web page suggested stuff could be backported from Gnomesword, but I'm not sure how feasible that really is.

BTW my preferred Bible software is e-Sword 7.x under Wine... but I'm not familiar with the big KDE and Gnome Sword frontends.
Attachments
xsword_src.tar.bz2
The source - you probably don't want this
(23.82 KiB) Downloaded 850 times
xsword-cheatah.pet
(16.61 KiB) Downloaded 955 times
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dawnsboy

#2 Post by dawnsboy »

I like it! For two simple reasons. The interface loaded very quickly with bible text loaded. All of the text displays in the window without need for side scrolling. Psword is a fine little sword interface that works very well on my Eeepc 701 but I either need to side scroll to read the text (due to the small screen on the 701) or load the program and then send the text out to leafpad (which is great, I am glad that plinej added that function). It is however nice just to be able to use a quick loading program and read the text right off. I shall keep a copy of both at hand.

Thanks.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

BTW if anyone was going to work on this, IMO the first thing to do would be to allow you to specify a search range, and the second thing would possibly be to add a tree to navigate the Bible on the left hand side, like e-sword's old one.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#4 Post by amigo »

disciple, can you tell me where you found the xsword/cheatah archive?

I found a sourceforge project which may be the one you found, but the archive I got was inclomplete.
Interestingly, I found sources for cheatah inside older versions of the sword libs -up to 1.5.7. But, they use GTK-1.2 instead of GTK-2. I am working on getting them to compile as they may be handy for users on older Puppy versions or other GTK1-only systems.
I'd like to have the link to the original archive you found so I can see what changes you made. It is very bad form to distribute hacked sources without a way for the user to know what changes you make. Preferably, you'd provide the original sources with a 'diff' of your changes. this keeps you from having to host bth original and modified sources.

BTW, there is also a WxSword (WxWidgets) frontend in the older sword sources. But, I think that it and the old GTK-1.2 cheatah are not compatible with the current sword libs. The newer cheatah you found is based on the older one, but there are many changes.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#5 Post by disciple »

I downloaded it from sourceforge svn.
It is very bad form to distribute hacked sources without a way for the user to know what changes you make.
Yes :oops: ; I'm trying to avoid computer screens as much as possible due to a little eye trouble, and I wanted to post the version I compiled ASAP in case the person I was talking to in a thread about Sword and esword wanted it. When I get home I'll download from svn again and make a diff.

Yes, I did a little hacking to get WxSword to compile, but it wouldn't search or navigate, and it didn't look any better than cheatah, so I gave up on it.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post by amigo »

Meanwhile, I looked closer at your archive and found the cvs URL in the files themselves...
So I grabbed the last CVS as well. Here's a diff of your changes, I believe:

Code: Select all

diff -pruN xsword-svn-31/cheatsig.cpp cheatah/cheatsig.cpp
--- xsword-svn-31/cheatsig.cpp	2009-05-10 19:09:42.000000000 +0200
+++ cheatah/cheatsig.cpp	2009-05-09 12:48:39.000000000 +0200
@@ -8,7 +8,7 @@
 #include <gtk/gtk.h>
 #include "cheatah.h"
 #include "cheatsig.h"
-
+#include <assert.h>
 using sword::ModMap;
 using sword::SectionMap;
 using sword::ConfigEntMap;
@@ -152,7 +152,7 @@ on_About_activate                      (
 	mainMgr=cheatahWindow->getSwordManager();
 	int i;
 	char *tempString;
-	static char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"};
+	static const char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"};
 	string newtext, tmptext;
 	ModMap::iterator it;
 	SectionMap::iterator sit;
I haven't tried the WxSword yet. It may be not working because of the WxWidgets version. Which version are you compiling against?

I isolated the sources for the original GTK-1.2 version from the sword-1.5.3 sources. And there is a slightly updated version of 'cheatah' in sword-1.5.6. However, it does not compile correctly. I got the original version (with a couple of fixes) to work with sword versions up to 1.5.5.

Maybe what would be even more interesting would be to get the 'diatheke' CGI working so the user could simply use their browser.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

diff -r xsword/trunk/cheatsig.cpp /root/xsword/trunk/cheatsig.cpp
11c11
<
---
> #include <assert.h>
155c155
< static char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"};
---
> static const char *modtypes[] = {"Biblical Texts", "Commentaries", "Lexicons / Dictionaries"};
I thought there were more places I added that "const" (It is required for newer libc or something), but maybe that was for wxSword... in which case I think it might not actually have been needed to compile xsword - for xsword I may have just added it to get rid of a warning message... I can't remember now.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

I haven't tried the WxSword yet. It may be not working because of the WxWidgets version. Which version are you compiling against?
The unicode wxgtk 2.8.9 that I posted at http://www.murga-linux.com/puppy/viewtopic.php?t=35224 and compile everything against because it is compatible with the (Fedora?) hugin package I use, because I can't get hugin to compile in Puppy :)
I suspect the problem is my sword version is too recent though.
Maybe what would be even more interesting would be to get the 'diatheke' CGI working so the user could simply use their browser.
Only if it has better features... otherwise I'd personally much prefer a standalone app :)
Much as I like GTK1.2, I can't help thinking you're wasting your time trying to hack things to work with it... how many people do you think still don't have GTK2.x, and will want to use xsword? And how much much of a speed improvement would it be for someone who ran the GTK1.2 version by choice?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#9 Post by amigo »

I am nuts about GTK-1.2 -I mean I have the largest collection of old GTK stuff ever put together in one place. So I am always interested in adding to the collection. GTK-1.2 is still the only lightweight libs ever written which had a huge number of apps written for it. And there are still many commercial apps which require it. If my C skills were better I'd fix the very few things that are wrong or missing(proper utf/unicode handling and bidi text).
I have around 1000 apps for GTK-1.2 and most of them are tiny. They nearly all start *immediately* even on old hardware -without running from ARM or other tricks -I mean they are truly lightweight -both in size and RAM usage. Nearly all these apps require about one-half second startup time, or less, even on PII hardware.

To get WxSword to work, you'd probably need to use sword 1.5.3-to-1.5.5. And from the time frame, it would be more likely to work with WxGTK-2.4 -it could always be compiled in statically.

The thing about using the CGI is that I already have a light web-based desktop. By using thttpd and dillo, you can access all the apps you want without using anymore RAM for the frontend. You've probably seen techono's web desktop -what I have is like that, excpet that the apps are all on the system. Pointing the browser at localhost gives you acces to a lot of different apps -some are just CGI scripts to run commands, but many are real web-services. imagine techno's web-page, but with all those apps installed right on your disk.
It's a very slick way to create a kiosk-like environment and you can create apps which are as attractrive and functional as you like all in HTML and bash(for the CGI's).

i'm glad you found that GTK-2 version as it saves one having to install so much gnome stuff. I still think a web-based frontend might be really great I see that debian patches and uses the diatheke CGI app, so I think it is probably up-to-date -I mean that all the sword features are probably available which they are not for 'cheatah'.

Oh, and the 'const' changes you made seemd to make no difference here when compiling 'cheatah'.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#10 Post by disciple »

Oh, and the 'const' changes you made seemd to make no difference here when compiling 'cheatah'.
What system are you compiling in these days? An old puppy? Something else?
If it was Puppy 4.1.x it would at least get rid of a warning message.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#11 Post by amigo »

I'm usually compiling on a very hacked Slack-11.0 system -that means gcc-3.4.6 and glibc-2.3.6. Probably the errors/warnings you get are related to your gcc version.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#12 Post by disciple »

Yes, I read somewhere that it is a feature of the newer glibc or gcc or something (I forgot). It's something to keep in mind, as you'll probably end up needing to make similar changes to things if you ever upgrade glibc or whatever it was.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Xsword compiled on Lucid

#13 Post by Ibidem »

Well, I got xsword/cheatah to compile on Lucid (Lynx, not Puppy) with Sword 1.6.1 and standard libgtk2.0-dev.
It required one change in the makefile to compile: running "make" failed with the error "error: ‘GTK_SIGNAL_FUNC’ was not declared in this scope"
I looked around and found that GTK_SIGNAL_FUNC is deprecated, so I removed the flag -DGTK_DISABLE_DEPRECATED, which made it work.

One note, though: Unicode conversion is somewhat nonfunctional so you can't read the Apostle's Bible. Other ones work, though.
I aim to see how it works on Lucid Puppy, once I get libsword installed.

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Bible manager for Xsword

#14 Post by Ibidem »

I decided that requiring diatheke to use Psword as a bible manager for Xsword was not to my own taste, so I hacked Psword into a plain bible manager.
Basically I commented out/removed anything not pertaining to the package management parts (main interface & the reader), and changed every "psword &" to "$0 &" (which launches the program itself, no matter what it's been named).
It still requires the psword infrastructure.


I'm also attaching xsword.desktop, stripped xsword binary, & xsword.xpm in the same tarball. I haven't figured out making PETs yet, so it's just plain .tar.bz2

Please note that the binary was compiled on Ubuntu (Lucid Lynx), against the default libsword8 (1.6.1). I'd expect it to only run if you install libsword8 and a few dependencies manually on Lucid Puppy.

But the xsword.desktop and .xpm may be of interest to others.

Ibidem
Attachments
xsword-misc.tar.bz2
(20.73 KiB) Downloaded 770 times

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Re: Bible manager for Xsword

#15 Post by Ibidem »

Well, I packaged Xsword + Psword + this little script + all the dependencies for Lucid Puppy.
Here it is. I think it may be the quickest way to add a Bible manager to Lucid Puppy.

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#16 Post by Ibidem »

amigo wrote: The thing about using the CGI is that I already have a light web-based desktop. By using thttpd and dillo, you can access all the apps you want without using anymore RAM for the frontend. You've probably seen techono's web desktop -what I have is like that, excpet that the apps are all on the system. Pointing the browser at localhost gives you acces to a lot of different apps -some are just CGI scripts to run commands, but many are real web-services. imagine techno's web-page, but with all those apps installed right on your disk.
It's a very slick way to create a kiosk-like environment and you can create apps which are as attractrive and functional as you like all in HTML and bash(for the CGI's).
I think pbiblx2 sounds like what you describe.
http://www.murga-linux.com/puppy/viewtopic.php?t=55681

Post Reply