[sword-svn] r3113 - trunk/utilities/diatheke

chrislit at crosswire.org chrislit at crosswire.org
Wed Mar 12 05:42:07 MST 2014


Author: chrislit
Date: 2014-03-12 05:42:07 -0700 (Wed, 12 Mar 2014)
New Revision: 3113

Modified:
   trunk/utilities/diatheke/README
   trunk/utilities/diatheke/diafiltmgr.cpp
   trunk/utilities/diatheke/diafiltmgr.h
   trunk/utilities/diatheke/diatheke.cpp
Log:
added 'internal' output formatting option, which will output the internal representation of the requested entries, without any encoding filter transformations


Modified: trunk/utilities/diatheke/README
===================================================================
--- trunk/utilities/diatheke/README	2014-03-12 12:15:24 UTC (rev 3112)
+++ trunk/utilities/diatheke/README	2014-03-12 12:42:07 UTC (rev 3113)
@@ -47,15 +47,17 @@
 ----------------------------------------------------------------------
 VERSION HISTORY
 
-4.7	
+4.7	..., 2014
 	Updated for Sword 1.8.0.
 	Supports LaTeX, XHTML, & WEBIF output.
-	Supports outputting SCSU-encoded text.	
+	Supports outputting SCSU-encoded text.
+	Added 'internal' output format, which applies no formatting
+	      filtes--useful for debugging & diagnostics.
 
 4.6     July 16, 2013
 	Updated for Sword 1.7.0.
 
-4.5
+4.5	
 
 4.0	July 8, 2001
 	Updated to Sword 1.5.2 with innumerable bug fixes.

Modified: trunk/utilities/diatheke/diafiltmgr.cpp
===================================================================
--- trunk/utilities/diatheke/diafiltmgr.cpp	2014-03-12 12:15:24 UTC (rev 3112)
+++ trunk/utilities/diatheke/diafiltmgr.cpp	2014-03-12 12:42:07 UTC (rev 3113)
@@ -219,6 +219,14 @@
 void DiathekeFilterMgr::CreateFilters(char markup) {
 
                 switch (markup) {
+		case FMT_INTERNAL:
+			fromplain = NULL;
+			fromthml = NULL;
+			fromgbf = NULL;
+			fromosis = NULL;
+			fromtei = NULL;
+			break;
+
 		case FMT_CGI:
 			fromplain = NULL;
 			fromthml = new ThMLCGI();

Modified: trunk/utilities/diatheke/diafiltmgr.h
===================================================================
--- trunk/utilities/diatheke/diafiltmgr.h	2014-03-12 12:15:24 UTC (rev 3112)
+++ trunk/utilities/diatheke/diafiltmgr.h	2014-03-12 12:42:07 UTC (rev 3113)
@@ -24,6 +24,7 @@
 #define DIAFILTMGR_H
 
 #define FMT_CGI 127
+#define FMT_INTERNAL 126
 
 #include <encfiltmgr.h>
 

Modified: trunk/utilities/diatheke/diatheke.cpp
===================================================================
--- trunk/utilities/diatheke/diatheke.cpp	2014-03-12 12:15:24 UTC (rev 3112)
+++ trunk/utilities/diatheke/diatheke.cpp	2014-03-12 12:42:07 UTC (rev 3113)
@@ -61,7 +61,7 @@
 
 	fprintf (stderr, "Maximum verses may be any integer value\n");
 	fprintf (stderr, "Valid output_format values are: CGI, GBF, HTML, HTMLHREF, LaTeX, OSIS, RTF,\n");
- 	fprintf (stderr, "  ThML, WEBIF, XHTML, and plain (def)\n");
+ 	fprintf (stderr, "  ThML, WEBIF, XHTML, plain, and internal (def)\n");
  	fprintf (stderr, "The option LaTeX will produce a compilable document, but may well require\n");
 	fprintf (stderr, "  tweaking to be usable.\n");
 	fprintf (stderr, "Valid output_encoding values are: Latin1, UTF8 (def), UTF16, HTML, RTF, and SCSU\n");
@@ -80,7 +80,7 @@
 int main(int argc, char **argv)
 {
 	int maxverses = -1;
-	unsigned char outputformat = FMT_PLAIN, searchtype = ST_NONE, outputencoding = ENC_UTF8;
+	unsigned char outputformat = FMT_INTERNAL, searchtype = ST_NONE, outputencoding = ENC_UTF8;
 	unsigned long optionfilters = OP_NONE;
  	char *text = 0, *locale = 0, *ref = 0, *range = 0;
 	char script[] = "Latin"; // for the moment, only this target script is supported
@@ -218,6 +218,9 @@
 				else if (!::stricmp("webif", argv[i])) {
 					outputformat = FMT_WEBIF;
 				}
+				else if (!::stricmp("internal", argv[i])) {
+					outputformat = FMT_INTERNAL;
+				}
 			}
 		}
 		else if (!::stricmp("-e", argv[i])) {




More information about the sword-cvs mailing list