mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 03:12:20 -04:00
+ readXML()
This commit is contained in:
parent
8191b3ebc0
commit
185ce278b2
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <kiwix/manager.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ int main(int argc, char **argv) {
|
|||||||
string libraryPath = "";
|
string libraryPath = "";
|
||||||
supportedAction action = NONE;
|
supportedAction action = NONE;
|
||||||
string zimPath = "";
|
string zimPath = "";
|
||||||
|
kiwix::Manager libraryManager;
|
||||||
|
|
||||||
/* Argument parsing */
|
/* Argument parsing */
|
||||||
if (argc > 2) {
|
if (argc > 2) {
|
||||||
@ -51,6 +53,10 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* SHOW */
|
/* SHOW */
|
||||||
if (action == SHOW) {
|
if (action == SHOW) {
|
||||||
|
if (!libraryManager.readFile(libraryPath)) {
|
||||||
|
std::cerr << "Unable to read the library file '" << libraryPath << "'." << std::endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
} else if (action == ADD) {
|
} else if (action == ADD) {
|
||||||
std::cerr << "ADD is still not implemented." << std::endl;
|
std::cerr << "ADD is still not implemented." << std::endl;
|
||||||
} else if (action == REMOVE) {
|
} else if (action == REMOVE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user