node-sword-interface 1.0.32 → 1.0.33
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/examples/install_kjv.js +1 -1
- package/examples/print_kjv_matthew.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/scripts/build_sword.sh +1 -1
- package/scripts/get_sword_build_win32.ps1 +1 -1
- package/scripts/get_sword_include_path.sh +1 -1
- package/scripts/get_sword_library.sh +1 -1
- package/scripts/postinstall.js +1 -1
- package/src/napi_module/api_lock.cpp +1 -1
- package/src/napi_module/api_lock.hpp +1 -1
- package/src/napi_module/binding.cpp +1 -1
- package/src/napi_module/install_module_worker.cpp +1 -1
- package/src/napi_module/install_module_worker.hpp +1 -1
- package/src/napi_module/module_search_worker.cpp +1 -1
- package/src/napi_module/module_search_worker.hpp +1 -1
- package/src/napi_module/napi_sword_helper.cpp +1 -1
- package/src/napi_module/napi_sword_helper.hpp +1 -1
- package/src/napi_module/node_sword_interface.cpp +1 -1
- package/src/napi_module/node_sword_interface.hpp +1 -1
- package/src/napi_module/worker.hpp +1 -1
- package/src/sword_backend/common_defs.hpp +1 -1
- package/src/sword_backend/dict_helper.cpp +1 -1
- package/src/sword_backend/dict_helper.hpp +1 -1
- package/src/sword_backend/file_system_helper.cpp +1 -1
- package/src/sword_backend/file_system_helper.hpp +1 -1
- package/src/sword_backend/module_helper.cpp +1 -1
- package/src/sword_backend/module_helper.hpp +1 -1
- package/src/sword_backend/module_installer.cpp +1 -1
- package/src/sword_backend/module_installer.hpp +1 -1
- package/src/sword_backend/module_search.cpp +23 -8
- package/src/sword_backend/module_search.hpp +1 -1
- package/src/sword_backend/module_store.cpp +1 -1
- package/src/sword_backend/module_store.hpp +1 -1
- package/src/sword_backend/mutex.cpp +1 -1
- package/src/sword_backend/mutex.hpp +1 -1
- package/src/sword_backend/percentage_calc.hpp +1 -1
- package/src/sword_backend/repository_interface.cpp +1 -1
- package/src/sword_backend/repository_interface.hpp +1 -1
- package/src/sword_backend/string_helper.cpp +1 -1
- package/src/sword_backend/string_helper.hpp +1 -1
- package/src/sword_backend/strongs_entry.cpp +1 -1
- package/src/sword_backend/strongs_entry.hpp +1 -1
- package/src/sword_backend/sword_status_reporter.cpp +1 -1
- package/src/sword_backend/sword_status_reporter.hpp +1 -1
- package/src/sword_backend/sword_translation_helper.hpp +1 -1
- package/src/sword_backend/text_processor.cpp +34 -2
- package/src/sword_backend/text_processor.hpp +3 -1
package/examples/install_kjv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
package/package.json
CHANGED
package/scripts/build_sword.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file is part of node-sword-interface.
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2019 -
|
|
3
|
+
# Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
#
|
|
5
5
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# This file is part of node-sword-interface.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (C) 2019 -
|
|
5
|
+
# Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
6
6
|
#
|
|
7
7
|
# node-sword-interface is free software: you can redistribute it and/or modify
|
|
8
8
|
# it under the terms of the GNU General Public License as published by
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -141,13 +141,28 @@ vector<Verse> ModuleSearch::getModuleSearchResults(string moduleName,
|
|
|
141
141
|
return searchResults;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
// Cut out the number from the Strong's key (starting at index 1 until end of string)
|
|
145
|
+
string strongsNumber = searchTerm.substr(1, searchTerm.size());
|
|
146
|
+
|
|
147
|
+
if (searchTerm[0] == 'H') {
|
|
148
|
+
|
|
149
|
+
if (this->_textProcessor.moduleHasStrongsPaddedZeroPrefixes(module)) {
|
|
150
|
+
string paddedStrongsNumber = this->_textProcessor.padStrongsNumber(strongsNumber);
|
|
151
|
+
searchTerm = "H" + paddedStrongsNumber;
|
|
152
|
+
|
|
153
|
+
} else if (this->_textProcessor.moduleHasStrongsZeroPrefixes(module)) {
|
|
154
|
+
// If the Strong's key is OT we need to insert a zero in front of the key
|
|
155
|
+
// This is necessary because the Sword modules with Strong's have a zero in front of the Hebrew Strong's numbers
|
|
156
|
+
// Overwrite the searchTerm with an inserted 0
|
|
157
|
+
searchTerm = "H0" + strongsNumber;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
} else if (searchTerm[0] == 'G') {
|
|
161
|
+
|
|
162
|
+
if (this->_textProcessor.moduleHasStrongsPaddedZeroPrefixes(module)) {
|
|
163
|
+
string paddedStrongsNumber = this->_textProcessor.padStrongsNumber(strongsNumber);
|
|
164
|
+
searchTerm = "G" + paddedStrongsNumber;
|
|
165
|
+
}
|
|
151
166
|
}
|
|
152
167
|
|
|
153
168
|
// from swmodule.h api docs:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
#include <sstream>
|
|
21
21
|
#include <string>
|
|
22
22
|
#include <regex>
|
|
23
|
+
#include <iomanip>
|
|
23
24
|
|
|
24
25
|
// Sword includes
|
|
25
26
|
#include <versekey.h>
|
|
@@ -550,7 +551,38 @@ bool TextProcessor::moduleHasStrongsZeroPrefixes(sword::SWModule* module)
|
|
|
550
551
|
string verseText = this->getCurrentVerseText(module, true);
|
|
551
552
|
this->_markupEnabled = previousMarkupSetting;
|
|
552
553
|
|
|
553
|
-
|
|
554
|
+
// Check if the verse text contains the Strong's number H07225 ("beginning") with a zero prefix
|
|
555
|
+
return verseText.find("strong:H07225") != string::npos;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
bool TextProcessor::moduleHasStrongsPaddedZeroPrefixes(sword::SWModule* module)
|
|
559
|
+
{
|
|
560
|
+
// Check if the module has Strongs's numbers that are padded with zeros
|
|
561
|
+
string key = "Gen 2:24";
|
|
562
|
+
module->setKey(key.c_str());
|
|
563
|
+
|
|
564
|
+
bool previousMarkupSetting = this->_markupEnabled;
|
|
565
|
+
this->enableMarkup();
|
|
566
|
+
string verseText = this->getCurrentVerseText(module, true);
|
|
567
|
+
this->_markupEnabled = previousMarkupSetting;
|
|
568
|
+
|
|
569
|
+
// Check if the verse text contains the Strong's number H0001 ("father") with padded zeros
|
|
570
|
+
return verseText.find("strong:H0001") != string::npos;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
string TextProcessor::padStrongsNumber(const string strongsNumber) {
|
|
574
|
+
if (strongsNumber.size() == 0) {
|
|
575
|
+
return strongsNumber;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// Convert to int
|
|
579
|
+
int numericValue = stoi(strongsNumber);
|
|
580
|
+
|
|
581
|
+
// Use stringstream and i/o manipulators to pad with zeros
|
|
582
|
+
std::ostringstream padded;
|
|
583
|
+
padded << std::setw(4) << std::setfill('0') << numericValue;
|
|
584
|
+
|
|
585
|
+
return padded.str();
|
|
554
586
|
}
|
|
555
587
|
|
|
556
588
|
bool TextProcessor::isModuleReadable(sword::SWModule* module, std::string key)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* This file is part of node-sword-interface.
|
|
2
2
|
|
|
3
|
-
Copyright (C) 2019 -
|
|
3
|
+
Copyright (C) 2019 - 2025 Tobias Klein <contact@tklein.info>
|
|
4
4
|
|
|
5
5
|
node-sword-interface is free software: you can redistribute it and/or modify
|
|
6
6
|
it under the terms of the GNU General Public License as published by
|
|
@@ -52,6 +52,8 @@ public:
|
|
|
52
52
|
StrongsEntry* getStrongsEntry(std::string key);
|
|
53
53
|
|
|
54
54
|
bool moduleHasStrongsZeroPrefixes(sword::SWModule* module);
|
|
55
|
+
bool moduleHasStrongsPaddedZeroPrefixes(sword::SWModule* module);
|
|
56
|
+
std::string padStrongsNumber(const std::string strongsNumber);
|
|
55
57
|
bool isModuleReadable(sword::SWModule* module, std::string key="John 1:1");
|
|
56
58
|
|
|
57
59
|
private:
|