7d8a83cc97
Encapsulated access to Book::m_illustration
2021-11-18 14:32:52 +04:00
ec5a423924
Enter Book::Illustration
...
`Book::m_favicon` and its 2 friends are replaced with a single
`Book::m_illustration` data member.
2021-11-18 13:31:08 +04:00
811b73a4f1
Moved 2 small method definitions to cpp
2021-11-18 13:27:27 +04:00
30e4c549e4
exposed fileExist, getMimeTypeForFile and getFileCoontent functions
2021-10-12 19:44:38 +05:30
b7b385d87b
added custom index template
2021-10-12 19:44:05 +05:30
cd9fb541fc
Fix method call for new libzim API.
...
`add_archive` is now `addArchive`.
2021-09-29 11:55:22 +02:00
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
b3f7556096
Added partial entries feed to the OPDS root feed
2021-09-09 12:19:22 +04:00
4c657c082e
/catalog/v2/partial_entries OPDS API endpoint
2021-09-09 12:19:22 +04:00
e15a0f4338
/catalog/v2/entry/<entry_id> OPDS API endpoint
2021-09-09 12:19:22 +04:00
12d9b69806
OPDSDumper::dumpOPDSCompleteEntry()
2021-09-09 12:19:22 +04:00
027854e4f4
Extracted getSingleBookData() in opds_dumper.cpp
2021-09-09 12:19:22 +04:00
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
8a4080baba
Update libkiwix with new libzim api
2021-08-14 22:26:39 +05:30
452283cfe6
Handling of /meta?name=Illustration_WxH@1 requests
2021-08-05 22:28:09 +04:00
e5168d8b3d
Support for multiple illustrations in OPDS entry
2021-08-05 22:21:13 +04:00
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
19afe9442f
Remove OriginId functions since they are not useful right now
2021-08-03 11:42:58 +02:00
a3ba7619df
Update Manager to use Archive instead of Reader
...
kiwix::Manager uses Reader to import a zim file, it should be using
zim::Archive directly.
2021-08-03 11:42:58 +02:00
8b12434ff2
Update kiwix::book to use libzim structure
...
Some methods in kiwix::Book uses wrapper structure reader. This usage should
be extended from the native libzim structure zim::Archive
2021-08-03 11:42:58 +02:00
ab3095745e
Languages OPDS feed includes book counts
2021-08-03 11:32:38 +02:00
45adda44b3
Got rid of <content> node in languages OPDS entry
2021-08-03 11:32:38 +02:00
96cf7e78a5
OPDSDumper::categoriesOPDSFeed() with no args
2021-08-03 11:32:38 +02:00
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
5f90f5ee2a
Preliminary version of /catalog/v2/languages
2021-08-03 11:32:38 +02:00
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
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
0b6b6716de
Rename split argument from trimEmpty
to dropEmpty
.
2021-07-07 14:43:13 +02:00
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
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
a94a03cd22
Remove unwanted reader functions
...
Removing the functions in InternalServer that are no longer needed.
2021-07-03 14:07:14 +05:30
bc821638da
Drop wrapper structures from handle_search
...
Since we now have SearcherRenderer that can work with native libzim
structure, we will drop the wrapper and use them instead.
2021-07-03 14:07:12 +05:30
bcece66960
Add SearchRenderer handles for libzim structures
...
Introduces a new member mp_search that houses the zim::Search object,
adds a new constructor for this purpose. This commit also add an
overload for getHtml that takes start and end integers as arguments
since they are not part of the search object we include.
2021-07-03 14:05:50 +05:30
c046f64d83
Drop Reader and Entry wrappers from handle_content
2021-07-03 14:05:50 +05:30
75b4d311d7
Drop Reader from InternalServer::handle_random
2021-07-03 14:04:04 +05:30
a236751c74
Drop usage of Reader from InternalServer::handle_suggest
2021-07-03 14:04:04 +05:30
7d68926539
Drop usage of Reader from InternalServer::handle_meta
...
This is essentially a code move of meta handlers from using Reader
functions to directly using Archive.
2021-07-03 14:04:02 +05:30
940368b8ac
Add m_archives and getArchiveById to Library
...
These members will mirror the functionality offered by equivalent usage
of Reader class.
2021-07-03 14:02:31 +05:30
b5c1b26761
OpdsCatalog::getSearchUrl()
2021-06-30 18:27:00 +02:00
f3c96b23fd
Use getIllustrationItem instead of getFaviconEntry method
...
With openzim/libzim#540 we now have a new function to get
illustration(previously favicon in 48x48 size and unity scale) in
multiple sizes. We need to replace getFaviconEntry with this new
getIllustrationItem method.
2021-06-19 10:23:24 +05:30
8d39b2c4c1
Added content ZIM home button on 404
2021-06-17 12:51:27 +05:30
78083f1f4a
Moved OPDS templates under static/templates
2021-06-08 20:37:00 +04:00
dd60235010
Fixed the self link in the output of /catalog/v2/entries
2021-06-08 20:37:00 +04:00
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
312f2cb560
Moved handle_catalog_v2*() methods into a new file
2021-06-08 20:37:00 +04:00
fa42cbc48f
Pagination info in /catalog/v2/entries
2021-06-08 20:37:00 +04:00
f1797993af
Reused InternalServer::search_catalog()
2021-06-08 20:37:00 +04:00
f886c8c07b
Root url is normalized once in the constructor
2021-06-08 20:37:00 +04:00
9ca6bd006f
/catalog/v2/categories goes through OPDSDumper too
2021-06-08 20:37:00 +04:00
cdacc0caf1
/catalog/v2/entries going through OPDSDumper
...
OPDSDumper sensed threats to its job security, so it lobbied to be
involved in handling the /catalog/v2 endpoints, too.
2021-06-08 20:37:00 +04:00