+ add unaccent.[c[[|h] to Makefile.am

+ fix some regression added few hours ago
This commit is contained in:
kelson42 2012-04-16 22:48:12 +00:00
parent 179ed1917d
commit 54cb99d074
2 changed files with 19 additions and 1 deletions

View File

@ -60,7 +60,8 @@ namespace kiwix {
}
std::string Book::getHumanReadableIdFromPath() {
std::string id = removeAccents(path);
std::string id = path;
removeAccents(id);
replaceRegex(id, "", "^.*/");
replaceRegex(id, "", "\\.zim[a-z]*$");
replaceRegex(id, "_", " ");

View File

@ -311,6 +311,23 @@ namespace kiwix {
return booksLanguages;
}
vector<string> Manager::getBooksCreators() {
std::vector<string> booksCreators;
std::vector<kiwix::Book>::iterator itr;
std::map<string, bool> booksCreatorsMap;
std::sort(library.books.begin(), library.books.end(), kiwix::Book::sortByCreator);
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
if (booksCreatorsMap.find(itr->creator) == booksCreatorsMap.end()) {
booksCreatorsMap[itr->creator] = true;
booksCreators.push_back(itr->creator);
}
}
return booksCreators;
}
vector<string> Manager::getBooksIds() {
std::vector<string> booksIds;
std::vector<kiwix::Book>::iterator itr;