node-sword-interface 1.0.29 → 1.0.31

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": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -23,7 +23,7 @@
23
23
  "license": "GPL-2.0+",
24
24
  "dependencies": {
25
25
  "glob": "^8.0.3",
26
- "node-addon-api": "^7.1.0",
26
+ "node-addon-api": "^8.2.2",
27
27
  "node-html-parser": "^6.1.13"
28
28
  },
29
29
  "repository": {
@@ -32,6 +32,6 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "jsdoc-to-markdown": "^8.0.3",
35
- "node-gyp": "^9.1.0"
35
+ "node-gyp": "^10.2.0"
36
36
  }
37
37
  }
@@ -29,14 +29,16 @@ void show_repos(RepositoryInterface& repoInterface)
29
29
 
30
30
  void show_modules(RepositoryInterface& repoInterface)
31
31
  {
32
- cout << "German MODULES of CrossWire:" << endl;
33
- vector<SWModule*> modules = repoInterface.getRepoModulesByLang("CrossWire", "de");
32
+ string repo = "CrossWire";
33
+ cout << "DICT MODULES of " << repo << ":" << endl;
34
+ vector<SWModule*> modules = repoInterface.getRepoModulesByLang(repo, "en", ModuleType::dict);
35
+
34
36
  for (unsigned int i = 0; i < modules.size(); i++) {
35
37
  SWModule* currentModule = modules[i];
36
38
 
37
39
  cout << currentModule->getName();
38
40
 
39
- if (currentModule->getConfigEntry("Abbreviation")) {
41
+ /*if (currentModule->getConfigEntry("Abbreviation")) {
40
42
  string moduleShortcut = currentModule->getConfigEntry("Abbreviation");
41
43
  cout << " " << moduleShortcut;
42
44
  }
@@ -47,10 +49,10 @@ void show_modules(RepositoryInterface& repoInterface)
47
49
  }
48
50
 
49
51
  string moduleVersion = currentModule->getConfigEntry("Version");
50
- cout << " " << moduleVersion << " ";
52
+ cout << " " << moduleVersion << " ";*/
51
53
 
52
- string moduleLocked = currentModule->getConfigEntry("CipherKey") ? "LOCKED" : "";
53
- cout << moduleLocked << " ";
54
+ //string moduleLocked = currentModule->getConfigEntry("CipherKey") ? "LOCKED" : "";
55
+ //cout << moduleLocked << " ";
54
56
 
55
57
  /*ConfigEntMap::const_iterator begin = currentModule->getConfig().lower_bound("GlobalOptionFilter");
56
58
  ConfigEntMap::const_iterator end = currentModule->getConfig().upper_bound("GlobalOptionFilter");
@@ -199,9 +201,9 @@ int main(int argc, char** argv)
199
201
 
200
202
  //test_unlock_key(moduleInstaller, moduleStore, textProcessor);
201
203
 
202
- /*show_repos(repoInterface);
204
+ /*show_repos(repoInterface);*/
203
205
 
204
- show_modules(repoInterface);*/
206
+ show_modules(repoInterface);
205
207
 
206
208
  /*int error = moduleInstaller.installModule("UKJV");
207
209
 
@@ -230,7 +232,7 @@ int main(int argc, char** argv)
230
232
 
231
233
  //get_book_list(moduleHelper);
232
234
 
233
- get_dict_key_list(dictHelper);
235
+ //get_dict_key_list(dictHelper);
234
236
 
235
237
  //string translation = sword_facade.getSwordTranslation(string("/usr/share/sword/locales.d"), string("de"), string("locales"));
236
238
  //cout << translation << endl;
@@ -43,14 +43,6 @@ bool ModuleHelper::moduleHasFeature(sword::SWModule* module, std::string feature
43
43
  return this->moduleHasKeyValuePair(module, "Feature", feature);
44
44
  }
45
45
 
46
- bool ModuleHelper::moduleHasStrongsKeys(sword::SWModule* module)
47
- {
48
- bool hasHebrewStrongsKeys = this->moduleHasFeature(module, "HebrewDef");
49
- bool hasGreekStrongsKeys = this->moduleHasFeature(module, "GreekDef");
50
-
51
- return hasHebrewStrongsKeys || hasGreekStrongsKeys;
52
- }
53
-
54
46
  bool ModuleHelper::moduleHasKeyValuePair(sword::SWModule* module, std::string key, std::string value)
55
47
  {
56
48
  bool hasKeyValuePair = false;
@@ -42,7 +42,6 @@ public:
42
42
 
43
43
  bool moduleHasGlobalOption(sword::SWModule* module, std::string globalOption);
44
44
  bool moduleHasFeature(sword::SWModule* module, std::string feature);
45
- bool moduleHasStrongsKeys(sword::SWModule* module);
46
45
  bool moduleHasBook(sword::SWModule* module, std::string bookCode);
47
46
 
48
47
  std::vector<std::string> getBookList(std::string moduleName);
@@ -230,10 +230,6 @@ vector<SWModule*> RepositoryInterface::getAllRepoModules(string repoName, Module
230
230
  SWModule* currentModule = it->second;
231
231
  string currentModuleType = currentModule->getType();
232
232
 
233
- if (moduleType == ModuleType::dict && !this->_moduleHelper.moduleHasStrongsKeys(currentModule)) {
234
- continue;
235
- }
236
-
237
233
  if (moduleTypeString == "ANY" || currentModuleType == moduleTypeString) {
238
234
  modules.push_back(currentModule);
239
235
  }
@@ -288,11 +284,6 @@ vector<SWModule*> RepositoryInterface::getRepoModulesByLang(string repoName,
288
284
  continue;
289
285
  }
290
286
 
291
- /*if (moduleType == ModuleType::dict && !hasHebrewStrongsKeys && !hasGreekStrongsKeys) {
292
- // In case of a dictionary module we ignore it if there are not Strong's keys
293
- continue;
294
- }*/
295
-
296
287
  if (hebrewStrongsKeys && !hasHebrewStrongsKeys) {
297
288
  continue;
298
289
  }