[sword-svn] r562 - trunk/migratetags
scribe at crosswire.org
scribe at crosswire.org
Thu Apr 27 13:45:36 EDT 2023
Author: scribe
Date: 2023-04-27 13:45:35 -0400 (Thu, 27 Apr 2023)
New Revision: 562
Modified:
trunk/migratetags/Makefile
trunk/migratetags/migratetags.cpp
Log:
make output file less changed from input file
Modified: trunk/migratetags/Makefile
===================================================================
--- trunk/migratetags/Makefile 2023-04-26 02:36:01 UTC (rev 561)
+++ trunk/migratetags/Makefile 2023-04-27 17:45:35 UTC (rev 562)
@@ -21,13 +21,19 @@
$(A_FULL_XML):
wget $(A_DOWNLOAD_BASE)/$(A_FULL_XML)
-$(A_NT_TAGGED_XML): $(A_NT_XML)
+$(A_NT_TAGGED_XML): $(A_NT_XML) $(TARGETS)
./migratetags -v -l -ss NA28 -tei $(A_NT_XML) > $(A_NT_TAGGED_XML) 2> errata-nt.txt
-$(A_FULL_TAGGED_XML): $(A_FULL_XML)
+$(A_FULL_TAGGED_XML): $(A_FULL_XML) $(TARGETS)
./migratetags -l -ss NA28 -ssot LXX -tei $(A_FULL_XML) > $(A_FULL_TAGGED_XML) 2> errata-full.txt
examples: $(EXAMPLE_TARGETS)
+diff: $(A_FULL_TAGGED_XML)
+ xmllint --format $(A_FULL_XML) > a.xml
+ xmllint --format $(A_FULL_TAGGED_XML) > b.xml
+ diff -Pru a.xml b.xml | more
+ rm a.xml b.xml
+
clean:
rm -f $(TARGETS) $(EXAMPLE_TARGETS) errata-nt.txt errata-full.txt
Modified: trunk/migratetags/migratetags.cpp
===================================================================
--- trunk/migratetags/migratetags.cpp 2023-04-26 02:36:01 UTC (rev 561)
+++ trunk/migratetags/migratetags.cpp 2023-04-27 17:45:35 UTC (rev 562)
@@ -104,6 +104,7 @@
if (!line.size()) {
fileEnd = !FileMgr::getLine(targetInput, line, false);
if (!fileEnd) line.append("\n");
+
}
int offset = line.indexOf("<ab ");
int endOffset = line.indexOf("</ab>");
@@ -302,7 +303,6 @@
SWModule &fromMod = (targetModKey == targetModKeyNT ? fromModNT : fromModOT);
if (targetModKey->getError()) {
cout << targetModText;
- cout << endl;
continue;
}
// we'll do the whole Bible eventually, but let's just get one verse
@@ -561,6 +561,7 @@
if (t.isEndTag()) {
// clear out empty w tags
if (t.getName() && !strcmp("w", t.getName())) {
+ /*
if (!lastWElementText.size()) {
out.setSize(wTag);
if (out.endsWith(' ')) {
@@ -570,6 +571,7 @@
}
skipTag = true;
}
+ */
}
tagLevel--;
if (t.getName() && !strcmp("w", t.getName())) wTag = -1;
More information about the sword-cvs
mailing list