mirror of https://github.com/kiwix/libkiwix.git
+ add unaccent.[c[[|h] to Makefile.am
+ fix some regression added few hours ago
This commit is contained in:
parent
179ed1917d
commit
54cb99d074
|
@ -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, "_", " ");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue