summaryrefslogtreecommitdiff
path: root/utilities/xml2gbs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities/xml2gbs.cpp')
-rw-r--r--utilities/xml2gbs.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/utilities/xml2gbs.cpp b/utilities/xml2gbs.cpp
index 72f9b41..d49b536 100644
--- a/utilities/xml2gbs.cpp
+++ b/utilities/xml2gbs.cpp
@@ -1,5 +1,10 @@
-/*
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+/******************************************************************************
+ *
+ * xml2gbs.cpp - Importer for GenBooks formatted as OSIS, ThML, or TEI
+ *
+ * $Id: xml2gbs.cpp 2833 2013-06-29 06:40:28Z chrislit $
+ *
+ * Copyright 2003-2012 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -42,9 +47,9 @@ using sword::SWKey;
//#define DEBUG
-enum XML_FORMATS { F_AUTODETECT, F_OSIS, F_THML };
+enum XML_FORMATS { F_AUTODETECT, F_OSIS, F_THML, F_TEI };
-#define HELPTEXT "xml2gbs 1.0 OSIS/ThML General Book module creation tool for the SWORD Project\n usage:\n xml2gbs [-l] [-i] [-fT|-fO] <filename> [modname]\n -l uses long div names in ThML files\n -i exports to IMP format instead of creating a module\n -fO and -fT will set the importer to expect OSIS or ThML format respectively\n (otherwise it attempts to autodetect)\n"
+#define HELPTEXT "xml2gbs 1.0 OSIS/ThML/TEI General Book module creation tool for the SWORD Project\n usage:\n xml2gbs [-l] [-i] [-fT|-fO|-fE] <filename> [modname]\n -l uses long div names in ThML files\n -i exports to IMP format instead of creating a module\n -fO, -fT, and -fE will set the importer to expect OSIS, ThML, or TEI format respectively\n (otherwise it attempts to autodetect)\n"
unsigned char detectFormat(char* filename) {
@@ -65,6 +70,9 @@ unsigned char detectFormat(char* filename) {
else if (strstr(entbuffer.c_str(), "<ThML")) {
format = F_THML;
}
+ else if (strstr(entbuffer.c_str(), "<TEI")) {
+ format = F_TEI;
+ }
}
infile.close();
}