diff options
author | Troy A. Griffitts <scribe@crosswire.org> | 2023-04-27 17:45:35 +0000 |
---|---|---|
committer | Troy A. Griffitts <scribe@crosswire.org> | 2023-04-27 17:45:35 +0000 |
commit | aafe13c6f5e4c94dee8de00a158f6a42f9b98735 (patch) | |
tree | f4431e0e65fc8ea98f4b29d9f422fe338b65e79d | |
parent | d5be61b928abad959189366983f040ad1c2f48f3 (diff) | |
download | sword-tools-aafe13c6f5e4c94dee8de00a158f6a42f9b98735.tar.gz |
make output file less changed from input file
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@562 07627401-56e2-0310-80f4-f8cd0041bdcd
-rw-r--r-- | migratetags/Makefile | 10 | ||||
-rw-r--r-- | migratetags/migratetags.cpp | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/migratetags/Makefile b/migratetags/Makefile index 69743a5..142d6b9 100644 --- a/migratetags/Makefile +++ b/migratetags/Makefile @@ -21,13 +21,19 @@ $(A_NT_XML): $(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 diff --git a/migratetags/migratetags.cpp b/migratetags/migratetags.cpp index 4ec6655..440c658 100644 --- a/migratetags/migratetags.cpp +++ b/migratetags/migratetags.cpp @@ -104,6 +104,7 @@ bool getNextVerseTEI(VerseKey *targetModKeyNT, VerseKey *targetModKeyOT, VerseKe 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 @@ int main(int argc, char **argv) { 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 @@ SWBuf findCanonicalBibleText(SWBuf orig, BibMap &bibMap, BibMap &wTags) { 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 @@ SWBuf findCanonicalBibleText(SWBuf orig, BibMap &bibMap, BibMap &wTags) { } skipTag = true; } + */ } tagLevel--; if (t.getName() && !strcmp("w", t.getName())) wTag = -1; |