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
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
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
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
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
Veloman Yunkan
2e53b51696
Serving /catalog/v2/categories
2021-06-08 20:37:00 +04:00
Veloman Yunkan
3c3cf08a1a
Serving /catalog/v2/root.xml
...
Note: This commit somewhat relaxes validation of non variable
`<updated>` elements in the OPDS feed - the contents of any `<updated>`
element is replaced with the YYYY-MM-DDThh:mm:ssZ placeholder.
2021-06-08 16:03:43 +04:00
Veloman Yunkan
1e0ff1fbb0
Fixed the double colon in OPDS date string
2021-06-08 16:03:43 +04:00
Veloman Yunkan
0a3d293ae0
Broke Server.404 with /catalogBLABLABLA/root.xml
...
The new negative test-point demonstrates that Kiwix server doesn't
distinguish /catalogBLABLABLA from /catalog.
2021-06-08 16:03:43 +04:00
Emmanuel Engelhart
c8b7f8772a
Fix Libkiwix Github repository URLS
2021-05-20 08:56:44 +02:00
Veloman Yunkan
68189de162
/catalog/search handles out-of-bounds pagination
2021-05-10 11:25:06 +02:00
Maneesh P M
be6b58c6ad
Revert "added 204 code for empty return of search"
...
Returning status code 204 in case of an empty results doesn't show the
empty results page as described in #466 . Reverting the changes in #396
fixes the issue.
2021-05-09 10:47:18 +05:30
Manan Jethwani
965b9622c2
removed redirect to articles in search
2021-04-20 20:23:42 +05:30
Veloman Yunkan
47c67a4202
LibraryServerTest.catalog_search_with_word_exclusion
2021-03-17 14:32:03 +01:00
Veloman Yunkan
6b600a18eb
LibraryServerTest.catalog_prefix_search
2021-03-17 14:32:03 +01:00
Veloman Yunkan
9e887cadf1
Added some diversity to test/data/library.xml
2021-03-17 14:32:03 +01:00
Veloman Yunkan
a599fb3892
Initial version of Xapian-based catalog search
2021-03-17 14:32:03 +01:00
Veloman Yunkan
e55bf514e8
Dedicated 'category' parameter in catalog search
2021-03-17 14:10:57 +04:00
Veloman Yunkan
f270724b1f
Testing of a library entry without a category
2021-03-17 14:10:44 +04:00
Veloman Yunkan
58186ffb26
kiwix::Book::getCategory()
2021-03-17 14:09:48 +04:00
Veloman Yunkan
6d43fd065f
Less boilerplate in LibraryServerTest unit-tests
2021-03-17 14:02:27 +04:00
Veloman Yunkan
071d2bedd3
LibraryServerTest.catalog_search_by_text
2021-03-17 14:02:27 +04:00
Veloman Yunkan
0b1740e6c5
LibraryServerTest.catalog_search_by_tag
2021-03-17 14:02:27 +04:00
Veloman Yunkan
9913f748e2
LibraryServerTest.catalog_searchdescription_xml
2021-03-17 14:02:27 +04:00
Veloman Yunkan
c5c40cb189
New unit-test LibraryServerTest.catalog_root_xml
2021-03-17 14:02:27 +04:00
Matthieu Gautier
ed32e16db2
Use a reference in `test/server.cpp` loop.
...
This is mainly to make the macos CI pass.
2020-10-28 16:08:37 +01:00
MananJethwani
599aaa4c1b
added code for status code 204 for empty return of search.
2020-08-01 01:45:42 +05:30