From 3def6bc833c731a0bd559679d771fbb9a08c94e8 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 2 Apr 2012 19:57:00 +0000 Subject: [PATCH] + remove the no-check option --- src/manager/kiwix-manage.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/manager/kiwix-manage.cpp b/src/manager/kiwix-manage.cpp index fcc9717..957e745 100644 --- a/src/manager/kiwix-manage.cpp +++ b/src/manager/kiwix-manage.cpp @@ -48,7 +48,7 @@ void show(kiwix::Library library) { void usage() { cerr << "Usage:" << endl; - cerr << "\tkiwix-manage LIBRARY_PATH add ZIM_PATH [--zimPathToSave=../content/foobar.zim] [--current|-c] [--indexBackend|-b=xapian|clucene] [--indexPath|-i=FULLTEXT_IDX_PATH] [--noCheck|n] [url|u=http://...metalink]" << endl; + cerr << "\tkiwix-manage LIBRARY_PATH add ZIM_PATH [--zimPathToSave=../content/foobar.zim] [--current|-c] [--indexBackend|-b=xapian|clucene] [--indexPath|-i=FULLTEXT_IDX_PATH] [url|u=http://...metalink]" << endl; cerr << "\tkiwix-manage LIBRARY_PATH show [CONTENTID1] [CONTENTID2] ... (show everything if no param.)" << endl; cerr << "\tkiwix-manage LIBRARY_PATH remove CONTENTID1 [CONTENTID2]" << endl; } @@ -94,8 +94,7 @@ int main(int argc, char **argv) { kiwix::supportedIndexType indexBackend = kiwix::XAPIAN; string url; bool setCurrent = false; - bool noCheck = false; - + if (argc>3) { zimPath = argv[3]; } @@ -110,11 +109,10 @@ int main(int argc, char **argv) { {"indexBackend", required_argument, 0, 'b'}, {"zimPathToSave", required_argument, 0, 'z'}, {"current", no_argument, 0, 'c'}, - {"noCheck", no_argument, 0, 'n'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "ncz:u:i:b:", long_options, &option_index); + c = getopt_long(argc, argv, "cz:u:i:b:", long_options, &option_index); if (c != -1) { @@ -127,10 +125,6 @@ int main(int argc, char **argv) { setCurrent = true; break; - case 'n': - noCheck = true; - break; - case 'i': indexPath = optarg; break; @@ -157,7 +151,7 @@ int main(int argc, char **argv) { if (zimPath != "") { zimPathToSave = zimPathToSave == "." ? zimPath : zimPathToSave; - string bookId = libraryManager.addBookFromPathAndGetId(zimPath, zimPathToSave, url, !noCheck); + string bookId = libraryManager.addBookFromPathAndGetId(zimPath, zimPathToSave, url, false); if (!bookId.empty()) {