From 049031850db61ab88c1613cf463c9e366838699c Mon Sep 17 00:00:00 2001 From: kelson42 Date: Wed, 7 Nov 2012 09:23:11 +0000 Subject: [PATCH] + first work to improve suggestion system --- src/reader/kiwix-read.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/reader/kiwix-read.cpp b/src/reader/kiwix-read.cpp index 1c486dc..2a99104 100644 --- a/src/reader/kiwix-read.cpp +++ b/src/reader/kiwix-read.cpp @@ -19,17 +19,25 @@ #include #include +#include +#include +#include #include void usage() { - cout << "Usage: kiwix-read ZIM_FILE_PATH" << endl; + cout << "Usage: kiwix-read --suggest= ZIM_FILE_PATH" << endl; exit(1); } +void updateSuggestionTree(tree> &suggestionTree, string suggestion) { + return; +} + int main(int argc, char **argv) { /* Init the variables */ const char *filePath = NULL; + const char *suggestion = NULL; int option_index = 0; int c = 0; @@ -77,10 +85,16 @@ int main(int argc, char **argv) { string content; string contentType; unsigned int contentLength = 0; - + + /* if (reader->getContentByUrl(mainPageUrl, content, contentLength, contentType)) { cout << content << endl; } + */ + + tree> tree; + updateSuggestionTree(tree, string(suggestion)); + delete reader; } else { cerr << "Unable instanciate the Kiwix reader." << endl;