Veloman Yunkan
250f46c7f9
fixup! Searcher::add_reader() rejects duplicate readers
2021-12-16 16:51:03 +01:00
Veloman Yunkan
0be00b791f
Searcher::add_reader() rejects duplicate readers
...
A O(N) linear search was added to `Searcher::add_reader()` deliberately.
This doesn't seem to be an operation that may lead to performance
problems.
2021-12-16 16:51:03 +01:00
Veloman Yunkan
262e13845c
Enter Library::removeBooksNotUpdatedSince()
2021-11-30 18:20:27 +04:00
Veloman Yunkan
b712c732f2
Dropped Library::getBookBy*() non-const functions
2021-11-30 18:20:27 +04:00
Veloman Yunkan
298247ca9b
Renamed NameMapperProxy -> UpdatableNameMapper
2021-11-30 18:20:27 +04:00
Veloman Yunkan
3aeeeeee76
Manager::reload()
2021-11-30 18:20:27 +04:00
Veloman Yunkan
2d6a7fe88d
Testing of NameMapperProxy
2021-11-30 18:20:23 +04:00
Veloman Yunkan
4ccbdcb740
Code deduplication in NameMapperTest
2021-11-30 18:17:43 +04:00
Veloman Yunkan
d62c4fd521
Testing of HumanReadableNameMapper
2021-11-22 20:54:44 +04:00
Veloman Yunkan
3296a020a1
Testing of Book::getHumanReadableIdFromPath()
...
New unit test BookTest.getHumanReadableIdFromPath revealed a bug in
`Book::getHumanReadableIdFromPath()`.
2021-11-22 20:54:44 +04:00
Veloman Yunkan
abfd9d88d8
Book.updateTest creates the source book from XML
...
... thus eliminating the need for the Book::setFavicon*() methods.
2021-11-18 12:57:21 +04:00
Veloman Yunkan
4f65811011
Moved Book.updateTest below Book.updateFromXMLTest
...
Book.updateTest is going to be modified so that it relies on
functionality tested by Book.updateFromXMLTest. Hence the order of the
tests better reflect that dependency.
2021-11-18 12:57:21 +04:00
Veloman Yunkan
59e5c7ff4e
Enhanced Book.updateFromXMLTest with favicon
2021-11-18 12:57:21 +04:00
Matthieu Gautier
0fcf166111
Fix warning in httplib.
...
The bug has been fixed upstream at yhirose/cpp-httplib#1091
This commit is a backport of the fix.
2021-11-16 09:39:56 +01:00
Matthieu Gautier
eea6f9fe27
Revert "Fix maybe initialized warning in httplib."
...
This reverts commit 1f6fb238ba
.
2021-11-16 09:36:21 +01:00
Matthieu Gautier
1f6fb238ba
Fix maybe initialized warning in httplib.
...
Patch has been send upstream :
https://github.com/yhirose/cpp-httplib/pull/1085
2021-11-08 16:58:11 +01:00
Manan Jethwani
b7b385d87b
added custom index template
2021-10-12 19:44:05 +05:30
Veloman Yunkan
c0bda426b4
Removed duplication across two mustache templates
...
Deduplicated the mustache templates static/templates/catalog_v2_entries.xml
and static/templates/catalog_v2_complete_entry.xml (the latter was
renamed to static/templates/catalog_v2_entry.xml).
2021-09-09 12:19:22 +04:00
Veloman Yunkan
b3f7556096
Added partial entries feed to the OPDS root feed
2021-09-09 12:19:22 +04:00
Veloman Yunkan
4c657c082e
/catalog/v2/partial_entries OPDS API endpoint
2021-09-09 12:19:22 +04:00
Veloman Yunkan
e773a29f29
Rearranged elements in OPDS entry XML
2021-09-09 12:19:22 +04:00
Veloman Yunkan
e15a0f4338
/catalog/v2/entry/<entry_id> OPDS API endpoint
2021-09-09 12:19:22 +04:00
Maneesh P M
61209ea0d7
Allow kiwix-serve to get suggestions of custom range
...
This will allow handle_suggest API to accept two arguments `start` and
`suggestionLength` that will allow handle_suggest to retrieve
suggestions in the given range rather than the default 0-10 range.
2021-08-19 21:05:39 +05:30
Maneesh P M
8a4080baba
Update libkiwix with new libzim api
2021-08-14 22:26:39 +05:30
Manan Jethwani
5e8f3a5505
added use of lang and category api for select boxes on welcome page
2021-08-07 02:39:50 +05:30
Veloman Yunkan
452283cfe6
Handling of /meta?name=Illustration_WxH@1 requests
2021-08-05 22:28:09 +04:00
Veloman Yunkan
e5168d8b3d
Support for multiple illustrations in OPDS entry
2021-08-05 22:21:13 +04:00
Maneesh P M
9addd82d2d
Fix usage of zim::Searcher::getResults() in libkiwix
...
The correct usage does not require the user to calculate an `end` using
the `pageLength`. We can directly use getResults(start, pageLength)
2021-08-04 19:20:50 +05:30
Maneesh P M
e74e7f5623
Add unit test for incremental searching
...
With this, we eventually want to see the usage of getResults giving
a FAILING TEST. This happens because the second argument to
getResults is NOT `end` of the range, but `maxResultCount` to retrieve.
This will be fixed in the next commit.
2021-08-04 19:20:05 +05:30
Veloman Yunkan
ab3095745e
Languages OPDS feed includes book counts
2021-08-03 11:32:38 +02:00
Veloman Yunkan
45adda44b3
Got rid of <content> node in languages OPDS entry
2021-08-03 11:32:38 +02:00
Veloman Yunkan
dd118df612
Got rid of langMap in opds_dumper.cpp
...
Language code to human friendly name translation is now done with the
help of the ICU library. It works if the line
```
-include $(LANGSRCDIR)/resfiles.mk
```
in the file `source/data/Makefile.in` of the icu4c dependency is not
commented out. Currently, the said line is commented out (along with
some other include's) by the `icu4c_custom_data.patch` patch of the
`kiwix-build` tool.
2021-08-03 11:32:38 +02:00
Veloman Yunkan
8a4248e48e
Language code in /catalog/v2/languages entries
2021-08-03 11:32:38 +02:00
Veloman Yunkan
5f90f5ee2a
Preliminary version of /catalog/v2/languages
2021-08-03 11:32:38 +02:00
Veloman Yunkan
64b55dbdc7
Made test library.xml a multi-language library
2021-08-03 11:32:38 +02:00
Veloman Yunkan
18871b4b15
Helper function Library::getBookPropValueSet()
...
Introduced a helper function `Library::getBookPropValueSet()` and
deduplicated Library::getBooks{Languages,Creators,Publishers}() methods.
2021-08-03 11:32:38 +02:00
Veloman Yunkan
b2027b397c
List of languages entry in /catalog/v2/root.xml
...
Added a new entry in /catalog/v2/root.xml that points to a
not-yet-existing list of languages navigation feed.
2021-08-03 11:32:38 +02:00
Matthieu Gautier
b70c92cade
Move back used helper functions to the public API.
...
- Add docstring
- Move the declaration in kiwix namespace.
- Adapt our include to include the right headers.
2021-07-07 14:43:13 +02:00
Matthieu Gautier
fa83a61a54
Move all public *Tools.h in src.
...
This by definition remove all the tool functions from the public API.
2021-07-07 14:43:13 +02:00
Maneesh P M
6f639144ab
Add unit tests for Searcher and Reader
...
Even though we will be removing the wrappers soon, the test coverage
should be complete and we could simply remove these files later.
2021-07-03 14:07:14 +05:30
Veloman Yunkan
b5c1b26761
OpdsCatalog::getSearchUrl()
2021-06-30 18:27:00 +02:00
Veloman Yunkan
dd60235010
Fixed the self link in the output of /catalog/v2/entries
2021-06-08 20:37:00 +04:00
Veloman Yunkan
e799f2ff1e
OPDSDumper::dumpOPDSFeed() works via mustache
...
This changes the output of `/catalog/search` as follows:
- Entire search query (rather than only the value of the `q` parameter)
is put in the <title> node.
- Search performed with an empty query presents itself as "All zims".
- The feed id remains stable for identical searches on the same
library.
2021-06-08 20:37:00 +04:00
Veloman Yunkan
fa42cbc48f
Pagination info in /catalog/v2/entries
2021-06-08 20:37:00 +04:00
Veloman Yunkan
f886c8c07b
Root url is normalized once in the constructor
2021-06-08 20:37:00 +04:00
Veloman Yunkan
dfad1c3815
/catalog/v2/searchdescription.xml
2021-06-08 20:37:00 +04:00
Veloman Yunkan
07252a127a
/catalog/v2/entries is also a search endpoint
2021-06-08 20:37:00 +04:00
Veloman Yunkan
19b59fd72f
Serving /catalog/v2/entries
...
/catalog/v2/entries is intended to play the combined role of
/catalog/root.xml and /catalog/search of the old OPDS API. Currently,
the latter role is not yet implemented.
Implementation note: instead of tweaking and reusing
`OPDSDumper::dumpOPDSFeed()`, the generation of the OPDS feed is done via `mustache`
and a new template `static/catalog_v2_entries.xml`.
2021-06-08 20:37:00 +04:00
Veloman Yunkan
feeb9f206e
/catalog/v2/* XMLs are OPDS 1.2
2021-06-08 20:37:00 +04:00
Veloman Yunkan
a1520ce7f1
Fixing the xenial build
...
Under Ubuntu 16.04/xenial, ccache seems to have issues with multiline
raw string literals used inside macros.
2021-06-08 20:37:00 +04:00