node-sword-interface 0.250.0 → 0.251.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "0.250.0",
3
+ "version": "0.251.0",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -214,13 +214,13 @@ int main(int argc, char** argv)
214
214
  //string translation = sword_facade.getSwordTranslation(string("/usr/share/sword/locales.d"), string("de"), string("locales"));
215
215
  //cout << translation << endl;
216
216
 
217
- /*vector<Verse> searchResults = moduleSearch.getModuleSearchResults("NASB", "faith", SearchType::multiWord, SearchScope::NT, true);
217
+ vector<Verse> searchResults = moduleSearch.getModuleSearchResults("GerNeUe", "Glaube", SearchType::multiWord, SearchScope::NT, true);
218
218
  cout << "Got " << searchResults.size() << " results!" << endl;
219
219
  for (unsigned int i=0; i < searchResults.size(); i++) {
220
220
  cout << searchResults[i].reference << endl;
221
- }*/
221
+ }
222
222
 
223
- get_book_headers(textProcessor);
223
+ /*get_book_headers(textProcessor);*/
224
224
 
225
225
  return 0;
226
226
  }
@@ -50,10 +50,17 @@
50
50
  using namespace std;
51
51
  using namespace sword;
52
52
 
53
- ListKey ModuleSearch::getScopeKey(SearchScope scope)
53
+ ListKey ModuleSearch::getScopeKey(SWModule* module, SearchScope scope)
54
54
  {
55
55
  ListKey key;
56
56
 
57
+ if (module == 0) {
58
+ cerr << "ModuleSearch::getScopeKey / received 0 pointer for module!!!";
59
+ return key;
60
+ }
61
+
62
+ VerseKey verseKey = module->getKey();
63
+
57
64
  switch (scope) {
58
65
  case SearchScope::OT:
59
66
  {
@@ -63,7 +70,7 @@ ListKey ModuleSearch::getScopeKey(SearchScope scope)
63
70
  "Isaiah;Jeremiah;Lamentations;Ezekiel;Daniel;Hosea;Joel;Amos;Obadiah;"
64
71
  "Jonah;Micah;Nahum;Habakkuk;Zephaniah;Haggai;Zechariah;Malachi;";
65
72
 
66
- key = VerseKey().parseVerseList(otBooks, "", true);
73
+ key = verseKey.parseVerseList(otBooks, "", true);
67
74
  break;
68
75
  }
69
76
 
@@ -74,7 +81,7 @@ ListKey ModuleSearch::getScopeKey(SearchScope scope)
74
81
  "I Timothy;II Timothy;Titus;Philemon;Hebrews;James;I Peter;II Peter;"
75
82
  "I John;II John;III John;Jude;Revelation of John;";
76
83
 
77
- key = VerseKey().parseVerseList(ntBooks, "", true);
84
+ key = verseKey.parseVerseList(ntBooks, "", true);
78
85
  break;
79
86
  }
80
87
 
@@ -119,7 +126,7 @@ vector<Verse> ModuleSearch::getModuleSearchResults(string moduleName,
119
126
  ListKey scopeKey;
120
127
 
121
128
  if (searchScope != SearchScope::BIBLE) {
122
- scopeKey = this->getScopeKey(searchScope);
129
+ scopeKey = this->getScopeKey(module, searchScope);
123
130
  scope = &scopeKey;
124
131
  }
125
132
 
@@ -65,7 +65,7 @@ public:
65
65
  void terminate();
66
66
 
67
67
  private:
68
- sword::ListKey getScopeKey(SearchScope scope);
68
+ sword::ListKey getScopeKey(sword::SWModule* module, SearchScope scope);
69
69
 
70
70
  ModuleStore& _moduleStore;
71
71
  ModuleHelper& _moduleHelper;