649 Commits

Author SHA1 Message Date
Matthieu Gautier
57a197d38d Make getCurrentBookId const. 2018-03-12 17:34:45 +01:00
Matthieu Gautier
cc38d0e5e4 Make searcher's method reset private. 2018-03-12 17:34:45 +01:00
Matthieu Gautier
b6ba10af2a Remove unnecessary currentArticleOffset.
This protected member is never used.
2018-03-12 17:34:45 +01:00
Matthieu Gautier
f93f50087b Remove unnecessary setBookIndex.
We can use default argument instead of creating a new method.
2018-03-12 17:34:45 +01:00
Matthieu Gautier
63339793d2 Add some documentation to kiwix-lib API
Fix #116
2018-03-12 17:34:45 +01:00
Kelson
5ee5929714
Merge pull request #119 from RohanBh/fix-meson-installation
Fix meson installation error by using pip3
2018-03-10 09:13:35 +01:00
RohanBh
683b5249a2 Fix meson installation error by using pip3 2018-03-10 03:10:09 +05:30
Matthieu Gautier
698578ee73
Merge pull request #113 from kiwix/JNI_Reader_exception
Make JNIKiwixReader throw an exception if something goes wrong at creation.
2018-02-01 18:03:05 +01:00
Matthieu Gautier
6adf95c329 Make JNIKiwixReader throw an exception if something goes wrong at creation.
If the `nativeHandle` is null, the JNIKiwixReader is invalid and we must
not use it.

Throwing an exception for the caller code to handle this properly.
And previously, user code has no way to detect something went wrong :/
2018-02-01 17:18:54 +01:00
Matthieu Gautier
9fc840b377
Merge pull request #104 from kiwix/mhutti1/search-snippet
Allow JNI to access search snippets
2017-12-18 14:27:57 +01:00
mhutti1
97bcf57d53 Allow JNI to access search snippets 2017-12-15 16:02:49 +00:00
Kelson
3c614ae47f
Merge pull request #103 from kiwix/mhutti1/videofix
Fix JNI to work with kiwix-android
2017-12-14 20:07:02 +01:00
mhutti1
f303c7502d Fix JNI to work with kiwix-android 2017-12-14 17:32:03 +00:00
Matthieu Gautier
0c8c19a6fb
Merge pull request #102 from kiwix/direct_access
Direct access
2017-12-13 16:31:51 +00:00
Matthieu Gautier
16bd34e6a6 Add a method in the JNI API to get direct access information.
For binary content (not compressed), it could be interesting to
directly read the content in the zim file instead of using `kiwix-lib`.

This method returns the needed information to do so (if possible).
2017-12-13 17:22:26 +01:00
Matthieu Gautier
5a953f191b Remove a small warning. 2017-12-13 17:11:10 +01:00
Matthieu Gautier
c947cceac8
Merge pull request #101 from kiwix/compilation-fixes
Force usage of meson 0.43.0.
2017-12-13 16:10:22 +00:00
Matthieu Gautier
35859a3689 Force usage of meson 0.43.0.
Static compilation is broken with meson 0.44.0
2017-12-13 16:48:12 +01:00
Matthieu Gautier
9b3da52f00
Merge pull request #100 from kiwix/gcc5
Compile using gcc-5 on native ubuntu.
2017-12-04 11:17:41 +00:00
Matthieu Gautier
dee482b2dc Compile using gcc-5 on native ubuntu.
As dependencies prepared by kiwix-build are build using gcc-5
(kiwix/kiwix-build@7fc557d),
we need to also compile libzim using gcc-5.
2017-12-04 11:06:44 +00:00
Matthieu Gautier
281b136ea8
Merge pull request #99 from kiwix/better_search_result_html
Better search result html
2017-11-27 12:46:17 +00:00
Matthieu Gautier
41c92cfc3c Better calculate the start of the last search page.
The increment between pages should always be a multiple of
`resultCountPerPage`.
2017-11-27 12:39:04 +00:00
Matthieu Gautier
64dc5131c0 Be able to specify the global contentHumanReadableId without a index.
Even if we use the add_reader method to search into embedded full text
index, we need to specify the global `contentHumanReadableId` as it will
be used to generate "page links".
2017-11-27 12:37:13 +00:00
Kelson
189c972d17
Merge pull request #97 from kiwix/better_url_encoding
Better URL encoding
2017-11-26 16:01:41 +01:00
kelson42
28b0588df4 Better URL encoding 2017-11-23 19:26:41 +01:00
Matthieu Gautier
2357af8f58
Merge pull request #98 from kiwix/jni_byte_range
Add a API to get only a part of a article content.
2017-11-23 12:40:50 +01:00
Matthieu Gautier
4e5d9f0360 Add a API to get only a part of a article content.
Add the jni method `getContentPart` to get only a part of the artcicle
content.

