3
0
Fork 0

Modified Kiwix-manage to incorporate origID parameter for diff files in the kiwix library.

Book class and Manager class modified.

-Kiran
small_fixes
Kiran Mathew Koshy 12 years ago
parent e027ec4e8d
commit 87e9b56236

@ -96,6 +96,7 @@ int main(int argc, char **argv) {
string indexPath;
kiwix::supportedIndexType indexBackend = kiwix::XAPIAN;
string url;
string origID="";
bool setCurrent = false;
if (argc>3) {
@ -108,6 +109,7 @@ int main(int argc, char **argv) {
static struct option long_options[] = {
{"url", required_argument, 0, 'u'},
{"origId", required_argument, 0, 'o'},
{"indexPath", required_argument, 0, 'i'},
{"indexBackend", required_argument, 0, 'b'},
{"zimPathToSave", required_argument, 0, 'z'},
@ -115,7 +117,7 @@ int main(int argc, char **argv) {
{0, 0, 0, 0}
};
c = getopt_long(argc, argv, "cz:u:i:b:", long_options, &option_index);
c = getopt_long(argc, argv, "cz:u:o:i:b:", long_options, &option_index);
if (c != -1) {
@ -124,6 +126,10 @@ int main(int argc, char **argv) {
url = optarg;
break;
case 'o':
origID = optarg;
break;
case 'c':
setCurrent = true;
break;
@ -154,7 +160,7 @@ int main(int argc, char **argv) {
if (zimPath != "") {
zimPathToSave = zimPathToSave == "." ? zimPath : zimPathToSave;
string bookId = libraryManager.addBookFromPathAndGetId(zimPath, zimPathToSave, url, false);
string bookId = libraryManager.addBookFromPathAndGetId(zimPath, zimPathToSave, url,origID, false);
if (!bookId.empty()) {

Loading…
Cancel
Save