mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-24 04:20:56 -04:00
+ imp. of kiwix-manage
This commit is contained in:
parent
c79ebc67cf
commit
a67637ef21
@ -67,13 +67,18 @@ int main(int argc, char **argv) {
|
|||||||
show(libraryManager.cloneLibrary());
|
show(libraryManager.cloneLibrary());
|
||||||
} else if (action == ADD) {
|
} else if (action == ADD) {
|
||||||
string zimPath = "";
|
string zimPath = "";
|
||||||
|
string url = "";
|
||||||
|
|
||||||
if (argc>3) {
|
if (argc>3) {
|
||||||
zimPath = argv[3];
|
zimPath = argv[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc>4) {
|
||||||
|
url = argv[4];
|
||||||
|
}
|
||||||
|
|
||||||
if (zimPath != "") {
|
if (zimPath != "") {
|
||||||
libraryManager.addBookFromPath(zimPath);
|
libraryManager.addBookFromPath(zimPath, url);
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Invalid zim file path" << std::endl;
|
std::cerr << "Invalid zim file path" << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user