On Thu, 2003-01-09 at 01:10, Troy A. Griffitts wrote:
> Ok everyone,
> 
>       There is an updated version of the SWORD API that deals with the OSIS 
> markup in the KJV2003 project.  It is only available via cvs at the 
> moment, and only the RTF filters support it.  My hope is that the 
> Bibletime or Gnomesword guys will have a chance to look at gbfrtf.cpp 
> and apply the same changes to the gbfhtml*.cpp filters.  A new windows 
> binary built against the newest code dubbed 1.5.5a has replaced 1.5.5 
> and the _Starter Pack_ bundle has changed in the following ways:
> 

Troy,

Here is a patch for gbfhtmlhref.cpp. Hope it works :)

> KJV has been changed to use a snapshot of the KJV2003 text.
> 
> Thayer has been replaced with StrongsGreek.
> 
> The Robinson module has been added to handle the new morphology tags 
> that Thayer used to handle for the 'upper level Strong's numbers' that 
> were in the old text KJV text.
> 
> BDB has been replaced with StrongsHebrew
> 
> Person Commentary module has been left unchanged.
> 
> 
> Also the Thayer and BDB modules have been removed from our public 
> circulation but are still in our module list.  If the user requests 
> them, they will be directed to the organization claiming copyright on 
> them, like all of our other restricted modules.
> 
> I hope this satisfies everyone.  I realize that the KJV2003 project 
> isn't yet complete and it is unfortunate that we must release it in it's 
> unfinished state.  My hope is to make frequent updated releases of the 
> new KJV module as the project progresses.
> 
>       In the Grace of Our Lord,
> 
>               -Troy.
> 
> 
> 

-- 
Terry Biggs <[EMAIL PROTECTED]>
Grace Baptist Church
--- /home/terry/Projects/sword/src/modules/filters/gbfhtmlhref.cpp      2003-01-09 
13:20:28.000000000 -0500
+++ /home/terry/Projects/sword/src/modules/filters/gbfhtmlhref.cpp-0    2003-01-09 
+13:04:42.000000000 -0500
@@ -18,6 +18,10 @@
 #include <stdlib.h>
 #include <string.h>
 #include <gbfhtmlhref.h>
+#include <ctype.h>
+#include <string>
+
+using std::string;
 
 SWORD_NAMESPACE_START
 
@@ -61,9 +65,69 @@
 
 bool GBFHTMLHREF::handleToken(char **buf, const char *token, DualStringMap &userData) 
{
        const char *tok;
-
-       if (!substituteToken(buf, token)) {
-               if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // 
strong's numbers
+       char val[128];
+       char *valto;
+       char *num;
+
+       if (!substituteToken(buf, token)) {             
+               // deal with OSIS note tags.  Just hide till OSISRTF            
+               if (!strncmp(token, "note ", 5)) {
+                       // let's stop text from going to output
+                       userData["suspendTextPassThru"] = "true";
+               }
+               
+               else if (!strncmp(token, "/note", 5)) {
+                       userData["suspendTextPassThru"] = "false";
+               }               
+
+               else if (!strncmp(token, "w", 1)) {
+                       // OSIS Word (temporary until OSISRTF is done)
+                       valto = val;
+                       num = strstr(token, "lemma=\"x-Strongs:");
+                       if (num) {
+                               for (num+=17; ((*num) && (*num != '\"')); num++)
+                                       *valto++ = *num;
+                               *valto = 0;
+                               if (atoi((!isdigit(*val))?val+1:val) < 5627) {
+                                       pushString(buf, " <small><em>&lt;<a 
+href=\"type=Strongs value=");
+                                       for (tok = (!isdigit(*val))?val+1:val; *tok; 
+tok++)
+                                                       *(*buf)++ = *tok;
+                                       *(*buf)++ = '\"';
+                                       *(*buf)++ = '>';
+                                       for (tok = (!isdigit(*val))?val+1:val; *tok; 
+tok++)
+                                                       *(*buf)++ = *tok;
+                                       pushString(buf, "</a>&gt;</em></small> ");
+                                       //cout << buf;
+                                       
+                               }
+                               /*      forget these for now
+                               else {
+                                       // verb morph
+                                       sprintf(wordstr, "%03d", word-1);
+                                       
+module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
+                               }
+                               */
+                       }
+                       valto = val;
+                       num = strstr(token, "morph=\"x-Robinson:");
+                       if (num) {
+                               for (num+=18; ((*num) && (*num != '\"')); num++)
+                                       *valto++ = *num;
+                               *valto = 0;
+                               pushString(buf, " <small><em>(<a href=\"type=morph 
+class=Robinson value=");
+                               for (tok = val; *tok; tok++)
+                               // normal robinsons tense
+                                               *(*buf)++ = *tok;
+                               *(*buf)++ = '\"';
+                               *(*buf)++ = '>';
+                               for (tok = val; *tok; tok++)                           
+ 
+                                       //if(*tok != '\"')                      
+                                               *(*buf)++ = *tok;               
+                               pushString(buf, "</a>)</em></small> ");                
+                 
+                       }
+               }
+               
+               else if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // 
+strong's numbers
                        pushString(buf, " <small><em>&lt;<a href=\"type=Strongs 
value=");
                        for (tok = token+1; *tok; tok++)
                                //if(token[i] != '\"')

Reply via email to