mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
+ few imp. in the indexer code
This commit is contained in:
parent
8e6f0047d6
commit
f3bd14cf83
@ -11,14 +11,21 @@ int main(int argc, char **argv) {
|
||||
/* Init the variables */
|
||||
char *zimFilePath = argv[1];
|
||||
char *xapianDirectoryPath = argv[2];
|
||||
kiwix::Indexer *indexer = new kiwix::Indexer(zimFilePath, xapianDirectoryPath);
|
||||
kiwix::Indexer *indexer = NULL;
|
||||
|
||||
/* Try to prepare the indexing */
|
||||
try {
|
||||
indexer = new kiwix::Indexer(zimFilePath, xapianDirectoryPath);
|
||||
} catch (...) {
|
||||
cout << "Unable to index '" << zimFilePath << "'." << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Start the indexing */
|
||||
if (indexer != NULL) {
|
||||
indexer->startIndexing();
|
||||
while (indexer->indexNextPercent()) {};
|
||||
} else {
|
||||
cout << "Unable to start the indexation process" << endl;
|
||||
cout << "Unable instanciate the Kiwix indexer." << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,9 @@
|
||||
/* Define to 1 if you have the `bz2' library (-lbz2). */
|
||||
#undef HAVE_LIBBZ2
|
||||
|
||||
/* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */
|
||||
#undef HAVE_LIBMICROHTTPD
|
||||
|
||||
/* Define to 1 if you have the `unac' library (-lunac). */
|
||||
#undef HAVE_LIBUNAC
|
||||
|
||||
@ -67,6 +70,9 @@
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user