The method can be used to get a part of the content or to know the size
of the full content.
2017-11-22 19:06:54 +00:00
Matthieu Gautier
2125cd65fa
Merge pull request #78 from kiwix/multisearch_jni
Multisearch jni
2017-11-22 17:13:45 +01:00
mhutti1
520c1edf31 Fix JNI android integration 2017-11-22 14:54:03 +00:00
mhutti1
d2f7503cfa Fix JNI for android integration 2017-11-22 14:54:03 +00:00
Matthieu Gautier
7a59779b77 Change JNI API of kiwix-lib (mainly to support multi-zims search)
This is a major API break. User code will have to be rewritten.

Before this commit, API was a unique object wrapping the library and
handle a global state with one `Reader` and one `Writer` at the time.

Now, the API is axed around three main objects :
 - The `JNIKiwixReader`, a wrapper around a `kiwix::Reader` (who allow to
   read one zim)
 - The `JNIKiwixSearcher`, a wrapper around a `kiwix::Searcher` (who allow
   to search through one or more reader(s))
 - The `JNIKiwixSearcher.Result` a result of a search. Allowing to get all
   information about a result (title, url, content, snippet, ...)
2017-11-22 14:54:03 +00:00
Matthieu Gautier
766b64dddc Update gen_kiwix.sh to not be dependent of the number of arguments. 2017-11-22 14:46:01 +00:00
Matthieu Gautier
e2f16f6030
Merge pull request #95 from kiwix/geo_loc
Add small API to do geo query.
2017-11-20 16:33:10 +01:00
Matthieu Gautier
b9ac7084ac Add small API to do geo query.
This is a small quick and dirty API to do geo query.

It is not possible with this API to do a query search and a geo search.
It's either one or the other.

We should think about a better global API to do searching and provide
both of them in the same time (libzim does it).
2017-11-14 17:32:06 +01:00
Matthieu Gautier
0bd2a15651
Merge pull request #94 from kiwix/bigger_search
Bigger search
2017-11-06 12:30:09 +01:00
Matthieu Gautier
0e8c8f68c5 Extend search limits to 140.
70 is a too small limit for the number of results.
Users need at least 100.

As the html rendering will fails with more than 144 results,
explicitly limits the number of search to 140.

Fixes kiwix/kiwix-tools#92
2017-11-06 12:23:13 +01:00
Matthieu Gautier
382655d83c Explicitly set ctpp2 iIMaxSteps to extends search beyond 68 results.
Ctpp2 templates have a limit step number. If the template to render is
too big, the rendering fails, throwing an exception.

From our tests, it seems that, with the template we have, the default
step limit allow us to render 68 results only.

By doubling the limit, we can render up to 144 results.
2017-11-06 12:10:48 +01:00
Matthieu Gautier
f0bcb1960b Merge pull request #93 from kiwix/pkg_config_version
Fix version in pkg_config.
1.0.1
2017-10-23 18:14:56 +02:00
Matthieu Gautier
d4f0344d9d Fix version in pkg_config. 2017-10-23 15:20:56 +02:00
Matthieu Gautier
48078c809b Merge pull request #92 from kiwix/new_version
New release 1.0.0
1.0.0
2017-10-23 10:11:38 +02:00
Matthieu Gautier
3134ab6b56 New release 1.0.0 2017-10-20 15:19:59 +02:00
Matthieu Gautier
41e3707f1b Merge pull request #90 from kiwix/fix_resource_script
[resource_compiler] Make the exception public.
2017-10-10 14:17:44 +02:00
Matthieu Gautier
d801ff36f6 [resource_compiler] Make the exception public.
This is useless to raise an exception if the exception in not published
in the header.
2017-10-10 13:55:43 +02:00
Matthieu Gautier
5623fedfd0 Merge pull request #91 from kiwix/static_deps
Build with static argument when building for android.
2017-10-10 13:55:20 +02:00
Matthieu Gautier
25a05cc64a Build with static dependencies when building for android or static. 2017-10-10 10:48:48 +02:00
Matthieu Gautier
192a249d23 Merge pull request #88 from kiwix/legoktm-patch2
Rename compile_resources.py to less generic name
2017-09-26 18:02:42 +02:00
Kunal Mehta
5c118a87a1 Rename compile_resources.py to less generic name 2017-09-26 17:56:55 +02:00
Matthieu Gautier
ba35f097d9 Merge pull request #89 from kiwix/use_sudo
Use sudo to install pip3 packages.
2017-09-26 17:56:27 +02:00
Matthieu Gautier
093e8c0498 Use sudo to install pip3 packages. 2017-09-26 17:50:05 +02:00
Matthieu Gautier
8b90221866 Merge pull request #80 from kiwix/no_search_on_splitted
Claims that multi part zim has no embedded full text index.
2017-08-15 14:33:35 -04:00