719 Commits

Author SHA1 Message Date
Nikhil Tanwar
fd7ac7af3c fixup! fixup! fixup! Recursively scan directories for ZIM files 2025-11-30 20:07:59 +01:00
Nikhil Tanwar
63af605e76 fixup! fixup! Recursively scan directories for ZIM files 2025-11-30 20:07:59 +01:00
Nikhil Tanwar
092409dd8c fixup! Recursively scan directories for ZIM files 2025-11-30 20:07:59 +01:00
Nikhil Tanwar
3e20d42168 Recursively scan directories for ZIM files
Added the ability to provide a directory path along with files.
If the path provided is a directory, we recursively scan it and either add the files in it or go through the same operation for sub directories.
2025-11-30 20:07:59 +01:00
Nikhil Tanwar
6d34d9ff97 Corrected zimPathes spelling to zimPaths
Fixed the spelling mistake in zimPathes.
2025-11-30 20:07:59 +01:00
Kelson
abcbe0c9df Merge pull request #788 from kiwix/release-3.8.1
Release 3.8.1
2025-11-30 17:48:26 +01:00
Emmanuel Engelhart
d08638429e Changelog for 3.8.1 2025-11-30 17:47:37 +01:00
Emmanuel Engelhart
5348495c2b Bump-up version to 3.8.1 2025-11-30 17:39:14 +01:00
Kelson
9b91ff1529 Merge pull request #783 from kiwix/fix-kiwix-mange-docopt-integration
Fix kiwix-manage docopt integration
2025-11-17 17:20:39 +01:00
Emmanuel Engelhart
6f599589f9 Fix regression with kiwix-mange 'show' without arguments 2025-11-15 15:33:21 +01:00
Emmanuel Engelhart
6272c6d11e Small kiwix-mange usage() fix 2025-11-15 15:21:44 +01:00
Emmanuel Engelhart
0bcb3957e5 Fix kiwix-manage 'add' docopt definition 2025-11-15 14:58:53 +01:00
Emmanuel Engelhart
16f2734699 'ZIM' not 'zim' 2025-11-15 14:58:53 +01:00
tim-moody
45f0b0601e Fix kiwix-manage 'remove' docopt definition 2025-11-15 14:58:46 +01:00
Kelson
d61eafe6a2 Merge pull request #763 from vighnesh-sawant/standard-port-enhancment
Improve message when server is running on standard port
2025-11-01 17:09:53 +01:00
Vighnesh
ae21ba42da Display better message when using standard port 2025-11-01 07:09:25 +01:00
Kelson
830a9e5e29 Merge pull request #773 from kiwix/release-3.8.0
Release 3.8.0
2025-10-31 17:41:12 +01:00
Emmanuel Engelhart
b22c10f6ff 3.8.0 Changelog 2025-10-31 17:37:31 +01:00
Emmanuel Engelhart
863fe0f973 Use libkiwix 14.1.0 2025-10-31 16:45:34 +01:00
Kelson
769182731c Merge pull request #772 from kiwix/yashgoyal0110-alpine-version-update
Update Kiwix Server base image from alpine:3.18 to alpine:3.22
2025-10-24 12:40:38 +02:00
yashgoyal0110
b679e5d159 Update Kiwix Server base image from alpine:3.18 to alpine:3.22 2025-10-24 12:39:15 +02:00
Kelson
a6af7707e4 Merge pull request #747 from kiwix/doc-fix-search-pagination-offset
Pagination default index is '0'
2025-10-24 12:36:04 +02:00
Emmanuel Engelhart
3ebd070d20 Pagination default index is '0' 2025-10-24 12:25:43 +02:00
Kelson
6ed59398e4 Merge pull request #768 from kiwix/spelling_correction
kiwix-search --spelling ZIMFILE PATTERN
2025-10-17 16:10:42 +02:00
Veloman Yunkan
80dcf95b7f kiwix-search --spelling ZIMFILE PATTERN
Added spelling correction functionality to kiwix-search. The spellings
database is created under ~/.cache/kiwix.
2025-10-06 16:57:12 +04:00
Kelson
90f4562408 Merge pull request #755 from Sedetius/rootles-docker
[Docker] kiwix-serve image to use unprivileged user
2025-09-28 17:30:36 +02:00
rgaudin
869b08cf71 Minor comment wording 2025-09-28 17:25:04 +02:00
Sedetius
ae1640736c Moved user creation in kiwix-serve dockerfile before COPY start.sh to automatically use the new users file permissions. 2025-09-28 17:25:04 +02:00
Sedetius
40d32cfc32 Switched from legacy dockerfile LABEL key value format to new one. 2025-09-28 17:25:04 +02:00
Sedetius
463015da45 Changed default user name in kiwix-serve Dockerfile to avoid confusion with other kiwix services. 2025-09-28 17:25:04 +02:00
Sedetius
0ba30b5525 Adapted Kiwix Serve Dockerfile for rootless Docker support 2025-09-28 17:25:04 +02:00
Kelson
e22cfea9d9 Merge pull request #759 from kiwix/catalog_only_mode
kiwix-serve --catalogOnly --contentServerURL=<URL>
2025-09-12 15:19:15 +02:00
Veloman Yunkan
fcc8877cb0 Upgraded CI runner to jammy 2025-09-12 16:20:57 +04:00
Veloman Yunkan
5fdea94c05 Strip trailing slashes from --contentServerURL option 2025-09-08 16:25:51 +04:00
Veloman Yunkan
597223196d kiwix-serve --contentServerURL=<URL> 2025-09-08 16:25:51 +04:00
Veloman Yunkan
824eddaf94 kiwix-serve --catalogOnly 2025-09-08 16:25:51 +04:00
Kelson
7413682060 Fix Build Status badge link in README.md 2025-09-08 11:55:15 +00:00
Kelson
0125188bc0 Update Build Status badge in README.md 2025-09-08 11:54:14 +00:00
Kelson
acad8a85ab Update Docker badges README.md
Because old domain name has been deprecated, see https://github.com/eggplants/ghcr-badge
2025-06-13 10:01:27 +00:00
Kelson
2e4cae72ef Merge pull request #748 from kiwix/remove-ubuntu-20.04-ci-cd
Stop publishing on Ubuntu 20.04 PPA
2025-06-13 10:58:20 +02:00
Emmanuel Engelhart
5c2a483929 Stop publishing on Ubuntu 20.04 PPA 2025-06-13 10:42:28 +02:00
benoit74
0d38d071a8 Fix funding-manifest-urls content 2025-04-20 17:24:10 +02:00
benoit74
0091ffa1ca Add file for funding.json 2025-04-19 07:36:31 +00:00
Kelson
43b00419dd Merge pull request #722 from kiwix/stop-windows-ci-debug
Compile in release mode for Windows
2024-12-21 12:20:28 +01:00
Emmanuel Engelhart
f2c78ca03b Compile in release mode for Windows 2024-12-21 12:14:30 +01:00
Kelson
73f357a627 Merge pull request #720 from kiwix/few-workflow-fixes
Few workflow fixes
2024-12-20 17:10:08 +01:00
Emmanuel Engelhart
0fd4abeeae Remove a CI step which is now useless 2024-12-20 17:05:40 +01:00
Emmanuel Engelhart
998bbc6b0e Add a few spaces in workflow 2024-12-20 17:01:10 +01:00
Emmanuel Engelhart
e12687b1ec Use fix OS dependency 2024-12-20 16:58:07 +01:00
Emmanuel Engelhart
e6ff088ffa Bump-up to action/checkout@v4 2024-12-20 16:54:58 +01:00
Emmanuel Engelhart
87c6eb837d Bump-up to actions/upload-artifact@v4 2024-12-20 16:53:47 +01:00
Emmanuel Engelhart
88ceebab8a Deprecate set-output fron package workflow 2024-12-20 16:53:46 +01:00
Kelson
dac84999bc Merge pull request #719 from kiwix/fix-deb-control-dep-versions
Remove useless patch part of dep. versions
2024-12-20 16:53:31 +01:00
Emmanuel Engelhart
5b8d72de5d Remove useless patch part of dep. versions 2024-12-20 16:41:34 +01:00
Kelson
e65354a486 Merge pull request #704 from kiwix/feature/serve-all-ips
kiwix-serve displays both protocol attached ips
2024-10-02 19:32:11 +00:00
sgourdas
55b42f27b6 Code cleanup 2024-10-02 21:36:44 +03:00
sgourdas
24c0b7220e Fix usage 2024-10-02 21:36:44 +03:00
sgourdas
b1dd681c59 kiwix-serve displays both protocol attached ips 2024-10-02 21:36:42 +03:00
Kelson
c6b72e9362 Merge pull request #706 from kiwix/kiwix-serve-supported-browsers
Clear support list of kiwix-serve supported browsers
2024-09-20 19:07:31 +00:00
Emmanuel Engelhart
362db1094d Clear support list of kiwix-serve supported browsers 2024-09-20 21:06:52 +02:00
Kelson
7512611146 Merge pull request #707 from kiwix/kiwix2libkiwix_transition
libkiwix now identifies itself as libkiwix
2024-09-19 19:24:19 +00:00
Veloman Yunkan
3599e8476d libkiwix now identifies itself as libkiwix 2024-09-16 17:50:20 +04:00
Kelson
5e222b3f0b Merge pull request #705 from kiwix/better-libzim-version-check
Better check libzim and libkiwix deps
2024-09-15 19:38:01 +02:00
Emmanuel Engelhart
ce3c3bd153 Better check libzim and libkiwix deps 2024-09-15 19:01:25 +02:00
Kelson
da22757a14 Merge pull request #702 from kiwix/remove-ci-windows-crosscompilation
Remove Windows binaries cross-compile from CI
2024-09-07 13:13:47 +00:00
Emmanuel Engelhart
f0a8643603 Remove Windows binaries cross-compile from CI 2024-09-07 13:03:44 +00:00
Kelson
84faf9c09e Merge pull request #698 from kiwix/refresh-deb-packages-ci-cd
Refresh deb packages CI/CD
2024-09-07 13:01:09 +00:00
Emmanuel Engelhart
f912519647 Use pkgconf package in palce of pkg-config 2024-09-02 18:23:51 +00:00
Emmanuel Engelhart
e609c1c826 Use fix build OS 2024-09-02 18:23:51 +00:00
Emmanuel Engelhart
fdcea9889f Proper workflow triggers 2024-09-02 18:23:51 +00:00
Emmanuel Engelhart
4ec05bf98e Refresh deb packages CI/CD 2024-09-02 18:23:51 +00:00
Kelson
2bab9a210e Merge pull request #700 from kiwix/update_libkiwix_dep
Update libkiwix dependency version
2024-09-02 09:31:15 +00:00
Matthieu Gautier
28008efb28 Update libkiwix dependency version
Libkiwix has move to major version 14 https://github.com/kiwix/libkiwix/pull/1116
2024-09-02 11:13:45 +02:00
Kelson
f6baad903f Merge pull request #697 from kiwix/bump-up-version-to-3.8.0
Bump up version to 3.8.0
2024-09-01 13:03:01 +00:00
Emmanuel Engelhart
984741de03 deb files requires libkiwix14 2024-09-01 14:57:16 +02:00
Emmanuel Engelhart
b557d0a1dc Bump-up version to 3.8.0 2024-09-01 14:56:21 +02:00
Kelson
98483170c9 Merge pull request #695 from kiwix/windows_ci
Add a Windows CI.
2024-08-31 12:24:07 +00:00
Emmanuel Engelhart
c94c1bae6c Add cmake to deb control file (needed by docopt) 2024-08-31 14:23:20 +02:00
Matthieu Gautier
b45426640e Add kiwix-serve documentation link in USAGE 2024-08-30 16:03:29 +02:00
Matthieu Gautier
504affb481 Add docopt dependencies to ubuntu packages 2024-08-30 16:03:29 +02:00
Matthieu Gautier
6a4b7508f0 Ask windows to not define min and max. 2024-08-30 16:03:29 +02:00
Matthieu Gautier
cebe079c11 Don't use sig_atomic_t on Windows.
We don't setup signal handler on Windows, so we can replace
`volatil sig_atomic_t` by simple `bool`.
2024-08-30 16:03:29 +02:00
Matthieu Gautier
945c4d61e6 Port kiwix-search to docopt 2024-08-30 15:49:10 +02:00
Matthieu Gautier
504a7a1ab7 Port kiwix-manage to docopt. 2024-08-30 15:48:51 +02:00
Matthieu Gautier
76b617817a Port kiwix-serve to docopt. 2024-08-30 15:48:37 +02:00
Matthieu Gautier
9eab766ff9 Add a Windows CI.
Compilation of kiwix-tools is broken on Windows.
But let's setup the CI to validate the PR.
2024-08-27 15:49:17 +02:00
Kelson
4b3d6202e7 Merge pull request #681 from kiwix/sandstorm-badge-removal
Remove Sandstorm badge in README.md (unmaintained)
2024-06-02 09:15:05 +02:00
Kelson
e18ffe19dc Remove Sandstorm badge in README.md (unmaintained) 2024-06-02 09:12:41 +02:00
Kelson
353d20bf83 Merge pull request #673 from aryanA101a/main
Add IPv6 support to Kiwix Server
2024-06-01 17:49:06 +02:00
Aryan Arora
5f69a41259 add ipv6 support & update docs 2024-06-01 14:59:43 +05:30
Matthieu Gautier
2cc1ca4017 Merge pull request #679 from kiwix/fix_ci_pr 2024-05-30 11:43:57 +02:00
Matthieu Gautier
dc1067b8c4 Run the CI on pull_request.
Running the CI on push only trigger the CI on a push on the current repository.
It works on PR based on local branch but not for PR from remote repository.
2024-05-30 11:38:02 +02:00
Matthieu Gautier
5e7166cb07 Merge pull request #672 from kiwix/build_dir 2024-04-09 12:56:35 +02:00
Matthieu Gautier
24d81f9507 Build kiwix-tools with new archive from kiwix-build 2024-04-08 16:45:54 +02:00
Kelson
fcbb4a56bc Merge pull request #668 from kiwix/prepare-release-3.7.0
Prepare release 3.7.0
2024-03-13 15:17:32 +01:00
Emmanuel Engelhart
e37af51dd4 new 3.7.0 Changelog 2024-03-13 15:15:09 +01:00
Emmanuel Engelhart
43704c6154 Proper deb lizim/libkiwix dependencies 2024-03-13 15:15:09 +01:00
Emmanuel Engelhart
d25fda82be Request libzim9 2024-03-13 15:15:03 +01:00
Emmanuel Engelhart
279cdcda0b Bump-up version to 3.7.0 2024-03-13 15:14:11 +01:00
Kelson
331743ea29 Merge pull request #661 from kiwix/max-dependence-version
Check max version of libzim/libkiwix
2024-03-13 15:12:23 +01:00
Emmanuel Engelhart
19f11d8777 Check max version of libzim/libkiwix 2024-03-13 15:10:07 +01:00
Kelson
3377f9e8bb Merge pull request #666 from kiwix/implement_skip_option_2
kiwix-serve: Skip invalid ZIM files and continue startup #659
2024-03-13 15:09:43 +01:00
Emmanuel Engelhart
930c8321ca Add --skipInvalid option to man page 2024-03-10 16:53:15 +01:00
Emmanuel Engelhart
a3239ea8bc Rename --skipBroken to --skipInvalid 2024-03-10 16:50:34 +01:00
Florian Schüller
456c77d8fd kiwix-serve: Skip broken ZIM files and continue startup 2024-03-10 16:47:14 +01:00
Matthieu Gautier
7913b6a4f0 Merge pull request #665 from kiwix/documentation 2024-03-08 09:28:06 +01:00
Veloman Yunkan
027f7d6620 Reinstated the RTD Sphinx Theme for documentation
Sometime in 2023 the default theme on Read-the-Docs was changed to
Alabaster. This change enforces the old theme (sphinx_rtd_theme).
2024-03-07 18:53:37 +04:00
Matthieu Gautier
18b532a923 Merge pull request #664 from kiwix/documentation 2024-03-06 18:19:40 +01:00
Veloman Yunkan
21a145d999 Fixed the copyright date 2024-03-06 21:15:09 +04:00
Veloman Yunkan
be89de2bbe More conspicuous "ZIM name" links 2024-03-06 21:15:09 +04:00
Veloman Yunkan
433010a900 Clarified handling of naming conflicts 2024-03-06 21:15:09 +04:00
Veloman Yunkan
dd14e02741 Documented a couple of /search API's caveats 2024-03-06 21:15:09 +04:00
Veloman Yunkan
8ea12b2ce5 Fixed the "book name"-vs-"ZIM name" bug in docs 2024-03-06 21:15:09 +04:00
Matthieu Gautier
67c0ebd6ad Merge pull request #652 from kiwix/ghaction
Use kiwix-build's github action to download dependencies.
2023-12-20 11:57:05 +01:00
Matthieu Gautier
c5197ceb51 Use kiwix-build's github action to download dependencies. 2023-12-19 17:17:05 +01:00
Kelson
98b4fb3cdf Merge pull request #649 from kiwix/need-libkiwix-13
Requires libkiwix13+
2023-11-19 14:19:31 +01:00
Emmanuel Engelhart
33bdf56bdd Requires libkiwix13+ 2023-11-19 14:16:05 +01:00
Kelson
4556262c87 Merge pull request #648 from kiwix/release-3.6.0
Release 3.6.0
2023-11-19 14:13:57 +01:00
Emmanuel Engelhart
cb2159b114 Changelog for 3.6.0 2023-11-19 14:11:59 +01:00
Emmanuel Engelhart
5b45e1898b Bump-up version to 3.7.0 2023-11-19 13:59:52 +01:00
Kelson
f6128b9079 Merge pull request #643 from computerscienceiscool/patch-2 2023-10-20 10:20:47 +02:00
JJ
ba64c1637e Update README.md
Single spelling error fixed.
2023-10-20 01:02:02 -07:00
Matthieu Gautier
3a0e87d8ea Merge pull request #633 from kiwix/adapt_libkiwix_991 2023-10-12 18:05:52 +02:00
Kelson
9ca2b9fc16 Merge pull request #639 from computerscienceiscool/patch-1
Update README.md
2023-10-08 18:38:47 +02:00
JJ
f5932bf5d3 Update README.md
Fixed a few spelling and grammar errors.
2023-10-08 18:37:52 +02:00
Matthieu Gautier
018df0d563 Adapt to new api introduced in kiwix/libkiwix#991 2023-10-06 15:47:30 +02:00
Matthieu Gautier
76ac5ce93f Remove Ubuntu Kinetic from CI/CD (deprecated) 2023-10-06 15:47:30 +02:00
Matthieu Gautier
d0847525c6 Time to switch the CI to focal. 2023-10-06 15:47:30 +02:00
Matthieu Gautier
7f0c1d8a3f Merge pull request #642 from kiwix/fix_docs 2023-10-06 15:47:10 +02:00
Matthieu Gautier
bd9e67f48e Add readthedocs configuration 2023-10-06 15:33:40 +02:00
Kelson
a4cc4ba55b Merge pull request #636 from kiwix/cpp17
Move to c++17.
2023-09-22 17:38:55 +02:00
Matthieu Gautier
1a1274012f Move to c++17.
All our compilers should handle c++17. Let's move on.
2023-08-30 17:58:40 +02:00
Kelson
74712ff022 Merge pull request #631 from kiwix/kiwix-serve-docker-readme
Dedicated Docker Compose section
2023-08-13 09:39:44 +02:00
Emmanuel Engelhart
3c6971fced Dedicated Docker Compose section 2023-08-13 09:38:59 +02:00
Kelson
7a7eaaba0e Merge pull request #626 from iArchitSharma/patch-1
Added missing parameters to kiwix-serve.1
2023-07-12 15:20:43 +02:00
Archit Sharma
d166947447 Added missing parameters to kiwix-serve.1 2023-07-12 13:38:11 +05:30
Kelson
92ee72a8f2 Merge pull request #622 from kiwix/new-archs
Docker images for new architectures
2023-06-16 18:03:35 +02:00
renaud gaudin
d0f8226f50 Docker images for new architectures
- Fixes the release filename for arm64 and armv7
- Add new architectures for i386 and armv6
2023-06-16 17:59:33 +02:00
Kelson
221055f49c Merge pull request #621 from kiwix/docker-readme-improvements
Docker readme improvements
2023-05-24 10:53:31 +03:00
Emmanuel Engelhart
a463c31a0c Add example with globbing 2023-05-24 09:51:42 +02:00
Emmanuel Engelhart
6e239d5cb6 Add link to Kiwix server container image 2023-05-24 09:51:11 +02:00
Emmanuel Engelhart
191dc95266 Fix small typo in the usage() 2023-05-23 17:05:03 +02:00
Matthieu Gautier
840f92c677 Merge pull request #618 from kiwix/fix_clone_ci 2023-05-03 16:31:10 +02:00
Matthieu Gautier
f03dc46342 Remove custom git clone
Now possible because of new Docker images and proper user/permission mgmt
within the container.
2023-05-03 15:34:41 +02:00
Kelson
a8a62aef74 Merge pull request #617 from jgmoss/main
Update docker-compose.yml to use ghcr.io image
2023-04-29 13:42:28 +02:00
Graham Moss
7f9bf58742 Update docker-compose.yml to use ghcr.io image 2023-04-28 15:01:05 -04:00
Matthieu Gautier
4cf2f4f2c9 Merge pull request #616 from kiwix/version_3.5.0 2023-04-28 11:36:55 +02:00
Matthieu Gautier
b6e7ed3443 New version 3.5.0 2023-04-28 11:07:22 +02:00
Matthieu Gautier
806747320c Merge pull request #615 from kiwix/no_static_on_macos 2023-04-28 08:20:38 +02:00
Matthieu Gautier
6765239341 Do not build with --static on maco_os. 2023-04-28 08:16:31 +02:00
Kelson
4e992a18e8 Merge pull request #608 from kiwix/ghcr
removed references to docker.io
2023-03-22 16:30:32 +01:00
renaud gaudin
3d9348092b removed references to docker.io 2023-03-22 15:23:31 +00:00
Kelson
1024360598 Merge pull request #607 from kiwix/update-ci-base-container-images
Bump-up CI container images for r36
2023-03-16 13:52:33 +01:00
Emmanuel Engelhart
cfc249b9cf Bump-up CI container images for r36 2023-03-16 13:48:43 +01:00
Kelson
688bb356ea Merge pull request #603 from kiwix/documentation
Documentation updates
2023-02-11 12:47:10 +01:00
Veloman Yunkan
d398ebdb3e Added missing information about /search endpoint 2023-02-11 12:04:18 +01:00
Veloman Yunkan
6ab6abc6d3 Noted the HTTP API type (public/private) in the docs 2023-02-11 11:20:32 +01:00
Matthieu Gautier
0059c6a213 Merge pull request #602 from kiwix/zerocount_catalog_query_doc_update 2023-02-10 19:46:51 +01:00
Veloman Yunkan
eac5898ca8 Doc update for /catalog/v2/entries?count=0 2023-02-10 19:33:10 +01:00
Kelson
edb97fb055 Merge pull request #601 from kiwix/update-ubuntu-packages
Remove PPA Impish, add Kinetic
2023-02-10 18:59:24 +01:00
Emmanuel Engelhart
e1b314267b Remove PPA Impish, add Kinetic 2023-02-10 18:56:21 +01:00
Kelson
0df6a1624b Merge pull request #599 from kiwix/documentation_of_catalog_pagination
Fixed & elaborated documentation of OPDS catalog pagination
2023-02-10 18:52:23 +01:00
Veloman Yunkan
07bc21754b Fixed & elaborated documentation of catalog pagination 2023-02-10 16:46:14 +01:00
Kelson
6f2e6ce866 Merge pull request #598 from kiwix/update-workflow-actions
Update GitHub workflow actions
2023-02-05 13:28:13 +01:00
Emmanuel Engelhart
4e8d3097b9 Update GitHub workflow actions 2023-02-05 13:25:19 +01:00
Kelson
ad58d74699 Merge pull request #597 from jacroe/docker-compose-fix-wildcard
Docker compose example: Surround wildcard statement in quotes
2023-02-02 07:13:20 +01:00
Jacob Roeland
0f25fa69d3 Surround wildcard statement in quotes 2023-02-02 00:26:46 -05:00
Matthieu Gautier
4949accdf3 Merge pull request #586 from kiwix/documentation 2023-01-04 17:56:43 +01:00
Veloman Yunkan
7c7cd42e83 Added docs badge to README 2023-01-04 19:44:49 +04:00
Veloman Yunkan
996ea031fc Documented the /search endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
7179244c47 Documented the /raw endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
68d3c9d81d Documented the /suggest endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
7f86317537 Documented the /catch/external endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
436f1b83f6 Documented library reloading via SIGHUP 2023-01-04 19:43:20 +04:00
Veloman Yunkan
490ba0f3f2 Documented the OPDS API 2023-01-04 19:43:20 +04:00
Veloman Yunkan
591a347647 Added glossary to kiwix-serve's documentation 2023-01-04 19:43:20 +04:00
Veloman Yunkan
ecf5e67759 Documented the --library option 2023-01-04 19:43:20 +04:00
Veloman Yunkan
ec2effe257 Cross-referenced a few options 2023-01-04 19:43:20 +04:00
Veloman Yunkan
244009f3b1 Marked options with directives
This will enable cross-referencing them.
2023-01-04 19:43:20 +04:00
Veloman Yunkan
11ef036174 Documented the /random endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
7b5b0cd7f7 Documented the /skin endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
2aef2d4a92 Expanded the /catalog endpoint 2023-01-04 19:43:20 +04:00
Veloman Yunkan
76023e9231 Started documenting kiwix-serve HTTP API 2023-01-04 19:43:20 +04:00
Veloman Yunkan
614f15913f Added introduction to kiwix-serve's documentation 2023-01-04 19:43:20 +04:00
Veloman Yunkan
6957a8cb1e Enter docs/
This commit introduces an embryo of sphinx-based documentation. The
content of documentation in this commit is limited to the command line
options of kiwix-serve.
2023-01-04 19:43:20 +04:00
Kelson
c6b6a47711 "main" is the new git default branch 2022-12-27 14:16:58 +01:00
Kelson
9f93677b66 "main" is the new git default branch 2022-12-27 14:10:56 +01:00
Matthieu Gautier
756d5b4a04 Merge pull request #585 from kiwix/version_3.4.0 2022-11-30 18:09:14 +01:00
Matthieu Gautier
0f81dad6a4 New version 3.4.0
* Remove last reference to kiwix-read tool (@legoktm #569)

kiwix-serve
-----------

 * Fix broken indentation in usage (@kelson42 #560)
 * Exit if wrong arguments are passed (@kelson42 #567)
 * Do not allow multiple values for same option (@juuz0 #564)
 * Fix default location of "rootLocation" (@rgaudin #571)
 * [DOCKER] Change default port to 8080 (@neyder #581)
 * [DOCKER] Simplify dockerfile (@rgaudin #582)

kiwix-manage
------------

 * Fix man page (@kelson42 #576)
2022-11-30 18:04:27 +01:00
Kelson
252e3bc962 Merge pull request #582 from kiwix/simpler-dockerfile
Simpler dockerfile
2022-10-26 18:10:22 +02:00
renaud gaudin
cf6d66b2c2 Updated actions dependencies 2022-10-26 16:04:46 +00:00
renaud gaudin
a6713db7fe Simplified Dockerfile
- using alpine's dumb-init to remove builder
- simplifying arch management
- extracting to final location
2022-10-26 16:04:40 +00:00
Kelson
4137d9f517 Merge pull request #581 from neyder/master
Make kiwix-serve easily deployable on podman Openshift
2022-10-26 17:26:33 +02:00
Neyder Achahuanco Apaza
1a25b42517 Fixed README 2022-10-24 17:00:32 -05:00
Neyder Achahuanco Apaza
70c390c7d1 Modify documentation to reflect PORT variable and default to 8080 2022-10-23 09:54:46 -05:00
Neyder Achahuanco Apaza
847d1e9e76 Modify default port so it cna be used on secured kubernetes 2022-10-21 15:11:14 -05:00
Kelson
2a9378e24e Merge pull request #576 from kiwix/kiwix-manage-man-url-fix
Rewritten kiwix-manage man
2022-09-25 20:56:22 +02:00
Emmanuel Engelhart
dd53bef147 Fix: Create library file if necessary with 'add' action 2022-09-24 20:19:40 +02:00
Emmanuel Engelhart
6f0f666be5 Fix: Add actions in bold 2022-09-18 17:12:05 +02:00
Emmanuel Engelhart
0a7e91ceb7 Fix: Fix missing enclosures 2022-09-18 17:05:36 +02:00
Emmanuel Engelhart
db7f30fb81 Fix: Remove example library.xml because useless 2022-09-18 17:00:53 +02:00
Emmanuel Engelhart
3c6e8ed6c8 Fix: simple ALOS typo 2022-09-18 16:57:47 +02:00
Emmanuel Engelhart
cef30cd0b8 Rewritten kiwix-manage man page 2022-09-10 11:04:40 +02:00
Kelson
ce9e3e82e3 Merge pull request #569 from kiwix/rm-kiwix-search-man
Remove more references to kiwix-read
2022-07-31 09:45:54 +02:00
Kunal Mehta
0df3c14faa Remove more references to kiwix-read
Was removed in f9ce353ad1.
2022-07-31 09:43:53 +02:00
Kelson
092be45512 Merge pull request #571 from kiwix/rootLocation
Default kiwix-serve's rootLocation to "/"
2022-07-28 19:11:33 +02:00
renaud gaudin
442de30ff7 Normalize printed rootLocation
Reusing libkiwix's normalizeRootUrl() to display a more reliable representation of the
rootLocation the InternalServer will be using.

Can't reuse server.m_root as it is private.
2022-07-28 15:51:46 +00:00
renaud gaudin
9c16e53767 Default kiwix-serve's rootLocation to "/""
Usage mentions that the rootLocation defaults to `/` while it was not.
It defaulted to an empty string.

While it defaulting to "" or "/" has no technical consequence: libkiwix's server
normalizes the requested rootLocation ; it leads to users setting a "/"-prefixed
rootLocation when customizing it, resulting in double-slashed print of the URL
to access kiwix-serve at.

This harmonizes usage and actual default, fixing the URL print.
2022-07-28 11:30:48 +00:00
Matthieu Gautier
f9dc22a671 Merge pull request #565 from kiwix/multipleAddresses 2022-07-11 14:15:20 +02:00
Nikhil Tanwar
7526148f89 Do not allow multiple values for same option
Previously, kiwix-serve would take the last value for the same option. This was unintuitive.
This change exits the program if multiple values for the same option are found.
2022-07-11 11:21:09 +02:00
Kelson
da55468a88 Merge pull request #567 from kiwix/exit-if-argument-error
Exit if wrong argument given to kiwix-serve
2022-07-11 11:11:50 +02:00
Emmanuel Engelhart
86fac0e9af Exit if wrong argument given to kiwix-serve 2022-07-10 21:33:27 +02:00
Kelson
5709d4d489 Merge pull request #564 from kiwix/fixHeader
Add iostream header and namespace std
2022-07-07 06:34:51 +02:00
Nikhil Tanwar
8efa71d307 Use std namespace consistently
Previously, there was an inconsistent usage of no namespace vs namespace.
This change fixes that by correctly adding std:: whenever required.
Adds iostream header in src/version.h to fix cout/cerr problems.
2022-07-06 20:55:44 +05:30
Kelson
3f076c2b27 Merge pull request #560 from kiwix/fix-identation
Fix broken indentation in usage()
2022-06-23 10:30:47 +02:00
Emmanuel Engelhart
6266c3baa8 Fix broken indentation in usage() 2022-06-23 10:26:43 +02:00
Matthieu Gautier
b2bc6cead2 Merge pull request #559 from kiwix/version_3.3.0 2022-06-15 14:46:15 +02:00
Matthieu Gautier
b7a6f78150 New version 3.3.0 2022-06-15 14:25:48 +02:00
Kelson
9e3d4c9615 Merge pull request #558 from kiwix/limit_books_search
Add a option to limit the number of zim in a fulltext multizim search.
2022-06-14 11:03:14 +02:00
Matthieu Gautier
472ff19861 [CI] Use last docker image (and dependencies) 2022-06-14 10:49:46 +02:00
Matthieu Gautier
97aa28c74d Add a option to limit the number of zim in a fulltext multizim search. 2022-06-14 10:41:31 +02:00
Kelson
2c40d23991 Merge pull request #555 from kiwix/manager_add_no_library
It is ok to not be able to read library if we ADD book to non existant library
2022-06-06 17:37:24 +02:00
Matthieu Gautier
ca8d6e570c It is ok to not be able to read library if we ADD book to non existant lib 2022-06-03 10:54:43 +02:00
Matthieu Gautier
78887d6815 Merge pull request #553 from kiwix/manager_return_code 2022-06-03 09:11:59 +02:00
Matthieu Gautier
643a07f653 Make kiwix-manage return with something !0 if something went wrong 2022-06-02 23:01:58 +02:00
Matthieu Gautier
9a07dd8314 Merge pull request #546 from kiwix/fix_win_cross_compilation 2022-03-11 14:45:04 +01:00
Matthieu Gautier
bdd36f0379 Do not define stat if not necessary.
On recent mingw compiler, `stat` is already defined the same way we do.
So we don't need to do it.
2022-03-11 14:41:47 +01:00
Kelson
62195c788e Merge pull request #541 from kiwix/ci_fix 2022-02-14 10:34:52 +01:00
Veloman Yunkan
fa7948abbe Fixed armhf_static CI build 2022-02-14 11:17:37 +04:00
Kelson
2c701cb260 Merge pull request #535 from kiwix/saying_no_to_deprecated_libkiwix_api
Removed the usage of libkiwix deprecated API
2022-02-10 10:34:32 +01:00
Veloman Yunkan
8b36e94d50 Now kiwix-tools is built with werror=true 2022-02-10 13:13:11 +04:00
Veloman Yunkan
f9ce353ad1 Goodbye kiwix-read
`kiwix-read` was a confusing tool. It was a loose equivalent of
`kiwix-search --suggest` also able to work on old ZIM archives that didn't
contain a title index. Its existence is not justified.
2022-02-10 13:13:10 +04:00
Veloman Yunkan
2bb080ee3b Cleared kiwix-search of libkiwix deprecated API 2022-02-10 13:13:10 +04:00
Kelson
dd5aa33775 Merge pull request #534 from kiwix/ipLimit
Add ip connection limit option
2022-02-06 15:23:39 +01:00
Emmanuel Engelhart
0ed608f5c2 Cosmetic changes in kiwix-serve usage() 2022-02-06 15:22:09 +01:00
Nikhil Tanwar
8f4758a6a9 Add ip connection limit option
Adds --ipConnectionLimit/-L option to change MHD_OPTION_PER_IP_CONNECTION_LIMIT by calling server.setIpConnectionLimit()
2022-02-05 18:31:01 +05:30
Kelson
b10f2ed1a1 Merge pull request #530 from kiwix/legoktm-patch-1
PPA: Remove Ubuntu Hirsute, EOL
2022-02-01 08:29:22 +01:00
Kunal Mehta
94549828cb PPA: Remove Ubuntu Hirsute, EOL 2022-01-31 23:13:46 -08:00
Kelson
f342bd5e24 Merge pull request #526 from kiwix/legoktm-patch-1 2022-01-24 06:42:36 +01:00
Kunal Mehta
f316bb14a2 PPA: Fix libzim-dev and libkiwix-dev dependencies
Our libzim packages are "7.2.0~focal" but the ~ means that "7.2.0" is greater than
"7.2.0~focal" so the dependency can't be satisfied. Depending on "7.2.0~" will
allow "7.2.0~focal" to satisfy the dependency. Same for libkiwix.
2022-01-23 20:31:31 -08:00
Matthieu Gautier
ea44dc76f6 Merge pull request #525 from kiwix/version_3.2.0 2022-01-20 14:38:07 +01:00
Matthieu Gautier
6dfdcea5ce New version 3.2.0 2022-01-19 17:03:14 +01:00
Matthieu Gautier
0ef85944b8 Update dependencies.
zlib and microhttpd are used by libkiwix, not kiwix-tools.

We indeed need libzim, but we use no feature related to xapian so no
need to mark it as mandatory.
(Libkiwix needs it and the check is there)
2022-01-19 17:03:14 +01:00
Kelson
04ac15508f New deps needed (#523)
* kiwix-tools need libkiwix 10.0.0

* Compilation requires libzim 7.2.0 now
2022-01-19 13:04:25 +01:00
rgaudin
eeb41d8047 Merge pull request #524 from OlegSmelov/fix/dockerfile
Fix dumb-init HTTPS download in Dockerfile
2022-01-17 09:00:28 +00:00
Oleg Smelov
85a3093df3 Fix dumb-init HTTPS download in Dockerfile 2022-01-16 20:39:19 +02:00
Kelson
2c435926ca Merge pull request #522 from kiwix/showCustomRoot
Add root location in startup message
2022-01-14 16:18:34 +01:00
Nikhil Tanwar
b8c4791dd0 Add root location in startup message 2022-01-14 17:41:34 +05:30
Kelson
701541aa2f Merge pull request #520 from kiwix/no_werror
Do not compile with `werror=true`.
2022-01-12 19:20:17 +01:00
Matthieu Gautier
527981ba66 Do not compile with werror=true.
We are using `kiwix::Reader` and `kiwix::Searcher` which are now
deprecated.
Remove `werror` until we fix this.
2022-01-12 18:22:46 +01:00
Kelson
d8ed915c80 Merge pull request #517 from kiwix/fileExists
Change kiwix::fileExists to kiwix::fileReadable
2022-01-09 20:17:26 +01:00
Nikhil Tanwar
74d3bffde0 Change kiwix::fileExists to kiwix::fileReadable 2022-01-09 20:10:45 +01:00
Kelson
b974e121b4 Merge pull request #516 from kiwix/dependences_version
Print dependence versions
2022-01-03 09:02:58 +01:00
Emmanuel Engelhart
d2bb9d123e Print dependence versions 2022-01-03 08:54:38 +01:00
Kelson
9b158360a6 Merge pull request #499 from kiwix/startup-message
Add startup message to provide http url to server
2021-12-22 18:38:25 +01:00
Nikhil Tanwar
7d2c67f43d Add startup message to provide http url to server 2021-12-22 18:37:13 +01:00
Kelson
a080a3137e Merge pull request #515 from kiwix/dumb-init
Fixed docker image for non-amd64 platforms
2021-12-21 12:00:29 +01:00
renaud gaudin
dedcae83cd Fixed docker image for non-amd64 platforms
PR#489 (01430603b6) introduced dumb-init for better
signals handling.
While this has the intended effect, it was done ny downloading the dumb-init static bin
into the image… only using the amd64 version.

Ever since, the image(s) have been broken for armv7 and arm64.

As dumb-init doesn't provide 32b arm binary and because it's such a simple/small code,
this fix compiles it in a builder shallow image ; ensuring we're getting an appropriate
binary for the target arch.

We are also statically linking against musl-C as this is supported by dumb-init and is
much smaller than glibc.
2021-12-21 10:27:28 +00:00
Kelson
c0fa06c931 Merge pull request #514 from kiwix/legoktm-patch-1
PPA: Reinstate Ubuntu Impish, add Jammy
2021-12-20 07:57:17 +01:00
Kunal Mehta
dbe6126496 PPA: Reinstate Ubuntu Impish, add Jammy 2021-12-19 16:47:59 -08:00
Kelson
94bf71eb82 Merge pull request #512 from kiwix/updated-kiwix-serve-usage-message 2021-12-13 19:19:17 +01:00
Veloman Yunkan
25e9941f6a Mentioned --monitorLibrary in the help message 2021-12-13 22:16:47 +04:00
Kelson
81d8ad964a Merge pull request #511 from kiwix/kiwix-serve-help-option 2021-12-13 17:16:19 +01:00
Emmanuel Engelhart
9a49623879 Add -h/--help option to kiwix-serve 2021-12-13 15:48:42 +01:00
Kelson
f7f10597eb Merge pull request #504 from fazlerabbi37/feature-docker-compose
Add docker-compose for kiwix-server
2021-12-11 05:13:30 +01:00
Fazle Rabbi
c8be7c47ca Modify README.md to link to docker-compose doc 2021-12-10 21:09:14 +06:00
Fazle Rabbi
f356587b23 Add docker-compose for kiwix-server
added docker-compose for kiwix-server via docker-compose.yml.example which supports both local and remote zim file.
updated README.md to update about docker-compose.yml.example
2021-12-09 18:16:41 +06:00
Matthieu Gautier
32432a7113 Merge pull request #503 from kiwix/automatic_library_reloading 2021-12-06 10:53:13 +01:00
Veloman Yunkan
7985ba1b0c kiwix-serve [--monitorLibrary|-M] 2021-12-05 19:53:18 +04:00
Kelson
933aa0cd63 Merge pull request #497 from kiwix/library_reloading
Library reloading on SIGHUP
2021-12-03 16:34:26 +01:00
Veloman Yunkan
098e1cfe51 Library reloading on SIGHUP
Note that this enhancement drops the --donottrustlibrary mode.
2021-12-03 18:52:34 +04:00
Kelson
43b5be179a Merge pull request #501 from kiwix/fix_option_parsing
Add missing break in the switch case.
2021-12-01 15:44:12 +01:00
Matthieu Gautier
88213b3f3b Add missing break in the switch case.
Fix #500
2021-12-01 15:41:16 +01:00
Matthieu Gautier
7659efa97c Merge pull request #488 from kiwix/kiwix-serve_sigterm_handling 2021-10-18 10:42:54 +02:00
Veloman Yunkan
4faaa978f7 Handling of SIGTERM & SIGINT in kiwix-serve 2021-10-18 00:01:25 +04:00
Matthieu Gautier
d73fcb357f Merge pull request #491 from kiwix/fix_ci_docker_version 2021-10-14 14:18:52 +02:00
Matthieu Gautier
61e82228a4 Last CI docker image is 31 2021-10-14 14:16:13 +02:00
Matthieu Gautier
01430603b6 Merge pull request #489 from kiwix/docker-signals 2021-10-14 14:12:23 +02:00
renaud gaudin
6c31d0d7b0 Fixed #482: use dumb-init in docker for signal forwarding
Following-up on discussion in #488, now using https://github.com/Yelp/dumb-init
as entrypoint so our kiwix-* tools properly receives signals
2021-10-14 09:30:04 +02:00
Kelson
c1731c9697 Merge pull request #490 from kiwix/ci-disable-impish
Disable Ubuntu Impish in CI
2021-10-14 09:29:35 +02:00
Emmanuel Engelhart
929c36c930 Disable Ubuntu Impish in CI 2021-10-14 09:26:46 +02:00
Kelson
3df4a94863 Merge pull request #477 from kiwix/kiwix-serve/issue/571
added --customIndexTemplate option
2021-10-13 06:55:12 +02:00
Emmanuel Engelhart
2cd190e965 Tune a bit an error message 2021-10-11 15:32:08 +02:00
Manan Jethwani
6a7c737d48 added --customIndexTemplate option 2021-10-11 18:55:47 +05:30
Kelson
b20e83bd0b Merge pull request #485 from karandeeppotato/issue#483 2021-09-29 18:36:25 +02:00
karandeeppotato
7a3f77dbf2 Removed a redundant error message from kiwix-serve
The error message about failing to open the specified port was produced both
by kiwix-tools/src/server/kiwix-serve.cpp and by the InternalServer
constructor (in libkiwix/src/server/internalServer.cpp).
2021-09-29 18:47:55 +05:30
Kelson
71e065312f Merge pull request #474 from kiwix/remove_groovy_package
Remove Groovy package
2021-07-28 21:38:40 +02:00
Emmanuel Engelhart
9f207a61f9 Remove Groovy package 2021-07-28 21:35:58 +02:00
Kelson
43656554f1 Merge pull request #465 from kiwix/ppa-impish
PPA: Build for Ubuntu Impish
2021-07-08 13:16:03 +02:00
Kunal Mehta
7d55c0f6ac PPA: Build for Ubuntu Impish 2021-07-08 13:13:21 +02:00
Kelson
c3721970c5 Merge pull request #468 from kiwix/new_tools_libkiwix
Adapt kiwix-tools to the new libkiwix headers.
2021-07-08 13:10:45 +02:00
Matthieu Gautier
81ac333cc9 Adapt kiwix-tools to the new libkiwix headers.
Fix #467
2021-07-08 10:09:17 +02:00
Kelson
d1edbc11d3 Merge pull request #462 from kiwix/update-readme-libkiwix
Kiwix-tools does not depend on libmicrohttpd anymore
2021-05-30 15:55:05 +02:00
Emmanuel Engelhart
47929008cf Kiwix-tools does not depend on libmicrohttpd anymore 2021-05-30 15:33:52 +02:00
Kelson
4ba79d9776 Merge pull request #459 from kiwix/update-readme-libkiwix
Update readme libkiwix
2021-05-28 14:10:45 +02:00
Emmanuel Engelhart
c1e2913f24 Kiwix-lib has been renamed to libkiwix, update README.md 2021-05-28 09:56:37 +02:00
Kelson
ac3e889388 Merge pull request #461 from kiwix/use_suggestion_class_functions
Use SuggestionItem member function getTitle()
2021-05-28 09:55:17 +02:00
Maneesh P M
6d9fa0cb45 Use SuggestionItem member function getTitle()
We have introduced a new class SuggestionItem in libkiwix, it must be
used in kiwix-tools as well for handling suggestions.
2021-05-28 12:56:22 +05:30
rgaudin
c76bbabd10 Merge pull request #455 from kiwix/kiwix-tools-docker-badge
Add kiwix-tools Docker badge
2021-05-03 07:55:06 +00:00
Kelson
a5cf735ffe Add kiwix-tools Docker badge 2021-05-02 09:50:05 +02:00
Matthieu Gautier
b064796c2d Merge branch 'arjun-369-master' 2021-04-28 14:49:20 +02:00
arjun-369
6f2316bc8a Update kiwix-search.cpp for a bug fix 2021-04-28 14:48:46 +02:00
Kelson
b2aeb08051 Merge pull request #433 from kiwix/better-pid-type-conversion
Better PID type conversion
2021-01-24 19:41:11 +01:00
luddens
17b7fb2145 Better PID type conversion 2021-01-24 11:22:57 +01:00
Kelson
36c7bf4d6f Better Docker badge 2021-01-11 10:41:38 +01:00
renaud gaudin
a3ed7ad3e1 using two jobs to isolate envs 2021-01-08 18:35:23 +00:00
rgaudin
b7d884ceb2 Merge pull request #429 from kiwix/docker
CI built docker image
2021-01-08 15:33:26 +00:00
renaud gaudin
19322958b3 Support for non-release builds
- only building on workflow_dispatch with a specified version that can be a release or release-build
2021-01-08 15:29:19 +00:00
renaud gaudin
ccb8d11dce CI built docker image
- added a new generic kiwix/kiwix-tools image
- kiwix/kiwix-serve now based on kiwix/kiwix-tools ; with its entrypoint
- both images are built with official binary distribution
- both images are built on github action and pushed to both docker.io and ghcr.io
- both images are multi-arch and support arm/v7, arm64 and amd64
- built on release published or workflow_dispatch event (to be triggered by kiwix-build)
2021-01-07 22:13:49 +00:00
Kelson
7bdbe901db Merge pull request #419 from kiwix/legoktm-patch-1
PPA: Build for Ubuntu Hirsute
2020-12-18 23:51:42 +01:00
Kunal Mehta
7e6e74330a PPA: Build for Ubuntu Hirsute 2020-12-03 22:48:19 -08:00
Matthieu Gautier
9efd18a9a4 Merge pull request #409 from kiwix/kelson42-patch-1
Add instructions to build image for ARM
2020-09-21 18:12:29 +02:00
Kelson
0e9f406180 Add instructions to build image for ARM 2020-09-19 13:55:15 +02:00
Kelson
0160f356a6 Merge pull request #405 from kiwix/multiarch-docker
Add support for ARM in Docker
2020-09-02 17:13:37 +02:00
renaud gaudin
8cc34782bc support arm arch for kiwix-serve image 2020-08-31 11:27:29 +02:00
Kelson
b2c68d7f22 Merge pull request #403 from hashworks/archCommunityPkg
Add repology package badge
2020-08-30 22:06:42 +02:00
hashworks
977cfb9887 Switch to repology package badge 2020-08-30 21:00:28 +02:00
hashworks
1671effaf4 Replace AUR shield with official Arch Linux package
I recently became an Arch Linux Trusted User and moved kiwix-tools to
the official community repository. Hence, the shield needs to be
updated.
2020-08-30 13:19:28 +02:00
Kelson
8d00e45d2a Merge pull request #398 from kiwix/ppa-sync
PPA: Drop eoan and sync with proper Debian package
2020-07-24 12:42:19 +02:00
Kunal Mehta
730f20e86f debian: Sync with proper Debian package, bump to debhelper 13 2020-07-24 03:08:53 -07:00
Kunal Mehta
ff5f1d96d2 PPA: Drop Ubuntu eoan, EOL
Launchpad no longer accepts eoan uploads.
2020-07-24 03:07:47 -07:00
Kelson
d1d72218b3 Example with multiple ZIM files 2020-07-22 16:53:31 +02:00
Matthieu Gautier
88269c1ff2 Merge pull request #394 from kiwix/ppa 2020-07-20 11:54:56 +02:00
Kunal Mehta
4ee202514e PPA: Set fail-fast: false
See discussion/rationale on <https://github.com/openzim/libzim/pull/370>.
2020-07-16 06:04:01 -07:00
Kunal Mehta
98b372ee17 Automatically build and publish packages via Github Actions
Same exact configuration as kiwix-lib.
2020-07-13 17:46:02 -07:00
Kunal Mehta
8e5df188b3 Add minimal Debianization for our PPA 2020-07-13 17:45:59 -07:00
Matthieu Gautier
ed709454bd Merge pull request #392 from kiwix/manpages
Add man pages for kiwix-read and kiwix-search
2020-07-09 10:47:06 +02:00
Kunal Mehta
f5762c72d3 Add man pages for kiwix-read and kiwix-search 2020-07-09 10:44:34 +02:00
Matthieu Gautier
1744b152ac Merge pull request #393 from kiwix/legoktm-grammar
Improve grammar in kiwix-search help
2020-07-09 10:42:20 +02:00
Kunal Mehta
7f09e55077 Improve grammar in kiwix-search help
Suggested by Debian's lintian.
2020-07-09 00:35:24 -07:00
Matthieu Gautier
fdec897bc7 Release 3.1.2 2020-07-02 15:20:01 +02:00
Matthieu Gautier
764dd8848b Merge pull request #391 from kiwix/new_kiwixlib_suggestion_api
Use new suggestion API of kiwix-lib.
2020-07-02 14:39:53 +02:00
Matthieu Gautier
4a944cc901 Use new suggestion API of kiwix-lib.
Old API is not threadsafe and is deprecated.
2020-07-01 16:51:41 +02:00
Matthieu Gautier
4120e7fd25 New version 3.1.1 2020-05-18 15:17:14 +02:00
Matthieu Gautier
8736a2f4ea Merge pull request #383 from kiwix/include_windows 2020-05-18 13:38:38 +02:00
Matthieu Gautier
00b810d649 Include missing "windows.h"
Now that libzim doesn't inculde "windows.h" in its public headers it fails
if we don't include it.
2020-05-18 13:27:14 +02:00
Matthieu Gautier
5d21baa759 Fix typo in meson.build 2020-04-09 23:51:23 +02:00
Matthieu Gautier
6ba6046850 New version 3.1.0 2020-04-08 18:01:34 +02:00
Matthieu Gautier
d24f474dda Merge pull request #367 from kiwix/block-external-links
Add support for external links blocking in kiwix-serve
2020-04-06 20:15:08 +02:00
Kelson
07de2d29c4 Merge pull request #371 from kiwix/better-ci-event
Run Github actions on any push (not only in PR)
2020-04-03 16:28:34 +02:00
Kelson
d99e5cd975 Run Github actions on any push (not only in PR) 2020-04-03 16:26:47 +02:00
Kelson
f82d5aa7e5 CI badge from Github actions (instead of Travis) 2020-04-03 16:24:04 +02:00
renaud gaudin
824aef9189 Add support for external links blocking in kiwix-serve
Add a new `-b` `--blockexternallinks` option to kiwix-serve
triggering the corresponding response taskbar option in kiwix-lib.
2020-04-02 09:10:00 +00:00
Kelson
d6914eb34f Bump-up version to 3.0.3 2020-03-01 15:50:32 +01:00
Kelson
b65212fab7 Merge pull request #364 from kiwix/fix-argument-parsing
Fix argument parsing
2020-03-01 15:49:17 +01:00
Kelson
83427af3d2 Update Changelog 2020-03-01 15:45:31 +01:00
Kelson
d572bf875d Better --version argument parsing 2020-03-01 15:42:44 +01:00
Kelson
833c997782 Remove usell origId option parsing 2020-03-01 15:36:31 +01:00
Kelson
44613aae5d Print information about /data if error 2020-02-18 08:38:18 +01:00
Matthieu Gautier
62e6c7ffb0 Merge pull request #359 from kiwix/new_version
New version 3.0.2
2020-02-13 11:44:29 +01:00
Matthieu Gautier
1df899ea87 New version 3.0.2 2020-02-12 15:23:29 +01:00
Kelson
3dd357e8ac Merge pull request #356 from kiwix/missing-options
added shortcut for options --address and --nodatealiases
2020-02-10 16:42:24 +01:00
renaud gaudin
2744879df0 added shortcut for options --address and --nodatealiases
* allowed shortcut `-i` for `--address`
* allowed shortcut `-z` for `--nodatealiases`
2020-02-10 15:30:31 +00:00
Matthieu Gautier
19c3ebe629 Merge pull request #353 from kiwix/trust_library
[serve] Trust the library by default.
2020-02-05 11:06:05 +01:00
Kelson
cccd17a394 Github Kiwix Sponsoring page link 2020-02-01 17:56:27 +01:00
Matthieu Gautier
e9676ae66f [serve] Trust the library by default.
Now `kiwix-serve` trust the information in the library.xml.
We do not open all zim file at startup and so kiwix-serve starts faster.

Need kiwix/kiwix-lib#314
Fix #319
2020-01-30 17:58:41 +01:00
Matthieu Gautier
2fd393285f Use github action for the CI. (#352)
Use github action for the CI.
2020-01-21 18:52:26 +01:00
Matthieu Gautier
a44fd1a4d0 Use github action for the CI. 2020-01-21 18:50:58 +01:00
Kelson
a9ff2aebee Simpliciation of README 2020-01-16 16:02:59 +01:00
Kelson
a2b944618f More debug messages at kiwix-serve start 2020-01-16 14:57:53 +01:00
Kelson
d27abb41b7 Fix wrong URL in Kiwix serve Docker documentation 2020-01-16 14:49:17 +01:00
Kelson
5f12d0349f Use latest version of kiwix-serve in Dockerfile 2020-01-16 14:19:46 +01:00
Kelson
7ec2308053 Add ability to download a file at container start 2020-01-16 14:04:03 +01:00
Kelson
e8b33a7136 Merge pull request #326 from kiwix/version
Version
2019-12-05 02:06:42 -05:00
Kelson
ca943b9d0b Rename VERSION to KIWIX_TOOLS_VERSION to avoid collision 2019-12-05 07:59:57 +01:00
Kelson
c6757dd309 Various README.md improvements 2019-12-05 07:59:07 +01:00
Kelson
23b0ff3d01 Update changelog 2019-12-05 07:57:52 +01:00
Kelson
93116c76b3 Add --version option to kiwix-read 2019-12-05 07:57:52 +01:00
Kelson
4aca5ff551 Add --version option to kiwix-search 2019-12-05 07:57:52 +01:00
Kelson
4eb38869c1 New --version argument to kiwix-manage 2019-12-05 07:57:52 +01:00
Kelson
d17fd2af94 Add --version argument to kiwix-serve 2019-12-05 07:57:52 +01:00
Kelson
48db92af09 Move version.h to src/ 2019-12-05 07:57:52 +01:00
Kelson
612081ec51 Compile with Meson version #defined 2019-12-05 07:57:52 +01:00
Kelson
4b5eb482b5 New version() function 2019-12-05 07:57:52 +01:00
Kelson
28997ccd58 Bump-up version to 3.0.2 2019-12-05 07:57:52 +01:00
Kelson
9dd042d813 travis-ci.org -> travis-ci.com 2019-12-05 06:56:43 +01:00
Kelson
61580bb738 Add 'Distribution' section in README.md 2019-11-23 17:57:12 +01:00
Kelson
dbae6439b2 Use latest version of kiwix-serve 2019-09-29 01:56:45 +02:00
Kelson
d6094b4112 Merge pull request #334 from kiwix/docker-badge-fix
Fix Docker badge
2019-09-08 20:07:33 +02:00
Kelson
64f1aa2408 Fix Docker badge 2019-09-08 20:06:51 +02:00
Kelson
ed1bae76c3 Merge pull request #333 from kiwix/aur-badges
Add AUR badge
2019-09-08 17:10:27 +02:00
Kelson
7418702a07 Add AUR badge 2019-09-08 17:08:09 +02:00
Kelson
796614fd7d New kiwix-serve screenshots 2019-08-27 16:37:22 +02:00
Kelson
2ba9037687 Merge pull request #328 from kiwix/better-readme
Better README.md
2019-08-27 14:59:51 +02:00
Kelson
22be7c0dcf Better README.md 2019-08-27 14:59:03 +02:00
Kelson
3fc9525754 Remove benchmark.sh 2019-08-27 14:46:10 +02:00
Kelson
a9d8f77526 Merge pull request #327 from kiwix/remove-backticks
Remove backticks from benchmark.sh
2019-08-27 14:42:38 +02:00
Kelson
1109b62570 Remove backticks from benchmark.sh 2019-08-27 14:27:44 +02:00
Kelson
3248c0f233 Merge pull request #325 from kiwix/last-kiwix-serve
Use kiwix-serve 3.0.1
2019-08-22 20:49:26 +02:00
Kelson
f8f66288ea Use kiwix-serve 3.0.1 2019-08-22 20:42:49 +02:00
Matthieu Gautier
98c810eb2a Nodatealiases regression fix (#324)
Nodatealiases regression fix
2019-08-22 17:31:51 +02:00
Kelson
50ca36417f Remove [[gnu::unused]] for noDateAliasesFlag variable 2019-08-22 17:28:25 +02:00
Kelson
5a2714c9c9 Fix --nodatealiases inverted logic regression 2019-08-22 17:23:18 +02:00
Kelson
63cc513974 Bump-up version to 3.0.1 2019-08-22 17:23:11 +02:00
Matthieu Gautier
63ec03a3d4 New version (#320)
New version
2019-08-20 14:32:54 +02:00
Matthieu Gautier
e2f7c7a0ac New version 3.0.0 2019-08-19 17:26:37 +02:00
Matthieu Gautier
a14cd5de23 Fix kiwix-serve usage message. 2019-08-19 17:26:28 +02:00
Matthieu Gautier
06c31430c5 Port kiwix-serve to new api in kiwix-lib to serve a content. (#315)
Port kiwix-serve to new api in kiwix-lib to serve a content.
2019-08-12 15:25:35 +02:00
Matthieu Gautier
8ffff9cd47 Port kiwix-serve to new api in kiwix-lib to serve a content.
A lot of code removed from this repository !!
2019-08-11 11:59:21 +02:00
Kelson
ef0fc514ad Configure the Move bot 2019-08-05 10:32:37 +02:00
Kelson
6c1739d4cd Merge pull request #314 from kiwix/nolibrarybutton-fix
Fix buggy --nolibrarybutton (regression)
2019-08-04 22:15:40 +02:00
Kelson
cd44ba53a5 Fix buggy --nolibrarybutton (regression) 2019-08-04 20:19:47 +02:00
Matthieu Gautier
d82f9e7d5e Merge pull request #312 from kiwix/new_version
New version 2.1.0
2019-07-31 14:33:54 +02:00
Matthieu Gautier
720a319d53 New version 2.1.0 2019-07-30 17:46:38 +02:00
Matthieu Gautier
2426c35547 Merge pull request #306 from kiwix/multiple-tags-api
search api accept multiple tags parameter
2019-07-30 17:32:27 +02:00
luddens
794f63e22b search api accept multiple tags parameter 2019-07-30 16:56:48 +02:00
Matthieu Gautier
79a64d5af3 Merge pull request #305 from kiwix/notag-parameter
add notag parameter to the api
2019-07-29 14:51:31 +02:00
luddens
2ef160bcad add notag parameter to the api
this parameter get a string that contains all tags to exclude separated by
a ";". The kiwix::Filter() is set with this rejected tags.
2019-07-25 15:17:42 +02:00
Kelson
817a5d4847 Merge pull request #311 from kiwix/tools-details
Infos about the tools
2019-07-21 15:58:08 +02:00
Kelson
2c3882671b Infos about the tools 2019-07-21 15:36:27 +02:00
Kelson
7e2c5bda03 Merge pull request #310 from kiwix/better-taskbar-padding
Increase a bit the taskbar padding
2019-07-13 07:19:40 +02:00
Kelson
59281bf496 Increase a bit the taskbar padding 2019-07-12 21:33:37 +02:00
Kelson
ee9ae0e81f Merge pull request #309 from kiwix/better-taskbar-padding
Better kiwix-serve content (because of taskbar) top-padding
2019-07-12 20:18:25 +02:00
Kelson
2dbe0a0016 Better kiwix-serve content (because of taskbar) top-padding 2019-07-12 20:14:00 +02:00
Kelson
64717c2124 Merge pull request #300 from kiwix/ISNIT0/server-toolbar
Make server toolbar auto-hide and collapse buttons into dropdown on small screens
2019-07-09 12:36:23 +02:00
Kelson
fc1eb3c282 Bump-up kiwix-tools version to 2.1.0 2019-07-09 12:31:25 +02:00
Kelson
e31c1cd9a3 Update Changelog 2019-07-09 12:31:22 +02:00
Joe Reeve
e897dd4e59 Update classes and ids to have Kiwix namespace 2019-07-09 12:24:57 +02:00
Joe Reeve
7db7d2a2ab Switch caret to image and move JS to separate file 2019-07-09 12:24:57 +02:00
Joe Reeve
5b612e67bd Fix a few bugs found in code review 2019-07-09 12:24:57 +02:00
Joe Reeve
df047588a9 fix kiwix-serve toolbar search icon on article pages 2019-07-09 12:24:57 +02:00
Joe Reeve
9dede26717 Search icon positioning fix for Firefox 2019-07-09 12:24:57 +02:00
Joe Reeve
a22ae3d467 👌 updates from pr review 2019-07-09 12:24:57 +02:00
Joe Reeve
ea93a8a195 Fix padding and search bug, update button toggle icon 2019-07-09 12:24:57 +02:00
Joe Reeve
0a7f375f3a Format taskbar.css 2019-07-09 12:24:57 +02:00
Joe Reeve
66c35b7b3e Fix alignment, improve search box appearance 2019-07-09 12:24:57 +02:00
Joe Reeve
bad7f2ddf1 Make server toolbar auto-hide and collapse buttons into dropdown on small screens 2019-07-09 12:24:57 +02:00
Matthieu Gautier
758014a5ba Merge pull request #304 from kiwix/int_retcode
Use integer to store the returnCode.
2019-07-01 11:24:22 +02:00
Matthieu Gautier
4fd961a761 Use integer to store the returnCode.
If we want to return `-1` we must use a integer, not a bool.
2019-06-27 19:15:41 +02:00
Matthieu Gautier
c063587a69 Merge pull request #303 from kiwix/no_unistd
Remove include of unistd.h
2019-06-27 18:49:13 +02:00
Matthieu Gautier
9b24676b02 Remove include of unistd.h
unistd.h is useless.
2019-06-27 18:20:22 +02:00
Matthieu Gautier
fc5572f495 Merge pull request #302 from kiwix/adapt_to_new_book_filter
Adapt kiwix-serve to the new api to filter library.
2019-06-27 09:55:50 +02:00
Matthieu Gautier
a1b3f46e4e Adapt kiwix-serve to the new api to filter library.
See kiwix/kiwix-lib#234
2019-06-26 17:38:35 +02:00
Kelson
e0177c4923 Create FUNDING.yml 2019-06-22 07:58:19 +02:00
Matthieu Gautier
a365c1e720 Merge pull request #297 from kiwix/new_version
New version 2.0.0
2019-05-29 12:00:23 +02:00
Matthieu Gautier
3e97352128 [CI] Build on xenial. 2019-05-29 11:52:03 +02:00
Matthieu Gautier
78d2530878 New version 2.0.0 2019-05-29 11:52:03 +02:00
Kelson
d09f481b47 Merge pull request #298 from kiwix/better_usage
Small updates of the README
2019-05-29 10:37:27 +02:00
Emmanuel Engelhart
e0f07086d5 Small updates of the README 2019-05-29 10:29:48 +02:00
Kelson
bbff57e6aa Merge pull request #290 from kiwix/add_footer
Add footer
2019-05-14 13:29:47 +02:00
Kelson
3c24d0a026 Add kiwix-serve welcome page footer 2019-05-04 14:09:26 +02:00
Kelson
6107bad17e Remove deprecated js code 2019-05-04 13:44:06 +02:00
Kelson
5931ac45c4 Merge pull request #289 from kiwix/fix_multiple_add
Correctly set the zimPathToSave if there are several zim file to add.
2019-05-03 12:50:19 +02:00
Matthieu Gautier
4de8623a52 Correctly set the zimPathToSave if there are several zim file to add.
The variable `zimPathToSave` is used to store the option passed by the
user.
If we reuse this variable to store the real path to use for the first
zim file, then we will mess the path to save of other zim files.

Let's use a local variable here.

Fix #288
2019-05-03 12:09:23 +02:00
Kelson
6eace310a2 Merge pull request #284 from kiwix/better_kiwix-serve_usage
Better kiwix-serve usage()
2019-05-03 11:49:58 +02:00
Kelson
c6499ad5c6 Fix typo in kiwix-manage usage() 2019-05-03 11:41:18 +02:00
Emmanuel Engelhart
34ceaf37f2 Better kiwix-serve usage() 2019-05-03 11:38:35 +02:00
Kelson
f05096e2ce Merge pull request #282 from kiwix/better_usage
Better kiwix-manage usage()
2019-05-03 11:31:48 +02:00
Emmanuel Engelhart
3864b2404c Better kiwix-manage usage() 2019-05-03 11:23:53 +02:00
Kelson
4cd74dca4b Merge pull request #283 from kiwix/remove_download_action
Remove kiwix-manage download action
2019-05-03 10:50:11 +02:00
Kelson
88cea54520 Revert "[kiwix-manage] Add a download command to kiwix-manage."
This reverts commit c1e635bd4e.
2019-05-03 10:42:14 +02:00
Matthieu Gautier
3061c8bba3 Merge pull request #281 from kiwix/thread_win
Do not use this_thread::sleep or thread::hardware_concurrency.
2019-04-17 17:57:03 +02:00
Matthieu Gautier
2774eb9529 Do not use this_thread::sleep or thread::hardware_concurrency.
Mingw doesn't implement them. So, we should not use it.
I suppose that it was working before because mingw package for debian trusty
simply no provides a "thread" header.
We may face to include the native "thread" header.
2019-04-17 15:48:33 +00:00
Kelson
77dc2ef2ed Merge pull request #280 from kiwix/3_columns_fix
Display cards in 3 columns properly
2019-04-17 16:44:18 +02:00
Emmanuel Engelhart
17d11f9772 Display cards in 3 columns properly 2019-04-17 09:12:23 +02:00
Matthieu Gautier
68ac06c397 Merge pull request #278 from kiwix/fix_server
Fix server
2019-04-16 14:37:58 +02:00
Matthieu Gautier
99f6941614 New version 1.2.1 2019-04-16 14:30:54 +02:00
Matthieu Gautier
848d058610 Always use POLL wen possible.
SELECT works only with fd < 1024. If we've got "too many" zim files,
the fd of the socket is > 1024 and we cannot create the daemon.

Also add the MHD_USE_DEBUG flag when we are verbose.

Fix #277
2019-04-16 14:29:06 +02:00
Matthieu Gautier
cdb9b28d35 Merge pull request #276 from kiwix/new_version
New version 1.2.0
2019-04-15 16:02:34 +02:00
Matthieu Gautier
43e1740d52 New version 1.2.0 2019-04-15 15:56:05 +02:00
Matthieu Gautier
7e8d02990e Merge pull request #270 from kiwix/noDateAliasesFlag
Add --nodatealiases command line option #269
2019-04-15 10:24:59 +02:00
Kelson
c337cf174e Add --nodatealiases command line option #269 2019-04-07 10:09:37 +02:00
Matthieu Gautier
8a64083d5b Merge pull request #274 from kiwix/fix_win
Do not use POLL on windows.
2019-04-04 14:06:42 +02:00
Matthieu Gautier
d0687e40a6 Do not use POLL on windows.
libmicrohttpd has no support of poll on windows.
2019-04-04 12:14:37 +02:00
Matthieu Gautier
14b0b901f1 Merge pull request #273 from kiwix/no_rpath
Remove rpath in installed binaries.
2019-04-04 12:12:13 +02:00
Matthieu Gautier
336cbe691d Remove rpath in installed binaries.
Fix #250
2019-04-02 17:53:27 +02:00
Matthieu Gautier
26b4dd5f57 Merge pull request #272 from kiwix/multiple_add
[manage] Allow user to add several zim files to library in the same time.
2019-04-02 15:33:39 +02:00
Matthieu Gautier
8882a716a0 [manage] Allow user to add several zim files to library in the same time.
Note that no option is allowed if several zim files are specified.

Fix #236
2019-04-02 15:25:05 +02:00
Matthieu Gautier
fede5ef9b6 Merge pull request #271 from kiwix/show_id
[manage] Do not show all books if id has been provided on command line.
2019-04-02 14:58:56 +02:00
Matthieu Gautier
c5b293c6f3 [manage] Do not show all books if id has been provided on command line.
Fix #240.
2019-04-02 14:45:36 +02:00
Kelson
d57a37cde6 Merge pull request #268 from kiwix/docker
New Docker image of kiwix-serve #257
2019-03-23 17:01:20 +01:00
Kelson
7d2bec3e39 New Docker image of kiwix-serve #257 2019-03-23 17:01:17 +01:00
Matthieu Gautier
472de06e6d Merge pull request #267 from kiwix/new_version
Version 1.1.0
2019-03-19 17:36:57 +01:00
Matthieu Gautier
51a4a4e8ef Version 1.1.0 2019-03-19 17:32:58 +01:00
Matthieu Gautier
6e310c7147 Force use of meson 0.49.2 2019-03-19 17:32:58 +01:00
Matthieu Gautier
790bd03bd7 Merge pull request #266 from kiwix/filter_by_tag
Allow to search the catalog by tags.
2019-03-08 15:11:05 +01:00
Matthieu Gautier
15c6252db4 Allow to search the catalog by tags.
This way a client may filter the catalog by category.
2019-03-07 17:22:16 +01:00
Matthieu Gautier
6fd22dec61 Merge pull request #264 from kiwix/fix_absolute_urls
Fix handling of absolute url in kiwix-serve.
2019-03-07 17:20:37 +01:00
Matthieu Gautier
c332c123fe Fix handling of absolute url in kiwix-serve.
We still need to change the html content to handle absolute url in zims.

Issue has been introduced by commit 978dc47. Some code was not related
to redirection but to absolute url. I have made a clean a bit too more
aggressive.

Fix #262
2019-03-04 14:54:03 +01:00
Matthieu Gautier
e4eafd7459 Merge pull request #260 from kiwix/new_version
New version 1.0.0
2019-02-22 11:19:03 +01:00
Matthieu Gautier
16a29127a1 New version 1.0.0 2019-02-22 10:50:33 +01:00
Matthieu Gautier
7fa0579ea1 Merge pull request #258 from kiwix/redirect
[server] Correctly implement 302 redirection if the entry is a redirection
2019-02-20 17:14:52 +01:00
Matthieu Gautier
978dc47865 [server] Correctly implement 302 redirection if the entry is a redirection.
If the entry is a redirection, we should redirect the client to the
right entry instead of serving the target content.

As we are doing a redirection, urls are good and we don't have to change
link inside the html or css content.

Fix #192
2019-02-20 16:57:10 +01:00
Matthieu Gautier
b7793f6e75 Merge pull request #259 from kiwix/use_correct_dep_archive
Use new xz archive
2019-02-20 16:46:19 +01:00
Matthieu Gautier
8095ae9ea8 Use new xz archive 2019-02-20 16:06:04 +01:00
Matthieu Gautier
286f599b3e Merge pull request #256 from kiwix/new_version
New version
2019-01-29 14:00:23 +01:00
Matthieu Gautier
174b236312 New version 0.9.0 2019-01-29 11:45:55 +01:00
Matthieu Gautier
c7e9d44b38 We do not need the exact version 0.43.0 for meson. 2019-01-29 11:45:55 +01:00
Matthieu Gautier
3a80951c23 Merge pull request #255 from kiwix/update_to_api
Update to api
2019-01-23 17:42:59 +01:00
Matthieu Gautier
ffaecb5389 Update to last kiwix-lib API.
The `common` repository has been renamed to `tools`.
2019-01-23 15:48:53 +01:00
Matthieu Gautier
7b25308248 Update build system as we don't use ctpp2 anymore. 2019-01-23 15:46:14 +01:00
Matthieu Gautier
7ac14aa64f Merge pull request #254 from kiwix/new_api_no_external_index
Do not handle external index.
2019-01-09 10:18:48 +01:00
Matthieu Gautier
3c8da8c74c Do not handle external index.
Now that kiwix-lib do not handle external index, we must not try to handle
it ourselves.

See kiwix/kiwix-lib#190.
Fix #245
2019-01-08 17:40:02 +01:00
Matthieu Gautier
9ed3fc353b Merge pull request #253 from kiwix/fix_warning
Initialize geoquery variables.
2019-01-08 17:39:30 +01:00
Matthieu Gautier
51051752f1 Initialize geoquery variables.
Fix #251
2019-01-08 16:15:55 +01:00
Kelson
4e8a8533c4 Merge pull request #248 from kiwix/legoktm-patch-2
Improve kiwix-serve.1
2018-12-20 10:05:32 +01:00
Kelson
fd2a0decd3 Merge branch 'master' into legoktm-patch-2 2018-12-20 09:40:34 +01:00
Kelson
624fb32091 Merge pull request #247 from kiwix/legoktm-patch-1
Improve grammar in kiwix-manage.1
2018-12-20 09:39:15 +01:00
Kunal Mehta
067a40a156 Improve kiwix-serve.1
Minor grammar fixes and remove reference to kiwix-install(1).
2018-12-20 00:36:09 -08:00
Kunal Mehta
cfa22365fe Improve grammar in kiwix-manage.1
And change one of the URLs to HTTPS, and remove a reference
to the removed kiwix-install(1).
2018-12-20 00:28:32 -08:00
Popo le Chien
d5066ba6bf Updated README
typo
2018-12-13 14:54:23 +01:00
Kelson
f1ec1ec182 Merge pull request #239 from kiwix/updated_usage
Update usage()
2018-11-17 09:08:19 +01:00
Kelson
d1802c52a2 Update usage() 2018-11-17 09:05:37 +01:00
Matthieu Gautier
38088ee321 New version 0.8.0 2018-11-12 16:52:29 +01:00
Matthieu Gautier
0f445e9791 Merge pull request #238 from kiwix/remove_several_id
Be able to remove several books in a single command.
2018-11-12 14:38:28 +01:00
Matthieu Gautier
1032a46c57 Be able to remove several books in a single command.
Fix #236
2018-11-12 14:00:45 +01:00
Matthieu Gautier
cbe8f1df87 Merge pull request #234 from kiwix/new_version
New version 0.7.0
2018-10-31 15:30:03 +01:00
Matthieu Gautier
2fe5ec1d7c New version 0.7.0 2018-10-31 14:45:05 +01:00
Matthieu Gautier
eba80b92ef Merge pull request #229 from kiwix/new_kiwix-lib_api
WIP New kiwix lib api
2018-10-26 13:28:59 +02:00
Matthieu Gautier
c1e635bd4e [kiwix-manage] Add a download command to kiwix-manage.
With the download command, it is possible to download a zim corresponding
to a remote book in the library.
2018-10-26 13:26:04 +02:00
Matthieu Gautier
c8be8fbad8 [kiwix-manage] Update to last API of kiwix-lib.
`kiwix::Manager` cannot set the book index. We have to modify the book
itself.

We remove the `backend` option as the only supported xapian was and always
was xapian.
2018-10-24 15:24:27 +02:00
Matthieu Gautier
640f907fb2 Avoid recopy of books 2018-10-24 15:05:33 +02:00
Matthieu Gautier
eb407956b9 The index path must be absolute. 2018-10-24 15:05:14 +02:00
Matthieu Gautier
422dde9ff2 Allow the opds feed to filtered by the language and "paged". 2018-10-24 15:03:14 +02:00
Matthieu Gautier
f691f85724 Correctly get the bookIds to the opdsfeed.
We want to have LOCAL and REMOTE and VALID files.
2018-10-24 15:01:46 +02:00
Matthieu Gautier
fd4f228a41 Use the to_string function in kiwix lib instead of redefine it. 2018-10-24 14:53:25 +02:00
Matthieu Gautier
bf40d4ff91 Adapt kiwix-manage to new kiwix-lib API.
- Books are identified by Id, not by index.
- No more current option.
2018-09-06 18:59:51 +02:00
Matthieu Gautier
74fecd34e6 Adapt kiwix-serve to new API.
We also change the welcome page to link to icon url instead of
embeded them as base64 data.
2018-09-06 18:58:54 +02:00
Matthieu Gautier
881fe9f41d Merge pull request #224 from kiwix/new_version
New version 0.6.1
2018-08-30 16:02:33 +02:00
Matthieu Gautier
c23e0bc38a New version 0.6.1 2018-08-30 15:50:12 +02:00
Matthieu Gautier
d4d32aa2e8 Merge pull request #218 from int19h/217
Fix #217: RequestContext::connection is unused
2018-08-03 11:52:54 +02:00
Pavel Minaev
4a88c44626 Fix #217: RequestContext::connection is unused 2018-08-03 02:46:31 -07:00
Matthieu Gautier
0cc5b18488 Merge pull request #214 from int19h/213
Fix #213: sockaddr_in is undefined when compiling on FreeBSD
2018-08-03 11:37:28 +02:00
Pavel Minaev
88a32a152f Fix #213: sockaddr_in is undefined when compiling on FreeBSD
Make sure that <netinet/in.h> is included as per POSIX spec.
2018-08-03 02:32:16 -07:00
Matthieu Gautier
4b8c8c5f6f Merge pull request #216 from int19h/215
Fix #215: istringstream used without #include <sstream>
2018-08-03 11:17:56 +02:00
Pavel Minaev
f0568ff4a7 Fix #215: istringstream used without #include <sstream> 2018-08-03 02:12:53 -07:00
Kelson
ccdfe9839d Merge pull request #212 from int19h/211
Fix #211: getMimeTypeForFile does not handle files without extensions correctly
2018-08-03 07:57:51 +00:00
Pavel Minaev
221f3ef340 Fix #211: getMimeTypeForFile does not handle files without extensions correctly
Use `auto` instead of `unsigned int` to ensure proper size on 64-bit platforms
2018-08-03 00:48:08 -07:00
Matthieu Gautier
0785636ca5 Merge pull request #219 from kiwix/new_dep_archive_root
New deps archives now contains the BUILD_ directory
2018-08-03 08:54:12 +02:00
Matthieu Gautier
a3429fdc88 New deps archives now contains the BUILD_ directory 2018-08-03 08:38:56 +02:00
Kelson
f99b6965e9 Merge pull request #210 from cyrillemoureaux/fix-141
Fix crash when --library is provided but no actual library path is.
2018-06-29 15:12:17 +02:00
cyrillemoureaux
228402b505 Fix crash when --library is provided but no actual library path is, by
avoiding going over argc.
2018-06-29 14:26:38 +02:00
Kelson
a9f8364333 Merge pull request #206 from kiwix/update_readme
Updated README
2018-06-24 16:18:49 +02:00
Emmanuel Engelhart
9f06c9c5eb Updated README 2018-06-24 16:08:56 +02:00
Matthieu Gautier
0efbb2461d Merge pull request #203 from kiwix/version_0.6.0
New version 0.6.0
2018-06-15 19:29:59 +02:00
Matthieu Gautier
b251e18af1 New version 0.6.0 2018-06-15 18:34:09 +02:00
Matthieu Gautier
5c040d3ee6 Merge pull request #200 from kiwix/improved_kiwix_serve_taskbar
Improved taskbar #160 #59
2018-06-15 18:32:06 +02:00
Matthieu Gautier
bb1afb5120 Also set magnify glass in the global taskbar. 2018-06-15 18:28:04 +02:00
Kelson
8fccbc4c99 Improved taskbar #160 #59 2018-06-15 18:08:48 +02:00
Matthieu Gautier
d0dc9ac81b Merge pull request #202 from kiwix/gcc4.8
[TRAVIS] Compile using default gcc (4.8)
2018-06-15 18:03:49 +02:00
Matthieu Gautier
f9edd75f6c [TRAVIS] Compile using default gcc (4.8) 2018-06-15 08:50:13 +02:00
Matthieu Gautier
9571148375 Merge pull request #201 from kiwix/compile_gcc4.8
Compile gcc4.8
2018-06-14 18:20:19 +02:00
Matthieu Gautier
282b85c341 Do not use std::sto[fi] or std::to_string. 2018-06-14 18:01:15 +02:00
Matthieu Gautier
4c3acd06de Add missing include.
Needed by printf.
2018-06-14 17:35:40 +02:00
Kelson
4cd9d78d21 Merge pull request #199 from kiwix/kiwix_server_404
return 404 for missing resources
2018-06-09 16:21:17 +02:00
Philip Munaawa
efd4a1434e return 404 for missing resources 2018-06-09 15:29:40 +02:00
Matthieu Gautier
dfc601dacf Merge pull request #196 from kiwix/no_install
Remove kiwix-install tool.
2018-05-21 12:18:30 +02:00
Matthieu Gautier
7c254544ca Remove kiwix-install tool.
Fix #189
2018-05-21 12:09:13 +02:00
Kelson
b22ee94f10 Merge pull request #195 from kiwix/proper_exit_code
Proper exit code
2018-05-20 08:34:41 +02:00
Kelson
3766c4882b Proper exit code #194 2018-05-19 20:59:18 +02:00
Matthieu Gautier
26da54f9c3 Merge pull request #187 from swiftugandan/kiwix_serve-fix-global_page_static_resources-1
fix static resources on home page when using --nosearchbar
2018-04-24 14:16:12 +02:00
Philip Munaawa
4433421c48 also replace __CONTENT_ESCAPED__ for --nosearchbar 2018-04-24 13:06:46 +01:00
Philip Munaawa
c00f0be7ef fix static resources on home page when using --nosearchbar 2018-04-24 11:29:41 +01:00
Matthieu Gautier
773b9e5443 Merge pull request #185 from kiwix/0.5.0
0.5.0
2018-04-23 20:49:57 +02:00
Matthieu Gautier
fbddabb10f New version 0.5.0 2018-04-23 19:22:18 +02:00
Matthieu Gautier
3ad50ccf17 Update depenedency version of kiwix-lib. 2018-04-23 19:22:06 +02:00
Matthieu Gautier
c265eb8b24 Merge pull request #182 from kiwix/new_api
Update kiwix-serve to the new kiwix-lib API.
2018-04-23 18:42:52 +02:00
Matthieu Gautier
6f49e78eb4 Update kiwix-serve to the new kiwix-lib API.
Related to kiwix/kiwix-lib#123
2018-04-23 15:26:24 +02:00
Matthieu Gautier
d25329ecb4 Merge pull request #178 from kiwix/opds
Opds
2018-04-23 15:24:15 +02:00
Matthieu Gautier
bd8d0c3805 Get the dependencies archive using the correct new name scheme.
Now that we are compiling to ios, deendencies archive names have
TRAVIS_OS_NAME included.
2018-04-23 10:31:22 +02:00
Matthieu Gautier
a01906d273 [manage] Move handling of action in separated function. 2018-04-19 18:05:41 +02:00
Matthieu Gautier
4bd18ce466 Add open search support to search in the catalog. 2018-04-19 18:05:41 +02:00
Matthieu Gautier
fb8c14a1e4 Make kiwix-serve serve an opds stream of all zims. 2018-04-19 18:05:41 +02:00
Matthieu Gautier
2acd276753 [KIWIX-SERVE] Serve a zim metadata on the '/meta' url.
This can be used to get some metadata about a zim with a simple http
request.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
53b2dadfce Compile without warning. 2018-04-19 18:05:41 +02:00
Matthieu Gautier
eccf5e194c Merge pull request #177 from kiwix/rpath
Set rpath of the installed binaries.
2018-04-17 17:14:53 +02:00
Matthieu Gautier
8356277562 Set rpath of the installed binaries.
Let's set RPATH of installed binaries, this way, we will be able to
run dynamically linked binaries without changing LD_LIBRARY_PATH.
2018-04-17 16:29:41 +02:00
Matthieu Gautier
c6ace1eafc Merge pull request #171 from kiwix/new_version
New version 0.4.0
2018-03-27 12:03:21 +02:00
Matthieu Gautier
8552985cd4 New version 0.4.0 2018-03-27 11:20:21 +02:00
Matthieu Gautier
9997a6ec18 Merge pull request #169 from kiwix/infinit_redirect
Correctly pre-increment the loopCounter.
2018-03-26 10:04:28 +02:00
Matthieu Gautier
8b6abc0e35 Correctly pre-increment the loopCounter.
In case of infinit redirection, if we post-increment the loop counter,
we will exit the loop when loopCounter will be 42 and increment it.
So loop counter will be 43.

Let's pre-increment the counter to still compare with 42 (more consistancy)

Fix #168
2018-03-25 17:07:38 +02:00
Kelson
426796dc37 Merge pull request #135 from kiwix/search_suggestions
Update usage() with --suggestion
2017-12-20 19:54:22 +01:00
kelson42
712cdf5e7b Update usage() with --suggestion 2017-12-20 19:07:38 +01:00
Matthieu Gautier
74cc1d0708 Merge pull request #133 from kiwix/better_search_tool
Better search tool
2017-12-19 15:24:29 +01:00
Matthieu Gautier
3ce668af66 Add a suggestion option to search in suggestion.
There are two kinds of search system :
- Suggestion (search in title only)
- "Classical" search (search in whole content)

The option `--suggestion` allow `kiwix-search` to search for suggestion.
Without the option, a "classical" search is made.

Fix #132.
2017-12-19 14:17:15 +01:00
Matthieu Gautier
2b69cc8ffc Pass verboseFlag to underlying kiwix::Searcher. 2017-12-19 14:13:36 +01:00
Matthieu Gautier
71ffaaa05a Merge pull request #127 from kiwix/compilation_fixes
Compilation fixes
2017-12-13 16:26:57 +00:00
Matthieu Gautier
f3fb5d61cc Use correct option to compile a static binary in travis.
We must use custom option `static-linkage` instead of meson's
`default-library`.
2017-12-13 17:17:28 +01:00
Matthieu Gautier
05c63536de Force usage of meson 0.43.0.
Static compilation is broken with meson 0.44.0.
2017-12-13 16:43:42 +01:00
Matthieu Gautier
16e12ad463 Stop workaround xapian-core.pc
`xapian-core.pc` is now correct stop workaround it adding extra
link args.
The workaround is broken with meson 0.44.0 and static compilation.

However, libmicrohttpd is using `librt` if present but doesn't declare
it in its `libmicrohttpd.pc` file so we must add it manually if we found
it.
2017-12-13 16:43:08 +01:00
Matthieu Gautier
c91285fc29 Merge pull request #123 from kiwix/fix_crash
Fix crash
2017-12-04 16:04:08 +00:00
Matthieu Gautier
5c11ff1a30 Correctly cast to int in debug message.
A `class enum` is not implicitly cast to an `int`.
It is better to explicitly cast it to avoid future error with different
versions of compiler.
2017-12-04 15:12:27 +00:00
Matthieu Gautier
9eaf512bf9 Correctly handle NULL string for request arguments.
When iterating over arguments of a request, the value can be a null pointer
if the argument is provided without a `=`.
https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002drequests.html

We have to handle this correctly.

Should fix #116.
2017-12-04 15:10:45 +00:00
Matthieu Gautier
9a29874f9f Better verbose message.
The parsing of the request in the `RequestContext` constructor may be
buggy and make kiwix-serve crash.

If we print debug information only after the request is parsed, we will
never print the debug information if the parsing crash.

It is better to, at least, write that we've got a new request to avoid
us to try to debug previous request where everything were ok.
2017-12-04 15:08:18 +00:00
Matthieu Gautier
aa9647e88c Merge pull request #122 from kiwix/gcc5
Compile using gcc-5 on native ubuntu.
2017-12-04 12:29:59 +00:00
Matthieu Gautier
da0c697963 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:15:50 +00:00
Matthieu Gautier
77d25686cb Merge pull request #115 from kiwix/better_search_handling
Better search handling
2017-11-29 16:21:45 +00:00
Matthieu Gautier
3df2fa708b Set the global humanReadableId.
This is needed by kiwix-lib to generate correct "next page" links.
2017-11-27 12:45:41 +00:00
Matthieu Gautier
9021f87715 Handle search with no content and empty query string.
We need to handle :

 - No content because it is how we do multisearch.
 - No query string because it is how we can do geosearch.
2017-11-27 12:44:25 +00:00
Matthieu Gautier
04b05b7902 Merge pull request #111 from kiwix/better_request_parsing
Better request parsing
2017-11-27 11:39:10 +00:00
Matthieu Gautier
a8e73aab98 Move the request context out of kiwix-serve.cpp.
RequestContext is now a "complex" class that handle a lot of thing for
the handlers :
- The rootLocation is correctly handle and remove from the url.
  So a handler doesn't have to care about it (when parsing the url)
- Request arguments and header are stored in a map and there are access
  methods to get it.
- Request arguments can be automatically convert to other type than string.
- Better parsing of the `byte` header. Related to #91.
2017-11-27 11:20:02 +00:00
Matthieu Gautier
234a9d9719 Let the different handlers look for the reader/searcher.
It is to the handlers to get the right reader/searcher they want and
create correct error/default page if the name doesn't correspond to a
zim file.

The `handle_default` function has also be renamed to `build_homepage`
because it is what is done. (And it doesn't handle a request).
2017-11-22 16:16:54 +00:00
Matthieu Gautier
c93617473d Move some variable out of the request's context.
`humanReadableBookId`, `reader` and `searcher` are not so global that
it seems.

Let's move it out of the request object as handler may or not use them.
2017-11-22 15:53:34 +00:00
Matthieu Gautier
09e2039aff Rename variable request_context to request. 2017-11-22 15:47:23 +00:00
Matthieu Gautier
5c6a1870b9 Merge pull request #107 from kiwix/geo_loc
Add a small (private) support for geo query.
2017-11-22 12:46:47 +01:00
Matthieu Gautier
4fffaf41b6 Add a small (private) support for geo query.
This use the small API of kiwix-lib and so, cannot search a text query
and filter around a geo position in the same time.

There is no way to do a search but than write directly the search url
by hand.

If the request is wrongly formatted, the search is simply not done without
error message.
2017-11-14 17:42:01 +01:00
Matthieu Gautier
05c734fc31 Merge pull request #104 from kiwix/library_relative_path
Relative paths are relative to current directory not executable.
2017-11-13 15:14:42 +01:00
Matthieu Gautier
fa9b027a39 Relative paths are relative to current directory not executable.
Almost nothing should be relative to the executable directory.
Content coming from the user should be relative to where the user
is (its working directory).

Fixes #70.
2017-11-13 14:42:52 +01:00
Matthieu Gautier
1fcc1ad9d4 Merge pull request #98 from kiwix/http_byte_range_fix
Fix HTTP request byte range handling #91
2017-11-13 14:42:16 +01:00
kelson42
5fd8dd3c36 Fix HTTP request byte range handling #91 2017-11-13 12:01:45 +01:00
Matthieu Gautier
f03ed85972 Merge pull request #87 from swiftugandan/master
do not cache results for searches from the welcome page
2017-11-09 15:48:15 +01:00
Philip Munaawa
52308b764d do not cache results for searches from the welcome page 2017-11-09 14:24:03 +00:00
Kelson
03bac00019 Merge pull request #99 from kiwix/dattaz-patch_issue_19_good
Dattaz patch issue 19 good
2017-11-08 20:19:57 +01:00
kelson42
905b83b3b1 Small beautification of the code 2017-11-08 20:11:55 +01:00
dattaz
894ed12f37 escape the & character of humanReadableBookId to not be interpreted in urls as a new argument 2017-11-08 19:50:23 +01:00
Kelson
573b826861 Merge pull request #62 from kiwix/julianharty-patch-1
Update kiwix-serve.cpp
2017-11-07 20:01:28 +01:00
Julian Harty
8051773124 Fixed a typo in an error message 2017-11-07 19:10:23 +01:00
Matthieu Gautier
69dd6cd869 Merge pull request #94 from kiwix/man_cleaning
Remove kiwix-index and kiiwx-compact man pages
2017-11-06 15:45:11 +01:00
kelson42
8d32bfd16e Remove kiwix-index and kiiwx-compact man pages 2017-11-06 15:31:06 +01:00
Matthieu Gautier
b1d2a1378b Merge pull request #90 from kiwix/new_release
Release of kiwix-tools 0.3.0.
2017-10-24 11:29:34 +02:00
Matthieu Gautier
df7d44128c Release of kiwix-tools 0.3.0. 2017-10-23 11:40:00 +02:00
Matthieu Gautier
ee5333bb91 Merge pull request #86 from kiwix/swiftugandan_root
Swiftugandan root
2017-10-17 16:21:04 +02:00
Philip Munaawa
871d8f4a51 disable caching for the welcome page 2017-10-17 15:46:55 +02:00
Philip Munaawa
9280d519f5 Adding support for relative url location 2017-10-17 15:46:11 +02:00
Matthieu Gautier
540fcd3be9 Merge pull request #84 from kiwix/byte_range
Byte range
2017-10-11 17:14:01 +02:00
Matthieu Gautier
ad7238b0c9 Stop refusing the first connection.
I don't know why we are refusing the first connection.

It seems to work without this.
Moreover, this is not thread safe and it would be pretty complex to
make it thread safe.
2017-10-11 17:00:55 +02:00
Matthieu Gautier
b5c91417ff Better debug information of each request. 2017-10-11 17:00:55 +02:00
Matthieu Gautier
b638df81fa Implement response to bytes range request.
Handle bytes range request http header.
Do not read the full buffer but try to stream it as far as possible.
2017-10-11 17:00:55 +02:00
Matthieu Gautier
58f0a716a6 Correctly return 404 if asked skin is not existing.
Fix #83
2017-10-10 17:02:15 +02:00
Matthieu Gautier
a2324b5e8b Use a structure RequestContext to pass all the context of a request.
This simplifies the code and avoid to pass a lot of arguments to
each function.
2017-10-10 16:59:45 +02:00
Matthieu Gautier
c2ac40d4f5 Merge pull request #82 from kiwix/multi_thread
Make kiwix-server multi-threaded.
2017-10-10 14:43:50 +02:00
Matthieu Gautier
4534b51f5e Use printf instead of cout.
`std::cout` stream is not thread safe at all.
Printing from different threads can lead to corrupted stream (and no
output working).

Using `printf` may still lead to interleaved output but nothing will broke.
2017-10-10 14:39:42 +02:00
Matthieu Gautier
0364951f75 Make kiwix-server multi-threaded. 2017-10-03 16:35:03 +02:00
Matthieu Gautier
a2627e81c4 Merge pull request #78 from kiwix/patch-1
Look for renamed kiwix-compile-resources script as well
2017-09-27 19:15:57 +02:00
Kunal Mehta
cd72a2d73c Look for renamed kiwix-compile-resources script as well
See https://github.com/kiwix/kiwix-lib/pull/76
2017-09-27 19:10:57 +02:00
Matthieu Gautier
fa3f33d3c7 Use sudo to install pip dependencies in travis 2017-09-27 19:03:11 +02:00
Matthieu Gautier
a210cb3a4b Merge pull request #68 from kiwix/css_taskbar
Css taskbar
2017-08-15 15:51:09 -04:00
Matthieu Gautier
63cb47247b Serve the taskbar css as separated file.
For firefox, the file encoding must be specified in the first 1024 bytes.
If it is not, firefox will reload the page when it founds it.

By inserting the taskbar's css directly in the html, we are "moving" down
the encoding of the page, and the encoding is not inside the first 1024
bytes.

This also improve a bit the performance as the browser can cache the css
file and it's avoid us to send the css in earch html file.
2017-08-15 15:15:26 -04:00
Matthieu Gautier
3220ee1276 Move <link> tag in <head> tag.
In html, the link tag should be in head tag, not in the body tag.
2017-08-15 15:08:56 -04:00
Matthieu Gautier
4a1b9cbfa9 Merge pull request #67 from kiwix/no_globalsearch_on_zim
Do not do globalSearch if the zim file has no full text index.
2017-08-15 14:54:35 -04:00
Matthieu Gautier
f2b5904221 Do not do globalSearch if the zim file has no full text index.
Global search is made only on the global task bar.
Task bar display in the article should provide full text search only
if the zim file has associated full text index.

This is done by having a `NULL` searcher. However, commit `558a0375`
return the globalSearcher if no searcher is associated to a zim.

This commit associate a `NULL` searcher to the zim, so we will not use
the globalSearcher.
2017-08-13 11:35:57 -04:00
Matthieu Gautier
f44722fbbc Merge pull request #64 from kiwix/fix_protocol
Correctly set ProtocolPrefix and SearchProtocolPrefix for searcher.
2017-08-11 00:44:28 -04:00
Matthieu Gautier
0cfcc59437 Update to new kiwix-lib API about Searcher instantiation.
`kiwix-lib` remove `setContentHumanReadableId` method in favour of
specifying directly it in the constructor.
2017-08-10 09:45:08 -04:00
Matthieu Gautier
7776eafbfc Correctly set ProtocolPrefix and SearchProtocolPrefix for searcher.
Default `protocolPrefix` for the kiwix-lib searcher is `zim:://`.
We have to change it to `/` for all searcher we create else the search's
results will have a `zim://...` url, which will obviously won't work.
2017-08-09 20:20:56 -04:00
Matthieu Gautier
5989146931 Merge pull request #49 from kiwix/globalSearch
Global search
2017-07-19 09:54:31 +02:00
Matthieu Gautier
ea088b21a4 Introduce a global taskbar on the welcomeHTML page to allow global search.
Global search is a search on all zims.
2017-07-17 18:24:27 +02:00
Matthieu Gautier
558a0375b0 Use a globalSearcher to do multi search on all zims. 2017-07-17 18:23:12 +02:00
Matthieu Gautier
5f0a05e8d8 Add a global_taskbar.html.part file to be use as taskbar in library home.
This is a simplified version of taskbar.html.part without the buttons
(specific to the current read zim)
2017-07-17 18:20:55 +02:00
Matthieu Gautier
4b9dc39c49 Use only one lock to acces zim library.
Search can now use reader. So there is no need to have to different locks.
2017-07-17 18:17:33 +02:00
Matthieu Gautier
08f2373360 Merge pull request #48 from kiwix/no_use_of_tree_h
Remove use of tree.h
2017-07-12 14:45:38 +02:00
Matthieu Gautier
82fb6bc4d0 Remove use of tree.h
All code using tree.h where commented.
As tree.h where install by kiwix-lib and we removed it there, let's remove
its use here.
2017-07-12 10:28:40 +02:00
Matthieu Gautier
17eceeff5b Merge pull request #46 from kiwix/format_code
Format code
2017-07-12 10:06:46 +02:00
Matthieu Gautier
aef20d6c96 Move to C++11.
Code and kiwix-lib are C++11. So compile using C++11.
2017-07-12 10:01:25 +02:00
Matthieu Gautier
4e3ff03059 Format all the code using clang-format.
Add a script `format_code.sh` to easily format the code.
2017-07-05 15:52:32 +02:00
Matthieu Gautier
856bfc675a Bump-up the version to 0.2.
Time to make a new release.
2017-06-27 15:22:33 +02:00
Kelson
7850e79eab Merge pull request #44 from kiwix/custom_welcome_css
custom welcome page css
2017-06-08 13:21:01 +02:00
Emmanuel Engelhart
62769aed57 custom welcome page css 2017-06-08 13:12:31 +02:00
Kelson
29e281209d Merge pull request #43 from Skylsmoi/335/rewrite_welcome_page
rewrite welcome page (fixed histo)
2017-06-08 12:47:55 +02:00
Skylsmoi
0f480d9fb8 fixed boxes size with ellipsis + moved style tag to template + reduced margin/padding 2017-06-08 09:55:11 +02:00
Skylsmoi
1aeeaa2c3b rewrite welcome page 2017-06-07 11:48:21 +02:00
Matthieu Gautier
2fe1a9443c Merge pull request #39 from kiwix/t38
Add --nolibrarybutton option refs #38
2017-06-06 14:40:07 +02:00
Emmanuel Engelhart
569b4d946e Add --nolibrarybutton option 2017-06-04 18:49:55 +02:00
Matthieu Gautier
e51539d161 Merge pull request #36 from kiwix/new_api
Adapt to new kiwix-lib search API.
2017-05-28 23:15:27 +02:00
Matthieu Gautier
f12a731939 Adapt to new kiwix-lib search API. 2017-05-28 23:11:02 +02:00
Matthieu Gautier
d94423964e Merge pull request #34 from kiwix/full_html_document
ZIM/libzim/libkiwix should provide full HTML DOM
2017-05-22 16:00:51 +02:00
Emmanuel Engelhart
af10b665a9 ZIM/libzim/libkiwix should provide full HTML DOM 2017-05-19 20:37:21 +02:00
Kelson
c2d29376d9 Merge pull request #32 from Skylsmoi/336/fix_display_taskbar_save
336/fix display taskbar save
2017-05-16 14:11:28 +02:00
Skylsmoi
fd9c63c76a Merge branch '336/fix_display_taskbar_save' of github.com:Skylsmoi/kiwix-tools into 336/fix_display_taskbar_save 2017-05-16 11:16:26 +02:00
Skylsmoi
4cc46685f7 fix breakpoint for cybook 2017-05-16 11:16:04 +02:00
Kelson
e30da0c0cd Merge pull request #29 from Skylsmoi/336/fix_display_taskbar_save
css rules for taskbar are now more strict
2017-05-07 10:06:27 +02:00
Kelson
70a652e020 Merge branch 'master' into 336/fix_display_taskbar_save 2017-05-06 21:08:38 +02:00
Skylsmoi
97f0c8ec5b added important rules to set the taskbar design 2017-05-02 16:20:59 +02:00
Matthieu Gautier
da83027710 Merge pull request #26 from kiwix/no_ssh_key
Get dependencies from http server, not from ssh.
2017-04-24 17:20:37 +02:00
Matthieu Gautier
ef9b48682b Get dependencies from http server, not from ssh.
`kiwix-build` now publish intermediate dependencies archives in a
http accessible location.

Let's use this location instead of `scp` the archives.
2017-04-24 17:13:42 +02:00
Kelson
e26244687d Merge pull request #24 from Skylsmoi/336/fix_display_taskbar_save
336/fix display taskbar save
2017-04-23 15:43:22 +02:00
Skylsmoi
2634167f41 fix taskbar design for iOS 2017-04-21 15:00:57 +02:00
Skylsmoi
7edc49c4eb Merge branch 'master' of github.com:kiwix/kiwix-tools into 336/fix_display_taskbar_save 2017-04-20 17:37:03 +02:00
Skylsmoi
36225207c0 force custom design to override rules from libraries 2017-04-20 17:35:12 +02:00
Emmanuel Engelhart
1d61e270fb Add CTPP2 link in README 2017-04-16 20:37:01 +02:00
Kelson
5aecb4231d Merge pull request #20 from Skylsmoi/336/fix_display_taskbar
#336 taskbar is now responsive
2017-04-16 11:06:47 +02:00
Skylsmoi
126781bbb5 removed calc() 2017-04-13 11:52:27 +02:00
Skylsmoi
f045590243 #336 taskbar is now responsive 2017-04-13 11:52:27 +02:00
Matthieu Gautier
f46e560d7f Merge pull request #22 from kiwix/search_in_libzim
Search in libzim
2017-04-11 14:02:21 +02:00
Matthieu Gautier
643293c7df Try to link with uuid only if xapian is present. 2017-04-10 14:47:19 +02:00
Matthieu Gautier
799a47142b Adapt kiwix-tools to last kiwix-lib API (Xapian in zimlib). 2017-04-10 14:47:19 +02:00
Matthieu Gautier
79fdee1df2 Merge pull request #23 from kiwix/travisci
Travisci
2017-04-10 14:46:22 +02:00
Matthieu Gautier
ab623b7176 Add TravisCI.
Now the project is build on every PR using TravisCI.

The project dependencies are get from the archive generated by kiwix-build.
2017-04-10 14:42:41 +02:00
Matthieu Gautier
208050df4b Merge pull request #21 from kiwix/no_indexer
Remove indexer and indexing functionality from installer.
2017-04-06 15:39:07 +02:00
Matthieu Gautier
9ead431b3f Remove indexer and indexing functionality from installer.
This is handled by zimwriterfs now (and zimlib itself later on).
2017-04-06 15:37:39 +02:00
Julian Harty
1e6353330d Please discount (ignore) my last commit, it was intended for the kiwix-apache repo. 2017-04-06 00:05:08 +01:00
Julian Harty
482577fd53 You're welcome... and here's the starting point to encourage you to get involved. 2017-04-06 00:02:27 +01:00
Matthieu Gautier
856b487007 Merge pull request #18 from kiwix/snippets
Update to the new API of kiwix-lib.
2017-03-28 11:37:58 +02:00
Matthieu Gautier
cb20e719ee Update to the new API of kiwix-lib. 2017-03-21 16:33:57 +01:00
Matthieu Gautier
25091c320b Merge pull request #16 from kiwix/kiwix-serve.bugfix
Kiwix serve.bugfix
2017-03-20 11:05:21 +01:00
Matthieu Gautier
35b83144c6 Do not compress only if the content is small.
We do not need the test "contentLength < COMPRESSOR_BUFFER_SIZE" to know
if we compress the content or not.

This is a non sens, we WANT to compress the content if it is big.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
063e9ba80d Use compressBound function to reserve the right amount of space.
compressBound function give the upper bound of space needed to
reserve to the compression buffer. Use it instead of using a define.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
e27ce444c6 Correctly check that compress gone well before using the result buffer.
We need to check the return code of compress.
Compress may fail for different reason, one being that the compr_buffer
is not large enough.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
3592cd84c6 Do not modify the compr buffer pointer.
The compr pointer points to the allocated memory. We must not modify
it value.
If we advance the pointer by two bytes each time we compress an answer
we will end to write in some random memory and segfault.

Now, we use a std::vector to correctly handle allocation
(and deallocation!) of the memory.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
a27010c247 Correctly change the compression buffer we send.
For ie browser, we need to remove the two first bytes.
If we make our buffer start two bytes after, we also need to reduce the
size of the buffer by two bytes. Else we will read and send two extra
junk bytes.

Fix #15
2017-03-20 10:08:14 +01:00
Matthieu Gautier
0c01ec5bb5 Cleanup a bit kiwix-serve.cpp
- Remove spaces at end of lines
- Remove unused variables.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
a3a0127edb Do not try to discover ctpp2 ourselves.
Kiwixlib now exports ctpp2 link/cflags in its pkg-config file.
So we don't have to check to ctpp2 here.
2017-02-22 12:10:47 +01:00
Matthieu Gautier
ad7d30cc4f Do not link with iconv when cross-compilating to windows.
Ideally we should check if iconv is present to know if ctpp2 has been
build with iconv.
This may be a bit too complex for our present case. As we know our
cross-compilation environment. It is better to remove the use of iconv
everywhere for now.
2017-02-07 12:25:43 +01:00
Emmanuel Engelhart
134f079c3c Improved README 2017-02-06 20:52:14 +01:00
Matthieu Gautier
4aba306d68 Add missing linking flag for uuid and rt.
Those libraries are used by xapian, so it should be declare there.
But for now, add the link in our compile script as we still want to compile.
2017-02-06 19:03:22 +01:00
Matthieu Gautier
dc6c9d618f Correctly ask link flags to pkg-config.
If we are compiling a static binaries, all dependencies (including indirect
dependencies) must be present on the command line.
To have them, we have to add '--static' option to the pkg-config line.
Meson does this for us, but we must ask it to do it with the 'static'
argument.
2017-01-31 14:45:44 +01:00
Matthieu Gautier
0f6ca21188 Add static linkage argument in meson.build.
Those options were added by the kiwix-build.py script.
But it's better to add them in the meson.build script to allow people
not using kiwix-build to compile static binaries either.
2017-01-31 14:43:25 +01:00
Matthieu Gautier
db7e1e5c8f Do not try to link with ctpp2-st.
ctpp2-st is not a standard name, all other projects use the same base name
for dynamic and static libs.

Debian already patch the lib name in the ctpp2 package.
As we also patch it in kiwix-build, we can ignore ctpp2-st and always
try to link on ctpp2.

This is even necessary as ctpp2-st is not existing at all is those
usecases, so we cannot try to link with ctpp2-st when compiling statically.

We could fix, the ctpp2 lib search to search ctpp2 and ctpp2-st when
compiling statically but it seems to be a lot of work for nothing
as ctpp2-st is not used at all in our usecases.
2017-01-30 18:02:26 +01:00
Matthieu Gautier
e8dc6b0f45 Correctly compare version of meson 2017-01-24 15:41:42 +01:00
Matthieu Gautier
5fe4e9a4ab Delete the macosx directory.
This should have never been there but keep in the kiwix repository.

Fix #7.
2017-01-17 17:42:44 +01:00
Matthieu Gautier
83768b176c Use old find_library to found ctpp2 lib if meson version < 0.31.0.
We need to support as far as possible the meson version installed on
ubuntu 16.04 (LTS).

In meson 0.31.0, the find_library has moved as a method of the compiler.
2017-01-17 17:32:14 +01:00
Matthieu Gautier
2ca63541f2 On Windows, ctpp2 use the iconv libraries.
If we are cross-compiling to windows, we need to also link with the
iconv library.

We do not check for the iconv library existance here. We assume that
if the ctpp2 library is present all its own dependencies are present also.
2017-01-17 10:51:07 +01:00
Matthieu Gautier
5cfbda1219 Force the template specialization for the min function.
'max' is a size_t and 'blob()->size()-pos' is a uint64_t.
Depending of the compiler (version, options, ...) this is a error as
we don't know which template specialization we have to use.
2017-01-17 10:29:04 +01:00
Matthieu Gautier
9aa7e371f7 Fix header include for cross-compilation to Windows.
- On unix, filenames are case sensitive and all include files are lowercase
- When crosscompiling to Windows, we use mingw32 and not msc.
  So we should not try to include "stdint4win.h"
- Windows includes #define interface to struct.
  As we use interface as variable name, we need to undef interface
2017-01-17 10:26:04 +01:00
Matthieu Gautier
1d2a9879cc Merge pull request #9 from legoktm/zlib
meson: Add missing zlib dependency
2017-01-13 11:40:10 +01:00
Matthieu Gautier
25dc9b1d55 Remove kiwix-builder.py script as it as been move in kiwix-build repo.
Also update README.md.
2017-01-10 10:50:58 +01:00
Kunal Mehta
87cb692c6a meson: Add missing zlib dependency 2017-01-06 04:25:30 -08:00
Matthieu Gautier
384d113b6f Compile and install other tools than kiwix-serve. 2017-01-03 11:57:12 +01:00
Matthieu Gautier
9465b764fa Fix resources compilation.
Add missing files and always build them.
2017-01-03 11:57:12 +01:00
Matthieu Gautier
ea915b6410 Meson compile command (ninja) also need a proper environment.
The ninja command may relaunch meson if meson files have changed.
As we need a proper environment (PKG_CONFIG_PATH, PATH) to let meson
configure properly, we also need to pass the environment to ninja.
2017-01-03 11:50:18 +01:00
Matthieu Gautier
9fdbb8b574 Let's meson found the compile_resource.py script.
Add the INSTALL_DIR/bin dir to the path and allow meson to found installed
binaries.
2016-12-23 13:09:24 +01:00
Matthieu Gautier
2b12f2b830 Set the patch paths relative to the script, not the cwd.
This way, we can run the script from everywhere.
2016-12-23 13:08:09 +01:00
Matthieu Gautier
9f36014449 Use the new script compile_resource from kiwix-lib to compile resources.
Now, resources are automatically recompiled at build.
2016-12-23 12:47:15 +01:00
Matthieu Gautier
94058ce811 Add README and other files 2016-12-22 14:30:58 +01:00
Matthieu Gautier
f580a06163 Meson version of kiwix-lib and kiwix-tools are on master now. 2016-12-22 13:49:56 +01:00
Matthieu Gautier
b363dc387b Add installation of missing hpp when compiling/installing pugixml. 2016-12-22 13:49:56 +01:00
Matthieu Gautier
834f52a9ec Temporary change the git_remote for zimlib.
zimlib doesn't use github but gerrit to handle changes.
As this patches to review, there is no meson branche for now.

Use a personal fork for now. As soon as the meson scripts have been
integrated in openzim repository, we should revert this commit.
2016-12-22 13:49:56 +01:00
Matthieu Gautier
6007ca6eff Install in and use the correct libdir; and other compatibility fixes.
Ubuntu on 64 bits install lib in lib/x86_64-linux-gnu and meson correctly
detect this.
Thus it install libs (zimlib, kiwix) in this directory. However we
look for pkgconfig files in $INTALL_DIR/lib64. And so, the lib is not
found.

We could force meson to install in $INSTALL_DIR/lib64 all the time but
it is just better to follow the correct convention on Ubuntu.

Reuse the algorithm used in meson to correctly detect the libprefix,
use it and force all build script (autotools, cmake, meson) to install there.

In the same way, ninja may be called ninja-build depending of the distribution.
Or depending of how meson is installed, we may have to launch meson or meson.py.
So we detect the command to launch to try to be as most as possible portable.
2016-12-22 13:49:56 +01:00
Matthieu Gautier
ab70e1375e Add a script to build all projects and dependencies for kiwix-tools.
This script download and compile all depedencies and subproject for
kiwix-tools.

Ideally it should be as simple as run the script with the install dir as
argument.

This script compile a dynamic or a static build of kiwix-tools (kiwix-serve)

This as been tested on Fedora.
2016-12-22 13:49:56 +01:00
Matthieu Gautier
8871e6c2e3 first version of meson 2016-12-22 13:49:56 +01:00
140 changed files with 3721 additions and 13865 deletions

12
.clang-format Normal file
View File

@@ -0,0 +1,12 @@
BasedOnStyle: Google
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Linux
DerivePointerAlignment: false
SpacesInContainerLiterals: false
Standard: Cpp11
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: kiwix # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # https://kiwix.org/support-us/

27
.github/move.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for Move Issues - https://github.com/dessant/move-issues
# Delete the command comment when it contains no other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: false
# Mention issue and comment authors
mentionAuthors: true
# Preserve mentions in the issue content
keepContentMentions: true
# Move labels that also exist on the target repository
moveLabels: true
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo
# Repository to extend settings from
# _extends: repo

106
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,106 @@
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
Windows:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages
run:
choco install pkgconfiglite ninja
- name: Install python modules
run: pip3 install meson
- name: Setup MSVC compiler
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- name: Install dependencies
uses: kiwix/kiwix-build/actions/dl_deps_archive@main
with:
target_platform: win-x86_64-static
- name: Compile
shell: cmd
run: |
set PKG_CONFIG_PATH=%cd%\BUILD_win-amd64\INSTALL\lib\pkgconfig
set CPPFLAGS=-I%cd%\BUILD_win-amd64\INSTALL\include
meson.exe setup . build -Dstatic-linkage=true --buildtype=release
cd build
ninja.exe
- name: Test
shell: cmd
run: |
cd build
meson.exe test --verbose
env:
WAIT_TIME_FACTOR_TEST: 10
Linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target:
- linux-x86_64-static
- linux-x86_64-dyn
include:
- target: linux-x86_64-static
image_variant: jammy
lib_postfix: '/x86_64-linux-gnu'
arch_name: linux-x86_64
- target: linux-x86_64-dyn
image_variant: jammy
lib_postfix: '/x86_64-linux-gnu'
arch_name: linux-x86_64
env:
HOME: /home/runner
container:
image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2025-06-07"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
uses: kiwix/kiwix-build/actions/dl_deps_archive@main
with:
target_platform: ${{ matrix.target }}
- name: Compile
shell: bash
run: |
if [[ "${{matrix.target}}" =~ .*-static ]]; then
MESON_OPTION="-Dstatic-linkage=true"
else
MESON_OPTION=""
fi
if [ -e "$HOME/BUILD_${{matrix.arch_name}}/meson_cross_file.txt" ]; then
MESON_OPTION="$MESON_OPTION --cross-file $HOME/BUILD_${{matrix.arch_name}}/meson_cross_file.txt"
fi
meson . build ${MESON_OPTION}
cd build
ninja
env:
PKG_CONFIG_PATH: "${{env.HOME}}/BUILD_${{matrix.arch_name}}/INSTALL/lib/pkgconfig:${{env.HOME}}/BUILD_${{matrix.arch_name}}/INSTALL/lib${{matrix.lib_postfix}}/pkgconfig"
CPPFLAGS: "-I${{env.HOME}}/BUILD_${{matrix.arch_name}}/INSTALL/include"

67
.github/workflows/docker.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: Docker
on:
workflow_dispatch:
inputs:
version:
description: Specific version to build (overrides on-master and tag-pattern)
required: false
default: ''
jobs:
build-and-push-kiwix-tools:
name: Deploy kiwix-tools Docker Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: build and publish kiwix-tools
uses: openzim/docker-publish-action@v10
with:
image-name: kiwix/kiwix-tools
registries: ghcr.io
credentials: |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
context: docker
latest-on-tag: true
build-args:
VERSION={tag}
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
linux/arm/v6
linux/386
restrict-to: kiwix/kiwix-tools
manual-tag: ${{ github.event.inputs.version }}
repo_description: auto
repo_overview: Kiwix command line tools
build-and-push-kiwix-serve:
name: Deploy kiwix-serve Docker Image
runs-on: ubuntu-22.04
needs: build-and-push-kiwix-tools
steps:
- uses: actions/checkout@v4
- name: build and publish kiwix-serve
uses: openzim/docker-publish-action@v10
with:
image-name: kiwix/kiwix-serve
registries: ghcr.io
credentials: |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
context: docker/server
latest-on-tag: true
build-args:
VERSION={tag}
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
linux/arm/v6
linux/386
restrict-to: kiwix/kiwix-tools
manual-tag: ${{ github.event.inputs.version }}
repo_description: auto
repo_overview: Kiwix web-server

112
.github/workflows/package.yml vendored Normal file
View File

@@ -0,0 +1,112 @@
name: Packages
on:
pull_request:
push:
branches:
- main
release:
types: [published]
jobs:
build-deb:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
distro:
# - debian-unstable
# - debian-trixie
# - debian-bookworm
# - debian-bullseye
- ubuntu-noble
- ubuntu-jammy
steps:
- uses: actions/checkout@v4
# Determine which PPA we should upload to
- name: PPA
id: ppa
run: |
if [[ $REF == refs/tags* ]]
then
echo "ppa=kiwixteam/release" >> $GITHUB_OUTPUT
else
echo "ppa=kiwixteam/dev" >> $GITHUB_OUTPUT
fi
env:
REF: ${{ github.ref }}
- uses: legoktm/gh-action-auto-dch@main
with:
fullname: Kiwix builder
email: release+launchpad@kiwix.org
distro: ${{ matrix.distro }}
# - uses: legoktm/gh-action-build-deb@debian-unstable
# if: matrix.distro == 'debian-unstable'
# name: Build package for debian-unstable
# id: build-debian-unstable
# with:
# args: --no-sign
#
# - uses: legoktm/gh-action-build-deb@b47978ba8498dc8b8153cc3b5f99a5fc1afa5de1 # pin@debian-trixie
# if: matrix.distro == 'debian-trixie'
# name: Build package for debian-trixie
# id: build-debian-trixie
# with:
# args: --no-sign
#
# - uses: legoktm/gh-action-build-deb@1f4e86a6bb34aaad388167eaf5eb85d553935336 # pin@debian-bookworm
# if: matrix.distro == 'debian-bookworm'
# name: Build package for debian-bookworm
# id: build-debian-bookworm
# with:
# args: --no-sign
#
# - uses: legoktm/gh-action-build-deb@084b4263209252ec80a75d2c78a586192c17f18d # pin@debian-bullseye
# if: matrix.distro == 'debian-bullseye'
# name: Build package for debian-bullseye
# id: build-debian-bullseye
# with:
# args: --no-sign
- uses: legoktm/gh-action-build-deb@9114a536498b65c40b932209b9833aa942bf108d # pin@ubuntu-noble
if: matrix.distro == 'ubuntu-noble'
name: Build package for ubuntu-noble
id: build-ubuntu-noble
with:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}
- uses: legoktm/gh-action-build-deb@ubuntu-jammy
if: matrix.distro == 'ubuntu-jammy'
name: Build package for ubuntu-jammy
id: build-ubuntu-jammy
with:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}
- uses: actions/upload-artifact@v4
with:
name: Packages for ${{ matrix.distro }}
path: output
- uses: legoktm/gh-action-dput@main
name: Upload dev package
# Only upload on pushes to git default branch
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && startswith(matrix.distro, 'ubuntu-')
with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
repository: ppa:kiwixteam/dev
packages: output/*_source.changes
- uses: legoktm/gh-action-dput@main
name: Upload release package
# Only upload on pushes to main or tag
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && startswith(matrix.distro, 'ubuntu-')
with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
repository: ppa:kiwixteam/release
packages: output/*_source.changes

21
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,21 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

View File

@@ -0,0 +1 @@
https://kiwix.org/funding.json

14
AUTHORS Normal file
View File

@@ -0,0 +1,14 @@
Emmanuel Engelhart <kelson@kiwix.org>
Renaud Gaudin <reg@kiwix.org>
Christian Pühringer <cip@gmx.at>
Fabien Coullon <fcoulon@linterweb.com>
Guillaume Duhamel <gduhamel@linterweb.com>
Wilfredo Rodriguez <wilfredor@kiwix.org>
Jorge Gonzalez <jag2kn@gmail.com>
Richzendy <richzendy@fedoraproject.org>
Ayoub Dardory <ayoubuto@gmail.com>
Rashiq Ahmad <rashiq.z@gmail.com>
Isaac Hutt <mhutti1@gmail.com>
Elad Keyshawn <elad.keyshawn@gmail.com>
Matthieu Gautier <mgautier@kymeria.fr>
Translatewiki comunity https://translatewiki.net/wiki/Translating:Kiwix

676
COPYING Normal file
View File

@@ -0,0 +1,676 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

396
Changelog Normal file
View File

@@ -0,0 +1,396 @@
kiwix-tools 3.8.1
=================
* Kiwix server
- Hide port number in URL when server is running on port 80 (@vighnesh-sawant #763)
- Better deal with container /data dir permissions (@kelson42 #787)
* Other
- Fix kiwix-manage docopt integration (@kelson42 #783)
kiwix-tools 3.8.0
=================
* Kiwix server
- Improve message when server is running on standard port (@vighnesh-sawant #763)
- Update container base image to latest Alpline version (@yashgoyal0110 #771)
- Container image to use unprivileged user (@Sedetisu #755)
- Empty urlRootLocation doesn't disable book preview links anymore (@veloman-yunkan #1224)
- Add support of IPv6 (@sgourdas #673 #704)
- Popups are allowed to escape the browser sandbox (@veloman-yunkan #1208)
* Other
- Stop publishing on Ubuntu 20.04 PPA (@kelson42 #748)
- Use Docopt for command line argument parsing (@mgautierfr #695)
* Compilation & Packaging
- Based on libkiwix 14.1.0 (@kelson42 #773)
- Improve CI/CD (@kelson42 #681 #698 #702 #705 #720 #722, @mgautierfr #695)
kiwix-tools 3.7.0
=================
* Fixed ZIM name vs Book name confusion in documentation (@veloman-yunkan #663)
* Fixes compilation dependencies to rely on appropriate version (@kelson42 #667)
* New --skipInvalid Kiwix Server command line option (@schuellerf @kelson42 #666)
kiwix-tools 3.6.0
=================
* Improved kiwix-serve man page (@iArchitSharma #626)
* C++17 compliant code base (@mgautierfr #636)
* Support of libkiwix13 (@mgautierfr #633)
* Additional docker images archs for armv6 and i386 (@rgaudin #622)
kiwix-tools 3.5.0
=================
* Do not use `--static` option when compiling on MacOs (@mgautierfr #615)
* Move main branch from `master` to `main`.
* Fix docker image (@jacroe #597)
* Various CI improvements (@kelson42)
kiwix-serve
-----------
* Add documentation about the kiwix-serve API (@veloman-yunkan #586)
https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html#http-api
kiwix-tools 3.4.0
=================
* Remove last reference to kiwix-read tool (@legoktm #569)
kiwix-serve
-----------
* Fix broken indentation in usage (@kelson42 #560)
* Exit if wrong arguments are passed (@kelson42 #567)
* Do not allow multiple values for same option (@juuz0 #564)
* Fix default location of "rootLocation" (@rgaudin #571)
* [DOCKER] Change default port to 8080 (@neyder #581)
* [DOCKER] Simplify dockerfile (@rgaudin #582)
kiwix-manage
------------
* Fix man page (@kelson42 #576)
kiwix-tools 3.3.0
=================
* Remove kiwix-read tool (@veloman-yunkan #535)
kiwix-serve
-----------
* Add an option to limit the number of connections for a same IP (@juuz0 #534)
* Add an option to limit the number of zim in a multizim fulltext search (@mgautierfr #558)
kiwix-search
------------
* Remove usage of libkiwix's deprecated api (@veloman-yunkan #535)
kiwix-manage
------------
* Correctly return a value !0 if something went wrong (@mgautierfr #553)
kiwix-tools 3.2.0
=================
* Print the version of all dependencies (@kelson42 #516)
* Better Docker images (@kelson42 @rgaudin)
* Update Readme (@kelson42)
* Build debian packages on CI (@legoktm #394)
* Add man pages for kiwix-read and kiwix-search (@legoktm #392)
* Various fixes (@legoktm @hashworks @mgautierfr)
kiwix-serve
-----------
* Print the url on which a user can connect to on startup (@juuz0 #499 #522)
* Reload library on SIGHUP signal (@veloman-yunkan #497)
* Add a option `--monitorLibrary` to monitor and automically reload the library
(@veloman-yunkan #503)
* Correct handling of SIGTERM and SIGINT (@veloman-yunkan #488)
* Add `--customIndexTemplate` option (@manan #477)
* Add `--help` option (@kelson42 #511)
kiwix-tools 3.1.2
=================
* Use new threadsafe API of kiwix-lib to do suggestions search.
kiwix-tools 3.1.1
=================
* Fix compilation on Windows' CI
kiwix-tools 3.1.0
=================
* [SERVER] Add option to block external links
kiwix-tools 3.0.3
=================
* [MANAGER] Fix broken --version argument parsing
kiwix-tools 3.0.2
=================
* New option --version for all tools
* Remove benchmark.sh file.
* [DOCKER] Add ability to download a file at container start.
* [CI] Move to github actions instead of travis.
* [SERVER] Trust the given library by default.
* [SERVER] Add shortcut alias for option `--address` and `--nodatealias`
kiwix-tools 3.0.1
=================
* Fix --nodatealiases inverted logic regression
kiwix-tools 3.0.0
=================
* Move kiwix-serve implementation in kiwix-lib.
kiwix-tools 2.1.0
=================
* Fix few compilation errors.
kiwix-serve
-----------
* Use new api to filter the library.
* Mobile friendly top bar.
* Add notag parameter to be able to exclude tags from the zim search.
kiwix-tools 2.0.0
=================
kiwix-manage
-----------
* Better usage()
* Adding multiple files bug fix
* Remove download command.
kiwix-serve
-----------
* Better usage()
* Display properly welcome page on 3 columns
* New welcome page footer "Powered by Kiwix"
kiwix-tools 1.2.1
=================
kiwix-serve
-----------
* Always use POLL when avaible.
kiwix-tools 1.2.0
=================
* Remove rpath for installed binaries.
kiwix-serve
-----------
* New Dockerfile of kiwix-serve
* New --nodatealiases option
* Do not use POLL on windows
kiwix-manage
------------
* Do not show all books if book ids has been provided.
* Be able to add several zim files in the same time in a library.
kiwix-tools 1.1.0
=================
kiwix-serve
-----------
* Fix bug about handling of absolute url in old zim file.
* All the catalog to be searched by tags.
kiwix-tools 1.0.0
=================
* [CI] Use the new deps archive xz
* Move version 1.0.0. There is no need to stay in pre 1.0 version.
kiwix-serve
-----------
* Correctly implement redirection.
kiwix-serve now return a 302 http status code instead of resolving the
redirection internally and return the content.
kiwix-tools 0.9.0
=================
* Update README
* Update man pages
* Remove support of external indexes (manage, search, serve)
* Update build system as we don't use ctpp2 anymore
* Update to last kiwix-lib API.
kiwix-manage
------------
* Update usage.
kiwix-tools 0.8.0
=================
kiwix-manage
------------
* Be able to remove several books from the library in one command.
kiwix-tools 0.7.0
=================
* Adapt to kiwix-lib new API
kiwix-serve
-----------
* Dumps only valid books in the opdsfeed.
* Allow the opds feed to be filtered by lang and paginated.
kiwix-manage
------------
* Add a download command to download a remote book locally
* Book are referenced by bookId not index.
* No more indexType option as it is always XAPIAN.
kiwix-tools 0.6.1
=================
kiwix-serve
-----------
* Update README.
* Fix crash when `--library` flag is provided without value.
* Correctly handle mimetype of file without extension on 64bits.
* Minor fixes
kiwix-tools 0.6.0
=================
* remove kiwix-install tool.
kiwix-serve
-----------
* Improved taskbar #160
* Fix global page when using the option `--nosearchbar`
* Return 404 for missing resources
* Fix compilation for gcc 4.8.
kiwix-manage
------------
* Returns proper exit code (not always 0)
kiwix-tools 0.5.0
=================
* Build kiwix-tools setting the RPATH
* Compile without warning.
kiwix-serve
------------
* Serve metadata information using the "/meta" url.
* Serve an OPDS stream of all zim handled by kiwix-serve
All informations cannot be infer from the zim file itself,
you should use a library.xml to provide needed information (url, ...)
* Update kiwix-serve to use the new API of kiwix-lib
kiwix-tools 0.4.0
=================
* Use gcc-5 on travis.
kiwix-serve
-----------
* Accept zim file with `&` in the name
* Do not cache (on client side) global search (as it can depends on the zim
files handled)
* Fix HTTP byte range handling. (#91)
* Fix opening of relative path (#70)
* Add a small (and hidden) API to do geo search.
* Better request parsing. (#91)
* Better handling of invalid request (#116)
* Various bug fixes (#146, #150, #153, #165, #168, #165)
kiwix-search
------------
* Add an option `--suggestion` to do suggestion search with
kiwix-search.(#132)
kiwix-tools 0.3.0
=================
* Move to C++11
kiwix-serve
-----------
* Add a global taskbar in the welcome page to search in all zims (#49)
* Serve the taskbar as css file instead of including it in the html (#68):
* Better client caching
* The html encoding is now in the first 1024 bytes and firefox correctly
detect the encoding
* Make kiwix-server multi-threaded (#82)
* Correctly return 404 instead of crashing when request inexistant skin file
(#83)
* Correctly respond to bytes-range requests.(#84)
* Directly respond to first request for a url instead of refusing the first
connexion
* Add support to relative url location. (#86)
* Remove caching (on client side) for the welcome page. (#86)
kiwix-tools 0.2.0
=================
* Remove indexer tools
kiwix-serve
-----------
* Correctly fix the deflate data we send over http. (#15)
* Update in the taskbar (or topbar):
* Taskbar is responsive (github.com/kiwix/kiwix/issues/336)
* Force css rules for the taskbar (and not be impacted by content's css)
* Add `--nolibrarybutton` to hide the library button from the taskbar.
* Rewrite of the welcome page.
kiwix-installer
---------------
* Remove indexing functionnality

152
README.md Normal file
View File

@@ -0,0 +1,152 @@
Kiwix tools
===========
The Kiwix tools is a collection of [Kiwix](https://kiwix.org) related
command line tools:
* kiwix-manage: Manage XML based library of ZIM files
* kiwix-search: Full text search in ZIM files
* kiwix-serve: HTTP daemon serving ZIM files
[![latest release](https://img.shields.io/github/v/tag/kiwix/kiwix-tools?label=latest%20release&sort=semver)](https://download.kiwix.org/release/kiwix-tools/)
[![Repositories](https://img.shields.io/repology/repositories/kiwix-tools?label=repositories)](https://github.com/kiwix/kiwix-tools/wiki/Repology)
[![Docker](https://ghcr-badge.egpl.dev/kiwix/kiwix-tools/latest_tag?label=docker)](https://ghcr.io/kiwix/kiwix-tools)
[![Docker](https://ghcr-badge.egpl.dev/kiwix/kiwix-tools/latest_tag?label=docker%20(kiwix-serve))](https://ghcr.io/kiwix/kiwix-tools)
[![Build Status](https://github.com/kiwix/kiwix-tools/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kiwix/kiwix-tools/actions/workflows/ci.yml?query=branch%3Amain)
[![Doc](https://readthedocs.org/projects/kiwix-tools/badge/?style=flat)](https://kiwix-tools.readthedocs.org/en/latest/?badge=latest)
[![CodeFactor](https://www.codefactor.io/repository/github/kiwix/kiwix-tools/badge)](https://www.codefactor.io/repository/github/kiwix/kiwix-tools)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
Disclaimer
----------
This document assumes you have a little knowledge about software
compilation. If you experience difficulties with the dependencies or
with the Kiwix tools compilation itself, we recommend to have a look
to [kiwix-build](https://github.com/kiwix/kiwix-build).
Preamble
--------
Although the Kiwix tools can be compiled/cross-compiled on/for many
systems, the following documentation explains how to do it on POSIX
ones. It is primarily thought for GNU/Linux systems and has been tested
on recent releases of
[Debian](https://debian.org)/[Ubuntu](https://ubuntu.com) and
[Fedora](https://getfedora.org).
Dependencies
------------
The Kiwix tools rely on a few third party software libraries. They are
prerequisites to the Kiwix tools compilation. Therefore, following
libraries need to be available:
* [libkiwix](https://github.com/kiwix/libkiwix) (package `libkiwix` on Debian/Ubuntu)
* [libzim](https://github.com/openzim/libzim) (package `libzim` on Debian/Ubuntu)
These dependencies may or may not be packaged by your operating
system. They may also be packaged but only in an older version. They
may be also packaged but without providing a static version. The
compilation script will tell you if one of them is missing or too old.
In the worse case, you will have to download and compile bleeding edge
version by hand.
If you want to install these dependencies locally, then use the
kiwix-tools directory as install prefix.
If you want to compile Kiwix tools statically, the dependencies should
be compiled statically (provide a `lib...a` library), for example by
using `--enable-static` with `./configure`.
Environment
-------------
The Kiwix tools build using [Meson](http://mesonbuild.com/) version
0.43 or higher. Meson relies itself on Ninja, pkg-config and a few other
compilation tools. Install them first:
* [Meson](http://mesonbuild.com/)
* [Ninja](https://ninja-build.org/)
* [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)
These tools should be packaged if you use a cutting edge operating
system. If not, have a look to the [Troubleshooting](#Troubleshooting)
section.
Compilation
-----------
Once all dependencies are installed, you can compile Kiwix tools with:
```bash
meson . build
ninja -C build
```
By default, it will compile dynamic linked libraries. If you want
statically linked libraries, you can add `-Dstatic-linkage=true`
option to the Meson command.
Depending of you system, `ninja` may be called `ninja-build`.
Installation
------------
If you want to install the Kiwix tools, here we go:
```bash
ninja -C build install
```
You might need to run the command as `root` (or using `sudo`),
depending on where you want to install the Kiwix tools. After the
installation succeeded, you may need to run ldconfig (as `root`).
Uninstallation
------------
If you want to uninstall the Kiwix tools:
```bash
ninja -C build uninstall
```
Like for the installation, you might need to run the command as `root`
(or using `sudo`).
Docker
------
An official Docker image of the Kiwix tools can be found on
[GHCR](https://ghcr.io/kiwix/kiwix-tools). A
`kiwix-serve` dedicated Docker image [exists
too](https://ghcr.io/kiwix/kiwix-serve).
Troubleshooting
---------------
If you need to install Meson "manually":
```bash
virtualenv -p python3 ./ # Create virtualenv
source bin/activate # Activate the virtualenv
pip3 install meson # Install Meson
hash -r # Refresh bash paths
```
If you need to install Ninja "manually":
```bash
git clone git://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
mkdir ../bin
cp ninja ../bin
cd ..
```
If the compilation still fails, you might need to get a more recent
version of a dependency than the one packaged by your Linux
distribution. Try then with a source tarball distributed by the
problematic upstream project or even directly from the source code
repository.
License
-------
[GPLv3](https://www.gnu.org/licenses/gpl-3.0) or later, see
[COPYING](COPYING) for more details.

5
debian/changelog vendored Normal file
View File

@@ -0,0 +1,5 @@
kiwix-tools (0.0.0) unstable; urgency=medium
* Initial release
-- Kunal Mehta <legoktm@debian.org> Mon, 13 Jul 2020 17:21:11 -0700

27
debian/control vendored Normal file
View File

@@ -0,0 +1,27 @@
Source: kiwix-tools
Section: utils
Priority: optional
Maintainer: Kiwix team <kiwix@kiwix.org>
Build-Depends: debhelper-compat (= 13),
libzim-dev (>= 9.0), libzim-dev (<< 10.0),
libkiwix-dev (>= 14.0), libkiwix-dev (<< 15.0),
cmake,
libdocopt-dev,
meson,
pkgconf,
Standards-Version: 4.6.2
Homepage: https://github.com/kiwix/kiwix-tools
Rules-Requires-Root: no
Package: kiwix-tools
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: collection of Kiwix tools
kiwix-tools is a collection of various command-line tools used to help
users interact with and manage ZIM files. It includes:
* kiwix-serve is a standalone HTTP server for serving ZIM files
over the network.
* kiwix-manage allows one to manage the content of the Kiwix library (an
XML file listing available ZIM files).
* kiwix-search allows one to find articles in a ZIM file using fulltext
search patterns.

1
debian/copyright vendored Normal file
View File

@@ -0,0 +1 @@
See COPYING in the repository root.

5
debian/rules vendored Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (native)

34
docker/Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
FROM alpine:3.22
LABEL org.opencontainers.image.source=https://github.com/openzim/kiwix-tools
# TARGETPLATFORM is injected by docker build
ARG TARGETPLATFORM
ARG VERSION
RUN set -e && \
apk --no-cache add dumb-init curl && \
echo "TARGETPLATFORM: $TARGETPLATFORM" && \
if [ "$TARGETPLATFORM" = "linux/386" ]; then ARCH="i586"; \
# linux/arm64/v8 points to linux/arm64
elif [ "$TARGETPLATFORM" = "linux/arm64/v8" \
-o "$TARGETPLATFORM" = "linux/arm64" ]; then ARCH="aarch64"; \
# linux/arm translates to linux/arm/v7
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCH="armv8"; \
elif [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then ARCH="armv6"; \
elif [ "$TARGETPLATFORM" = "linux/amd64/v3" \
-o "$TARGETPLATFORM" = "linux/amd64/v2" \
-o "$TARGETPLATFORM" = "linux/amd64" ]; then ARCH="x86_64"; \
# we dont suppot any other arch so let it fail
else ARCH="unknown"; fi && \
# download requested kiwix-tools version
url="http://mirror.download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-$ARCH-$VERSION.tar.gz" && \
echo "URL: $url" && \
curl -k -L $url | tar -xz -C /usr/local/bin/ --strip-components 1 && \
# only needed in dockerfile
apk del curl
# expose kiwix-serve default port
EXPOSE 80
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/bin/sh", "-c", "echo 'Welcome to kiwix-tools! The following binaries are available:' && ls /usr/local/bin/"]

36
docker/README.md Normal file
View File

@@ -0,0 +1,36 @@
Kiwix-tools Docker image
===
- Available on [ghcr.io](https://ghcr.io/kiwix/kiwix-tools).
- multi-arch (`linux/amd64`, `linux/arm64`, `linux/arm/v7`)
- based on official `kiwix-tools` binaries.
## Usage
``` sh
$ docker run -it ghcr.io/kiwix/kiwix-tools:3.1.2
Welcome to kiwix-tools! The following binaries are available:
kiwix-manage kiwix-search kiwix-serve
```
`kiwix-tools` operates on zim files. You shall mount a volume to access the files.
```sh
docker run -v $(pwd):/data -it ghcr.io/kiwix/kiwix-tools kiwix-search /data/wikipedia_fr_test.zim "Mali"
```
## Building and reusing
- `kiwix/kiwix-tools` is multi-arch and is ideally built using `buildx`.
- requires a `--build-arg VERSION=` with the kiwix-tools release.
- can be built using `docker build` in which case it expects an additionnal `--build-arg ARCH=arm` for arm. Otherwise defaults to `amd64`.
**Notes:**
- `wget` in `alpine:3` on `arm/v7` (__inside github action only__) crashes when downloading from HTTPs locations. Keep http-only in Dockerfile.
- Was also unhappy when using the mirrors so it's using `mirror.download` on purpose.
## See also
If you are interested by a Kiwix server only container image, [here it is](server/README.md).

18
docker/server/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
ARG VERSION=latest
# kiwix-tools is multi-arch
FROM ghcr.io/kiwix/kiwix-tools:$VERSION
LABEL org.opencontainers.image.source=https://github.com/openzim/kiwix-tools
# expose kiwix-serve default port and workdir
EXPOSE 8080
VOLUME /data
WORKDIR /data
# running as a named unprivileged user
RUN addgroup -S user && adduser -S user -G user
USER user
COPY ./start.sh /usr/local/bin/
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/start.sh"]

56
docker/server/README.md Normal file
View File

@@ -0,0 +1,56 @@
Kiwix serve Docker image
========================
With local ZIM file(s)
----------------------
* Download a ZIM file from <https://wiki.kiwix.org/wiki/Content>
* Given `wikipedia.zim` and `wiktionary.zim` reside in `/tmp/zim/`, execute the following:
```bash
docker run -v /tmp/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve wikipedia.zim wiktionary.zim
```
or, if you want to load all ZIM files within a directory, then use globbing:
```bash
docker run -v /tmp/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve '*.zim'
```
With remote ZIM file
--------------------
```bash
docker run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -p 8080:8080 ghcr.io/kiwix/kiwix-serve
```
Change default port
-------------------
You can change port to expose with environment variable PORT, useful if running on Podman, K8s or OpenShift
```bash
podman run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -e PORT=8888 -p 8080:8888 ghcr.io/kiwix/kiwix-serve
```
ARM
---
Build an image for an ARM based GNU/Linux:
```bash
docker build . -t ghcr.io/kiwix/kiwix-serve:latest --build-arg ARCH="arm32v7/"
```
Docker Compose
--------------
You can also deploy kiwix with
[`docker-compose`](https://docs.docker.com/compose/). Check out a
sample at [docker-compose.yml.example](docker-compose.yml.example).
Screenshots
-----------
![screenshot_1.png](https://github.com/kiwix/kiwix-tools/raw/master/docker/server/pictures/screenshot_1.png)
![screenshot_2.png](https://github.com/kiwix/kiwix-tools/raw/master/docker/server/pictures/screenshot_2.png)

View File

@@ -0,0 +1,14 @@
version: '3.3'
services:
kiwix-serve:
ports:
- 8080:8080
image: ghcr.io/kiwix/kiwix-serve:latest
# uncomment next 4 lines to use it with local zim file in /tmp/zim
# volumes:
# - /tmp/zim:/data
# command:
# - '*.zim'
# uncomment next 2 lines to use it with remote zim file
# environment:
# - 'DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim'

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

29
docker/server/start.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
# Download if necessary a file
if [ ! -z "$DOWNLOAD" ]
then
ZIM=`basename $DOWNLOAD`
wget $DOWNLOAD -O "$ZIM"
# Set arguments
if [ "$#" -eq "0" ]
then
set -- "$@" $ZIM
fi
fi
if [ -z "$PORT" ]
then
PORT=8080
fi
CMD="/usr/local/bin/kiwix-serve --port=$PORT $@"
echo $CMD
$CMD
# If error, print the content of /data
if [ $? -ne 0 ]
then
echo "Here is the content of /data:"
find /data -type f
fi

50
docs/conf.py Normal file
View File

@@ -0,0 +1,50 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'kiwix-tools'
copyright = '2024, kiwix-team'
author = 'kiwix-team'
# -- General configuration ---------------------------------------------------
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme"
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

8
docs/index.rst Normal file
View File

@@ -0,0 +1,8 @@
Welcome to kiwix-tools' documentation!
======================================
.. toctree::
:maxdepth: 2
:caption: Contents:
kiwix-serve

891
docs/kiwix-serve.rst Normal file
View File

@@ -0,0 +1,891 @@
***********
kiwix-serve
***********
Introduction
============
``kiwix-serve`` is a tool for serving ZIM file content over HTTP. It supports
serving a library containing multiple ZIM files. In a large library served by a
``kiwix-serve`` instance clients can look up/filter ZIM files of interest by
words in their :term:`titles <ZIM title>` and/or descriptions, language, tags, etc.
``kiwix-serve`` provides a ZIM file viewer for displaying inidividual pages
from a ZIM file inside the user's web browser (without downloading the full ZIM
file).
Clients can also remotely search inside those ZIM files that contain a full-text
search database.
``kiwix-serve`` supports Web browsers `Firefox >= 70, Chrome >= 80, Edge >= 80, ChromeAndroid >= 80, Safari >= 14, iOS >= 14 <https://browsersl.ist/#q=Firefox+%3E%3D+70%2C+Chrome+%3E%3D+80%2C+Edge+%3E%3D+80%2C+ChromeAndroid+%3E%3D+80%2C+Safari+%3E%3D+14%2C+iOS+%3E%3D+14>`_.
Usage
=====
.. code-block:: sh
kiwix-serve --library [OPTIONS] LIBRARY_FILE_PATH
kiwix-serve [OPTIONS] ZIM_FILE_PATH ...
Arguments
---------
.. _cli-arg-library-file-path:
``LIBRARY_FILE_PATH``: path of an XML library file listing ZIM files to serve.
To be used only with the :option:`--library` option. Multiple library files can
be provided as a semicolon (``;``) separated list.
``ZIM_FILE_PATH``: ZIM file path (multiple arguments are allowed).
``DIRECTORY_PATH``: Directory path containing ZIM files (multiple arguments are allowed).
Options
-------
.. option:: --library
By default, ``kiwix-serve`` expects a list of ZIM files as command line
arguments. Providing the :option:`--library` option tells ``kiwix-serve``
that the command line argument is rather a :ref:`library XML file
<cli-arg-library-file-path>`.
.. option:: --catalogOnly
In this mode ``kiwix-serve`` only serves the welcome (library) page and the
OPDS catalog. ZIM files referred by the :ref:`library XML file
<cli-arg-library-file-path>` need not be accessible.
This option may be combined with the :option:`--contentServerURL` option.
.. option:: --contentServerURL=URL
In :option:`--catalogOnly` mode book content is not served by this instance
of `kiwix-serve`. If a separate instance of `kiwix-serve` is running for the
same library without that option and thus serves book content, then the root
URL of that server can be passed to this instance so that books can still be
previewed.
This option must be combined with the :option:`--catalogOnly` option.
.. option:: -i ADDR, --address=ADDR
Listen only on this IP address. By default the server listens on all
available IP addresses. Alternatively, you can use special values to define which types of connections to accept:
- all : Listen for connections on all IP addresses (IPv4 and IPv6).
- ipv4 : Listen for connections on all IPv4 addresses.
- ipv6 : Listen for connections on all IPv6 addresses.
.. option:: -p PORT, --port=PORT
TCP port on which to listen for HTTP requests (default: 80).
.. option:: -r ROOT, --urlRootLocation=ROOT
URL prefix on which the content should be made available (default: empty).
.. option:: -d, --daemon
Detach the HTTP server daemon from the main process.
.. option:: -a PID, --attachToProcess=PID
Exit when the process with id PID stops running.
.. option:: -M, --monitorLibrary
Monitor the XML library file and reload it automatically when it changes.
Library reloading can be forced anytime by sending a SIGHUP signal to the
``kiwix-serve`` process (this works regardless of the presence of the
:option:`--monitorLibrary`/:option:`-M` option).
.. option:: -m, --nolibrarybutton
Disable the library home button in the ZIM viewer toolbar.
.. option:: -n, --nosearchbar
Disable the searchbox in the ZIM viewer toolbar.
.. option:: -b, --blockexternal
Prevent the users from directly navigating to external resources via such
links in ZIM content.
.. option:: -t N, --threads=N
Number of threads to run in parallel (default: 4).
.. option:: -s N, --searchLimit=N
Maximum number of ZIM files in a fulltext multizim search (default: No limit).
.. option:: -z, --nodatealiases
Create URL aliases for each content by removing the date embedded in the file
name. The expected format of the date in the filename is ``_YYYY-MM``. For
example, ZIM file ``wikipedia_en_all_2020-08.zim`` will be accessible both as
``wikipedia_en_all_2020-08`` and ``wikipedia_en_all``.
.. option:: -c PATH, --customIndex=PATH
Override the welcome page with a custom HTML file.
.. option:: -L N, --ipConnectionLimit=N
Max number of (concurrent) connections per IP (default: infinite,
recommended: >= 6).
.. option:: -v, --verbose
Print debug log to STDOUT.
.. option:: -V, --version
Print the software version.
.. option:: -h, --help
Print the help text.
HTTP API
========
``kiwix-serve`` serves content at/under ``http://ADDR:PORT/ROOT`` where
``ADDR``, ``PORT`` and ``ROOT`` are the values supplied to the
:option:`--address`/:option:`-i`, :option:`--port`/:option:`-p` and
:option:`--urlRootLocation`/:option:`-r` options, respectively.
HTTP API endpoints presented below are relative to that location, i.e.
``/foo/bar`` must be actually accessed as ``http://ADDR:PORT/ROOT/foo/bar``.
.. note::
The HTTP API is documented in its entirety in order to facilitate the work of
the Kiwix development team. Note, however, that only a subset of the HTTP API
constitutes ``kiwix-serves``'s public interface.
.. _public-api-endpoint:
**Public API endpoint**
A public HTTP API endpoint is intended to serve the outside world (in
addition to ``kiwix-serve``'s front-end and other Kiwix products). The
Kiwix development team will do its best to ensure gratifying experience for
clients of public API endpoints at all stages of the endpoint lifecycle.
.. _private-api-endpoint:
**Private API endpoint**
A private API endpoint is intended to be used only by ``kiwix-serve``'s
frontend or by other products maintained solely by the Kiwix team. Private
API comes without any guaranees. It may change as frequently and as
drasticaly as the Kiwix development team sees fit.
.. _deprecation:
**Deprecation**
Public API doesn't stay frozen once and forever. As the API evolves, Kiwix
team reserves the right to drop support for certain old functionality. In
such events, an advance notice will be issued and the users will be given
enough time to prepare for the change.
Currently, public endpoints are limited to the following list:
- :ref:`OPDS API <new-opds-api>`
- ``/raw``
- ``/search`` (with ``/search/searchdescription.xml``)
.. _welcome-page:
``/``
-----
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
Welcome page is served under ``/``. By default this is the library page, where
books are listed and can be looked up/filtered interactively. However, the
welcome page can be overriden through the :option:`--customIndex`/:option:`-c`
command line option of ``kiwix-serve``.
.. _new-opds-api:
``/catalog/v2`` (OPDS API)
------------------------------
===== ===========
Type: :ref:`public <public-api-endpoint>`
===== ===========
The new OPDS API of ``kiwix-serve`` is based on the `OPDS Catalog specification
v1.2 <https://specs.opds.io/opds-1.2>`_. All of its endpoints are grouped under
``/catalog/v2``.
:ref:`Legacy OPDS API <legacy-opds-api>` is preserved for backward
compatibility.
``/catalog/v2/root.xml``
^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
The OPDS Catalog Root links to the OPDS acquisition and navigation feeds
accessible through the other endpoints of the OPDS API.
``/catalog/v2/searchdescription.xml``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Describes the `/catalog/v2/entries`_ endpoint in `OpenSearch description format
<https://developer.mozilla.org/en-US/docs/Web/OpenSearch>`_.
``/catalog/v2/categories``
^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Returns the full list of ZIM file categories as an `OPDS Navigation Feed
<https://specs.opds.io/opds-1.2#22-navigation-feeds>`_.
``/catalog/v2/entries``
^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Returns a full or filtered list of ZIM files as a paginated `OPDS acquisition
feed <https://specs.opds.io/opds-1.2#23-acquisition-feeds>`_ with `complete
entries
<https://specs.opds.io/opds-1.2#512-partial-and-complete-catalog-entries>`_.
**Pagination:**
By default, no more than 10 first entries are returned from the library. To
obtain the remaining entries the URL query parameters ``start`` and/or
``count`` must be used. The output of ``/catalog/v2/entries?start=s&count=n``
will contain at most ``n`` (default value: 10) results starting from entry #
``s`` (default value: 0). ``count`` with a negative value (e.g. ``count=-1``)
removes the limit on the number of results in the output.
.. note::
Previously ``count=0`` also designated an unbounded query (i.e. worked
similarly to ``count=-1``). The response to a ``count=0`` query was changed
to consist of 0 results, as such a query/response combination is a good way
to find out the total number of results (when only that information is
needed) with minimal consumption of resources.
Examples:
.. code:: sh
# Returns the first 10 entries (internally numbered 0 through 9)
$ curl 'http://localhost:8080/catalog/v2/entries'
# Returns the next 10 entries (internally numbered 10 through 19)
$ curl 'http://localhost:8080/catalog/v2/entries?start=10'
# Returns the first 50 entries
$ curl 'http://localhost:8080/catalog/v2/entries?count=50'
# Returns 50 entries starting from entry # 100 (i.e. entries ## 100-149)
$ curl 'http://localhost:8080/catalog/v2/entries?start=100&count=50'
# Returns all entries
$ curl 'http://localhost:8080/catalog/v2/entries?count=-1'
# Returns all entries starting from entry # 100
$ curl 'http://localhost:8080/catalog/v2/entries?start=100&count=-1'
.. _library-filtering:
**Filtering:**
A filtered subset of the library can be requested by providing one or more
filtering criteria, whereupon only entries matching *all* of the criteria are
included in the response. Pagination is applied to the filtered list. The
filtering criteria must be specified via the following URL parameters:
* ``lang`` - filter by language (specified as a 3-letter language code).
* ``category`` - filter by categories associated with the library entries.
* ``tag`` - filter by tags associated with the library entries. Multiple tags
can be provided as a semicolon separated list (e.g
``tag=wikipedia;_videos:no``). The result will contain only those entries
that contain *all* of the requested tags.
* ``notag`` - filter out (exclude) entries with *any* of the specified tags
(example - ``notag=ted;youtube``).
* ``maxsize`` - include in the results only entries whose size (in bytes)
doesn't exceed the provided value.
* ``q`` - include in the results only entries that contain the specified text
in the title or description.
* ``name`` - include in the results only entries with a matching
:term:`book name <Book name>`.
Examples:
.. code:: sh
# List only books in Italian (lang=ita) but
# return only results ## 100-149 (start=100&count=50)
$ curl 'http://localhost:8080/catalog/v2/entries?lang=ita&start=100&count=50'
# List only books with category of 'wikipedia' AND containing the word
# 'science' in the title or description. Return only the first 10 results.
$ curl 'http://localhost:8080/catalog/v2/entries?q=science&category=wikipedia'
``/catalog/v2/entry/ZIMID``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Returns full info about the library entry with :term:`UUID <ZIM UUID>`
``ZIMID``.
``/catalog/v2/illustration/ZIMID``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
**Usage:**
``/catalog/v2/illustration/ZIMID?size=N``
Returns the illustration of size ``NxN`` pixels for the library entry with
:term:`UUID <ZIM UUID>` ``ZIMID``.
If no illustration of requested size is found a HTTP 404 error is returned.
``/catalog/v2/languages``
^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Returns the full list of ZIM file languages as an `OPDS Navigation Feed
<https://specs.opds.io/opds-1.2#22-navigation-feeds>`_.
``/catalog/v2/partial_entries``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <new-opds-api>`
===== ===========
Returns the full or filtered list of ZIM files as an `OPDS acquisition feed
<https://specs.opds.io/opds-1.2#23-acquisition-feeds>`_ with `partial entries
<https://specs.opds.io/opds-1.2#512-partial-and-complete-catalog-entries>`_.
Supported filters are the same as for the `/catalog/v2/entries`_ endpoint.
.. _legacy-opds-api:
``/catalog`` (Legacy OPDS API)
------------------------------
===== ===========
Type: :ref:`deprecated <deprecation>`
===== ===========
The legacy OPDS API is preserved for backward compatibility and is deprecated.
:ref:`New OPDS API <new-opds-api>` should be used instead.
``/catalog/root.xml``
^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`deprecated API <legacy-opds-api>`
===== ===========
Full library OPDS catalog (list of all ZIM files).
``/catalog/searchdescription.xml``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`deprecated API <legacy-opds-api>`
===== ===========
Describes the `/catalog/search`_ endpoint in `OpenSearch description format
<https://developer.mozilla.org/en-US/docs/Web/OpenSearch>`_.
``/catalog/search``
^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`deprecated API <legacy-opds-api>`
===== ===========
Returns the list of ZIM files (in OPDS catalog format) matching the
search/filtering criteria. Supported filters are the same as for the
`/catalog/v2/entries`_ endpoint.
``/catch/external``
-------------------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
**Usage:**
``/catch/external?source=URL``
Generates a HTML page with a link leading to (the decoded version of) ``URL``
and a warning that following that link will load an external (out of ZIM)
resource.
**Parameters:**
``source``: URL of the external resource (must be URL-encoded).
**Example:**
.. code:: sh
# Intercept an external link to https://example.com?query=abcd
$ curl 'http://localhost:8080/catch/external?source=https%3A%2F%2Fexample.com%3Fquery%3Dabcd'
``/content``
------------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
ZIM file content is served under the ``/content`` endpoint as described below.
``/content/ZIMNAME/PATH/IN/ZIMFILE``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
Returns the entry with path ``PATH/IN/ZIMFILE`` from ZIM file with :term:`name
<ZIM name>` ``ZIMNAME``.
``/content/ZIMNAME``
^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
``/content/ZIMNAME`` redirects to the main page of the ZIM file with :term:`name
<ZIM name>` ``ZIMNAME`` (unless that ZIM file contains an entry with an empty
path or path equal to ``/``, in which case that entry is returned).
``/random``
-----------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
**Usage:**
``/random?content=ZIMNAME``
Generates a HTTP redirect to a randomly selected article/page from the
specified ZIM file.
**Parameters:**
``content``: :term:`name of the ZIM file <ZIM name>`.
.. _raw:
``/raw``
--------
===== ===========
Type: :ref:`public <public-api-endpoint>`
===== ===========
The ``/raw`` API provides access to ZIM file data. It consists of two separate
endpoints for accessing data and metadata.
``/raw/ZIMNAME/content/PATH/IN/ZIMFILE``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <raw>`
===== ===========
Returns the entry with path ``PATH/IN/ZIMFILE`` from the ZIM file with
:term:`name <ZIM name>` ``ZIMNAME``. Currently, this endpoint almost duplicates
(with some subtle technical differences) the newer endpoint
`/content/ZIMNAME/PATH/IN/ZIMFILE`_. The important difference is that the
``/raw`` endpoint guarantees that no server-side processing will be applied to
the returned content, whereas content obtained via the ``/content`` endpoint
may in the future undergo some processing intended to improve the operation of
the viewer (e.g. compensating for certain bugs in ZIM creation). Also note that
``/raw`` is :ref:`public <public-api-endpoint>`, whereas ``/content`` is
:ref:`private <private-api-endpoint>`.
``/raw/ZIMNAME/meta/METADATAID``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
===== ===========
Type: member of a :ref:`public API <raw>`
===== ===========
Returns the metadata item ``METADATAID`` from the ZIM file with :term:`name
<ZIM name>` ``ZIMNAME``.
``/search``
-----------
===== ===========
Type: :ref:`public <public-api-endpoint>`
===== ===========
Performs a full text search on one or more ZIM files and returns an HTML page
with a list of links to matching pages along with snippets of the matching
portions of those pages.
.. _multi-zim-search-constraints:
A multi-ZIM search request must comply with the following constraints:
* the number of ZIM files participating in the search operation must not exceed
the limit imposed by the :option:`--searchLimit` option of ``kiwix-serve``.
* all of the ZIM files participating in the same search operation must be in
the same language.
**Parameters:**
ZIM file selection parameters:
At least one of the following parameters must be provided in order to
specify in which ZIM file(s) to search. Parameters appearing earlier in
below list take precedence over subsequent ones (the later ones, even if
present in the request, are simply ignored).
``content``: :term:`name of the ZIM file <ZIM name>` (for a single-ZIM
search). This is a :ref:`legacy parameter <deprecation>`. ``books.name``
should be used instead.
``books.id``: :term:`UUID <ZIM UUID>` of the ZIM file. Can be repeated for
a multi-ZIM search, however must respect the :ref:`multi-ZIM search
constraints <multi-zim-search-constraints>`.
.. note::
If any of the provided ``books.id`` values refers to a book missing
from the library then an error is returned instead of running the
search on the remaining (valid) entries.
``books.name``: :term:`name of the ZIM file <ZIM name>` (not to be confused
with ``books.filter.name`` which selects/filters based on the :term:`book
name <Book name>`). Can be repeated for a multi-ZIM search, however must
respect the :ref:`multi-ZIM search constraints
<multi-zim-search-constraints>`.
.. note::
If any of the provided ``books.name`` values refers to a book missing
from the library then an error is returned instead of running the
search on the remaining (valid) entries.
``books.filter.{criteria}``: allows to take full advantage of :ref:`library
filtering <library-filtering>` functionality of the `/catalog/v2/entries`_
endpoint (``{criteria}`` must be replaced with an attribute/filtering
criteria name supported by :ref:`library filtering <library-filtering>`).
Query parameters:
``pattern`` (optional; defaults to an empty string): text to search for.
``latitude``, ``longitude`` & ``distance`` (optional): geospatial query
parameters. If all of these are provided, then the results will be
restricted to geotagged pages that are within ``distance`` metres from the
location on Earth with coordinates ``latitude`` and ``longitude``.
Pagination parameters:
``pageLength`` (optional, default: 25): maximum number of search results in
the response. Capped at 140.
``start`` (optional, default: 0): this parameter enables pagination of
results. The response will include up to ``pageLength`` results starting
with entry # ``start`` from the full list of search results (the first
result is assumed to have index 0).
Other parameters:
``format`` (optional, default: html): format of the search results. Allowed
values are: html, xml.
Examples:
.. code:: sh
# Search for 'android' in the book with name 'scifi-library'
# Return results ## 51-60.
$ curl 'http://localhost:8080/search?pattern=android&books.name=scifi-library&start=51&pageLength=10'
# Search for 'napoli' in books in Italian
$ curl 'http://localhost:8080/search?books.filter.lang=ita&pattern=napoli'
# Search for 'chateau' in books in French that have a category of 'wikipedia'.
# Return the results as XML.
$ curl 'http://localhost:8080/search?pattern=chateau&books.filter.lang=fra&books.filter.category=wikipedia&format=xml'
``/search/searchdescription.xml``
---------------------------------
===== ===========
Type: :ref:`public <public-api-endpoint>`
===== ===========
Describes the `/search`_ endpoint in `OpenSearch description format
<https://developer.mozilla.org/en-US/docs/Web/OpenSearch>`_.
``/skin``
-----------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
Static front-end resources (such as CSS, javascript and images) are all grouped
under ``/skin``.
**Usage:**
``/skin/PATH/TO/RESOURCE[?cacheid=CACHEID]``
`Cache busting
<https://javascript.plainenglish.io/what-is-cache-busting-55366b3ac022>`_ of
static resources is supported via the optional param ``cacheid``. By default,
i.e. when the ``cacheid`` parameter is not specified while accessing the
``/skin`` endpoint, static resources are served as if they were dynamic (i.e.
could be different for an immediately repeated request). Specifying the
``cacheid`` parameter with a correct value (matching the value embedded in the
``kiwix-serve`` instance), makes the returned resource to be presented as
immutable. However, if the value of the ``cacheid`` parameter mismatches then
``kiwix-serve`` responds with a 404 HTTP error.
``kiwix-serve``'s default front-end (the :ref:`welcome page <welcome-page>` and
the :ref:`ZIM file viewer <zim-file-viewer>`) access all underlying static
resources by using explicit ``cacheid`` s.
``/suggest``
------------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
**Usage:**
``/suggest?content=ZIMNAME[&term=QUERY][&count=N][&start=S]``
Returns suggestions (in JSON format) for a text string that is assumed to be a
partially typed search for a page inside a particular ZIM file.
Suggestions are obtained as matches of the query text against the page titles
in the ZIM file using the title index database generated during the creation of
the ZIM file.
In case of a multi-word query the order of the words matters in two ways:
1. the last word is considered as partially typed, unless followed by a space;
2. ranking of the matches.
If the ZIM file doesn't contain a title index then suggestions are generated by
listing page titles starting *exactly* (in a case sensitive manner) with the
query text. Otherwise, suggestions are case-insensitive.
If the ZIM file contains a full text search index, then an extra suggestion is
added as an option to perform a full text search in the said ZIM file.
**Parameters:**
``content`` (mandatory): :term:`name of the ZIM file <ZIM name>`.
``term`` (optional; defaults to an empty string): query text.
``count`` (optional, default: 10): maximum number of page suggestions in the
response (i.e. the extra option to perform a full text search is not included
in this count).
``start`` (optional, default: 0): this parameter enables pagination of
results. The response will include up to ``count`` entries starting with
entry # ``start`` from the full list of page suggestions (the first result is
assumed to have index 0).
**Example:**
.. code:: sh
$ curl 'http://localhost/suggest?content=stackoverflow_en&term=pyth&count=50'
.. _zim-file-viewer:
``/viewer``
-----------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
ZIM file viewer. The ZIM file and entry therein must be specified via the hash
component of the URL as ``/viewer#ZIMNAME/PATH/IN/ZIMFILE``.
``/viewer_settings.js``
-----------------------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
Settings of the ZIM file viewer that are configurable via certain command line
options of ``kiwix-serve`` (e.g. ``--nolibrarybutton``).
/ANYTHING/ELSE
--------------
===== ===========
Type: :ref:`private <private-api-endpoint>`
===== ===========
Any other URL is considered as an attempt to access ZIM file content using the
legacy URL scheme and is redirected to ``/content/ANYTHING/ELSE``.
Glossary
========
.. glossary::
Book name
Name of the book as specified in the ZIM file metadata (for a
``kiwix-serve`` started *WITHOUT* the :option:`--library` option) or the
library XML file (for a ``kiwix-serve`` started with the
:option:`--library` option).
.. note::
Two or more books may have the same name in the library. That's not
considered a conflict, because there may be multiple versions of the
"same" book (differing by the settings of the scraper, date, etc).
:ref:`Library filtering <library-filtering>` by name will return all
matching books.
ZIM filename
Name of a ZIM file on the server filesystem.
ZIM name
Identifier of a ZIM file in the server's library (used for referring to a
particular ZIM file in requests).
ZIM names are derived from the filenames as follows:
- file extension is removed,
- all characters are converted to lowercase,
- diacritics are removed,
- spaces are replaced with underscores,
- ``+`` symbols are replaced with the text ``plus``.
Presence of the :option:`-z`/:option:`--nodatealiases` option will create
additional names (aliases) for filenames with dates.
ZIM names are expected to be unique across the library. Any name conflicts
(including those caused by the usage of the
:option:`-z`/:option:`--nodatealiases` option) are reported on STDERR but,
otherwise, are ignored (i.e. only one of the entries can be accessed via
the conflicting name).
ZIM title
Title of a ZIM file. This can be any text (with whitespace). It is never
used as a way of referring to a ZIM file.
ZIM UUID
This is a unique identifier of a ZIM file designated at its creation time
and embedded in the ZIM file. Certain ``kiwix-serve`` operations may
require that a ZIM file be referenced through its UUID rather than name.

7
docs/meson.build Normal file
View File

@@ -0,0 +1,7 @@
sphinx = find_program('sphinx-build', native:true)
sphinx_target = run_target('doc',
command: [sphinx, '-bhtml',
meson.current_source_dir(),
meson.current_build_dir()])

2
docs/requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
Sphinx==5.3.0
sphinx-rtd-theme==1.1.1

14
format_code.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/bash
files=(
"src/installer/kiwix-install.cpp"
"src/searcher/kiwix-search.cpp"
"src/manager/kiwix-manage.cpp"
"src/server/kiwix-serve.cpp"
)
for i in "${files[@]}"
do
echo $i
clang-format -i -style=file $i
done

39
meson.build Normal file
View File

@@ -0,0 +1,39 @@
project('kiwix-tools', 'cpp',
version : '3.8.1',
license : 'GPL',
default_options: ['c_std=c11', 'cpp_std=c++17', 'werror=true'])
compiler = meson.get_compiler('cpp')
add_global_arguments('-DKIWIX_TOOLS_VERSION="@0@"'.format(meson.project_version()), language : 'cpp')
if host_machine.system() == 'windows'
add_project_arguments('-DNOMINMAX', language: 'cpp')
endif
static_linkage = get_option('static-linkage')
if static_linkage
# Static build is not supported on MacOS
if host_machine.system() != 'darwin'
add_global_link_arguments('-static-libstdc++', '--static', language:'cpp')
endif
endif
thread_dep = dependency('threads')
libzim_dep = dependency('libzim', version:['>=9.0.0', '<10.0.0'], static:static_linkage)
libkiwix_dep = dependency('libkiwix', version:['>=14.1.0', '<15.0.0'], static:static_linkage)
libdocopt_dep = dependency('docopt', static:static_linkage)
all_deps = [thread_dep, libkiwix_dep, libzim_dep, libdocopt_dep]
if static_linkage
librt = compiler.find_library('rt', required:false)
if librt.found()
all_deps += librt
endif
endif
subdir('src')
if get_option('doc')
subdir('docs')
endif

4
meson_options.txt Normal file
View File

@@ -0,0 +1,4 @@
option('static-linkage', type : 'boolean', value : false,
description : 'Create statically linked binaries.')
option('doc', type : 'boolean', value : false,
description : 'Build the documentations.')

View File

@@ -1,294 +0,0 @@
/*
* Copyright 2011 Emmanuel Engelhart <kelson@kiwix.org>
* Copyright 2011 Renaud Gaudin <reg@kiwix.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <kiwix/manager.h>
#include <pathTools.h>
#include <regexTools.h>
#include "contentManager.h"
ContentManager::ContentManager(int x) : manager() {}
bool ContentManager::OpenLibraryFromFile(string path, bool readOnly) {
try {
return this->manager.readFile(path, readOnly);
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return true;
}
bool ContentManager::OpenLibraryFromText(string &xml, bool readOnly) {
bool returnValue = true;
const char *cXml;
cXml = xml.c_str();
try {
return this->manager.readXml(cXml, readOnly);
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::WriteLibrary() {
try {
return this->manager.writeFile(this->manager.writableLibraryPath);
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::WriteLibraryToFile(string &path) {
try {
return this->manager.writeFile(path.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::AddBookFromPath(string &path) {
try {
return this->manager.addBookFromPath(path.c_str(), path);
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::RemoveBookById(string &id) {
try {
return this->manager.removeBookById(id.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::SetCurrentBookId(string &id) {
try {
return this->manager.setCurrentBookId(id.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
string ContentManager::GetCurrentBookId() {
string none = "";
try {
return this->manager.getCurrentBookId();
} catch (exception &e) {
cerr << e.what() << endl;
return none;
}
return none;
}
bool ContentManager::GetBookById(string &id,
string &path,
string &title,
string &indexPath,
string &indexType,
string &description,
string &articleCount,
string &mediaCount,
string &size,
string &creator,
string &date,
string &language,
string &favicon,
string &url) {
try {
kiwix::Book book;
if (this->manager.getBookById(id.c_str(), book)) {
path = book.pathAbsolute.data();
title = book.title.data();
indexPath = book.indexPathAbsolute.data();
articleCount = book.articleCount.data();
mediaCount = book.mediaCount.data();
size = book.size.data();
creator = book.creator.data();
date = book.date.data();
language = book.language.data();
url = book.url.data();
string faviconUrl = "";
if (!book.faviconMimeType.empty()) {
faviconUrl = "url(data:" + book.faviconMimeType + ";base64," + book.favicon + ")";
}
favicon = faviconUrl.data();
string indexTypeString = "";
if (book.indexType == kiwix::XAPIAN) {
indexTypeString = "xapian";
}
indexType = indexTypeString.data();
description = book.description.data();
return true;
}
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
bool ContentManager::UpdateBookLastOpenDateById(string &id) {
try {
return this->manager.updateBookLastOpenDateById(id.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
return false;
}
return false;
}
unsigned int ContentManager::GetBookCount(const bool localBooks, const bool remoteBooks) {
int count = 0;
try {
return this->manager.getBookCount(localBooks, remoteBooks);
} catch (exception &e) {
cerr << e.what() << endl;
return count;
}
return count;
}
bool ContentManager::ListBooks(string &mode, string &sortBy, unsigned int maxSize,
string &language, string &publisher, string &search) {
try {
// Set the mode enum
kiwix::supportedListMode listMode;
if (mode == "lastOpen") {
listMode = kiwix::LASTOPEN;
} else if ( mode == "remote") {
listMode = kiwix::REMOTE;
} else {
listMode = kiwix::LOCAL;
}
// Set the sortBy enum
kiwix::supportedListSortBy listSortBy;
if (sortBy == "publisher") {
listSortBy = kiwix::PUBLISHER;
} else if ( sortBy == "date") {
listSortBy = kiwix::DATE;
} else if ( sortBy == "size") {
listSortBy = kiwix::SIZE;
} else {
listSortBy = kiwix::TITLE;
}
return this->manager.listBooks(listMode, listSortBy, maxSize, language.c_str(), publisher.c_str(), search.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
}
return false;
}
const char* ContentManager::GetListNextBookId() {
string id;
try {
if (!this->manager.bookIdList.empty()) {
id = *(this->manager.bookIdList.begin());
this->manager.bookIdList.erase(this->manager.bookIdList.begin());
}
} catch (exception &e) {
cerr << e.what() << endl;
}
return id.c_str();
}
bool ContentManager::SetBookIndex(string &id, string &path, string &indexType) {
try {
kiwix::supportedIndexType iType;
iType = kiwix::XAPIAN;
return this->manager.setBookIndex(id.c_str(), path.c_str(), iType);
} catch (exception &e) {
cerr << e.what() << endl;
}
return false;
}
bool ContentManager::SetBookPath(string &id, string &path) {
try {
return this->manager.setBookPath(id.c_str(), path.c_str());
} catch (exception &e) {
cerr << e.what() << endl;
}
return false;
}
string ContentManager::GetBooksLanguages() {
string languagesStr = "";
vector<string> booksLanguages = this->manager.getBooksLanguages();
vector<string>::iterator itr;
for ( itr = booksLanguages.begin(); itr != booksLanguages.end(); ++itr ) {
languagesStr += *itr + ";";
}
return languagesStr;
}
string ContentManager::GetBooksPublishers() {
string publishersStr = "";
vector<string> booksPublishers = this->manager.getBooksPublishers();
vector<string>::iterator itr;
for ( itr = booksPublishers.begin(); itr != booksPublishers.end(); ++itr ) {
publishersStr += *itr + ";";
}
return publishersStr;
}

View File

@@ -1,107 +0,0 @@
/*
* Copyright 2009-2013 Emmanuel Engelhart <kelson@kiwix.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include <kiwix/xapianIndexer.h>
#include <getopt.h>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
void usage() {
cout << "Usage: kiwix-index [--verbose] ZIM_PATH INDEX_PATH" << endl;
exit(1);
}
int main(int argc, char **argv) {
/* Init the variables */
char *zimFilePath = NULL;
char *indexPath = NULL;
bool verboseFlag = false;
int option_index = 0;
int c = 0;
kiwix::XapianIndexer *indexer = NULL;
/* Argument parsing */
while (42) {
static struct option long_options[] = {
{"verbose", no_argument, 0, 'v'},
{0, 0, 0, 0}
};
if (c != -1) {
c = getopt_long(argc, argv, "v", long_options, &option_index);
switch (c) {
case 'v':
verboseFlag = true;
break;
}
} else {
if (optind < argc) {
if (zimFilePath == NULL) {
zimFilePath = argv[optind++];
} else if (indexPath == NULL) {
indexPath = argv[optind++];
} else {
usage();
}
} else {
break;
}
}
}
/* Check if we have enough arguments */
if (zimFilePath == NULL || indexPath == NULL) {
usage();
}
/* Try to prepare the indexing */
try {
indexer = new kiwix::XapianIndexer();
} catch (...) {
cerr << "Unable to index '" << zimFilePath << "'." << endl;
exit(1);
}
/* Start the indexing */
if (indexer != NULL) {
indexer->setVerboseFlag(verboseFlag);
indexer->start(zimFilePath, indexPath);
while (indexer->isRunning()) {
if (verboseFlag)
cout << indexer->getProgression() << "% of all the articles indexed..." << endl;
kiwix::sleep(1000);
}
if (verboseFlag)
cout << "100% of the articles were successfuly indexed..." << endl;
delete indexer;
} else {
cerr << "Unable instanciate the Kiwix indexer." << endl;
exit(1);
}
exit(0);
}

View File

@@ -1,197 +0,0 @@
/*
* Copyright 2011-2014 Emmanuel Engelhart <kelson@kiwix.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include <getopt.h>
#include <pathTools.h>
#include <kiwix/xapianIndexer.h>
#include <kiwix/reader.h>
#include <kiwix/manager.h>
enum supportedAction { NONE, ADDCONTENT };
void usage() {
cout << "Usage: kiwix-install [--verbose] [--buildIndex] addcontent ZIM_PATH KIWIX_PATH" << endl;
exit(1);
}
int main(int argc, char **argv) {
/* Init the variables */
const char *contentPath = NULL;
const char *kiwixPath = NULL;
supportedAction action = NONE;
bool verboseFlag = false;
bool buildIndexFlag = false;
int option_index = 0;
int c = 0;
/* Argument parsing */
while (42) {
static struct option long_options[] = {
{"verbose", no_argument, 0, 'v'},
{"buildIndex", no_argument, 0, 'i'},
{0, 0, 0, 0}
};
if (c != -1) {
c = getopt_long(argc, argv, "vi", long_options, &option_index);
switch (c) {
case 'v':
verboseFlag = true;
break;
case 'i':
buildIndexFlag = true;
break;
}
} else {
if (optind < argc) {
if (action == NONE) {
string actionString = argv[optind++];
if (actionString == "addcontent" || actionString == "ADDCONTENT") {
action = ADDCONTENT;
}
} else if (contentPath == NULL) {
contentPath = argv[optind++];
} else if (kiwixPath == NULL) {
kiwixPath = argv[optind++];
} else {
usage();
}
} else {
break;
}
}
}
/* Check if we have enough arguments */
if (contentPath == NULL || kiwixPath == NULL) {
usage();
}
/* Make the action */
if (action == ADDCONTENT) {
/* Check if the content path exists and is readable */
if (verboseFlag) { std::cout << "Check if the ZIM file exists..." << std::endl; }
if (!fileExists(contentPath)) {
cerr << "The content path '" << contentPath << "' does not exist or is not readable." << endl;
exit(1);
}
/* Check if this is a ZIM file */
try {
if (verboseFlag) { std::cout << "Check if the ZIM file is valid..." << std::endl; }
kiwix::Reader *reader = new kiwix::Reader(contentPath);
delete reader;
} catch (exception &e) {
cerr << "The content available at '" << contentPath << "' is not a ZIM file." << endl;
exit(1);
}
string contentFilename = getLastPathElement(contentPath);
/* Check if kiwixPath/kiwix/kiwix.exe exists */
if (verboseFlag) { std::cout << "Check if the Kiwix path is valid..." << std::endl; }
string kiwixBinaryPath = computeAbsolutePath(kiwixPath, "kiwix/kiwix.exe");
if (!fileExists(kiwixBinaryPath)) {
kiwixBinaryPath = computeAbsolutePath(kiwixPath, "kiwix/kiwix");
if (!fileExists(kiwixBinaryPath)) {
cerr << "Unable to find the Kiwix binary at '" << kiwixBinaryPath << "[.exe]'." << endl;
exit(1);
}
}
/* Check if the directory "data" structure exists */
if (verboseFlag) { std::cout << "Check the target data directory structure..." << std::endl; }
string dataPath = computeAbsolutePath(kiwixPath, "data/");
if (!fileExists(dataPath)) {
makeDirectory(dataPath);
}
/* Check if the directory "data/content" structure exists */
string dataContentPath = computeAbsolutePath(kiwixPath, "data/content/");
if (!fileExists(dataContentPath)) {
makeDirectory(dataContentPath);
}
/* Check if the directory "data/library" structure exists */
string dataLibraryPath = computeAbsolutePath(kiwixPath, "data/library/");
if (!fileExists(dataLibraryPath)) {
makeDirectory(dataLibraryPath);
}
/* Check if the directory "data/index" structure exists */
string dataIndexPath = computeAbsolutePath(kiwixPath, "data/index/");
if (!fileExists(dataIndexPath)) {
makeDirectory(dataIndexPath);
}
/* Copy the file to the data/content directory */
if (verboseFlag) { std::cout << "Copy ZIM file to the target directory..." << std::endl; }
string newContentPath = computeAbsolutePath(dataContentPath, contentFilename);
if (!fileExists(newContentPath) || getFileSize(contentPath) != getFileSize(newContentPath)) {
copyFile(contentPath, newContentPath);
}
/* Index the file if necessary */
if (verboseFlag) { std::cout << "Check if the index directory exists..." << std::endl; }
string indexFilename = contentFilename + ".idx";
string indexPath = computeAbsolutePath(dataIndexPath, indexFilename);
if (buildIndexFlag && !fileExists(indexPath)) {
if (verboseFlag) { std::cout << "Start indexing the ZIM file..." << std::endl; }
kiwix::XapianIndexer *indexer = NULL;
try {
indexer = new kiwix::XapianIndexer();
} catch (...) {
cerr << "Unable to index '" << contentPath << "'." << endl;
exit(1);
}
if (indexer != NULL) {
indexer->setVerboseFlag(verboseFlag);
indexer->start(contentPath, indexPath);
while (indexer->isRunning()) {
kiwix::sleep(1000);
}
delete indexer;
} else {
cerr << "Unable instanciate the Kiwix indexer." << endl;
exit(1);
}
}
/* Add the file to the library.xml */
if (verboseFlag) { std::cout << "Create the library XML file..." << std::endl; }
kiwix::Manager libraryManager;
string libraryPath = computeAbsolutePath(dataLibraryPath, contentFilename + ".xml");
string bookId = libraryManager.addBookFromPathAndGetId(newContentPath, "../content/" + contentFilename, "", false);
if (!bookId.empty()) {
libraryManager.setCurrentBookId(bookId);
if (buildIndexFlag) {
libraryManager.setBookIndex(bookId, "../index/" + indexFilename, kiwix::XAPIAN);
}
libraryManager.writeFile(libraryPath);
} else {
cerr << "Unable to build or save library file '" << libraryPath << "'" << endl;
}
}
exit(0);
}

View File

@@ -1,285 +0,0 @@
/*
* Copyright 2012-2014
* Renaud Gaudin <reg@kiwix.org>
* Emmanuel Engelhart <kelson@kiwix.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifdef _WIN32
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
#include <Windows.h>
#include <process.h>
#define EXEXT ".exe"
#define EXECL _execl
#define PUTENV _putenv
#else
#define EXEXT ""
#include <stdlib.h>
#include <unistd.h>
#define EXECL execl
#define PUTENV putenv
#endif
#include <vector>
#include "pathTools.h"
using namespace std;
/* Split string in a token array */
std::vector<std::string> split(const std::string & str,
const std::string & delims=" *-")
{
std::string::size_type lastPos = str.find_first_not_of(delims, 0);
std::string::size_type pos = str.find_first_of(delims, lastPos);
std::vector<std::string> tokens;
while (std::string::npos != pos || std::string::npos != lastPos)
{
tokens.push_back(str.substr(lastPos, pos - lastPos));
lastPos = str.find_first_not_of(delims, pos);
pos = str.find_first_of(delims, lastPos);
}
return tokens;
}
/* Quote string on Windows */
char *prepareArgument(const char *argument) {
if (argument != NULL) {
#ifdef _WIN32
string quotedArgument = "\"" + string(argument) + "\"";
return strdup(quotedArgument.c_str());
#else
return strdup(argument);
#endif
} else {
return NULL;
}
}
int main(int argc, char *argv[]) {
/* Initialisation of a few paths */
string executablePath = getExecutablePath();
string executableDirectory = removeLastPathElement(executablePath);
/* Possible xulrunner paths */
std::vector<std::string> xulrunnerPossibleDirectories;
std::vector<std::string>::iterator directoriesIt;
/* Possible xulrunner paths: local directories */
xulrunnerPossibleDirectories.push_back(computeAbsolutePath(executableDirectory, "xulrunner"));
xulrunnerPossibleDirectories.push_back(computeAbsolutePath(executableDirectory, "kiwix/xulrunner"));
xulrunnerPossibleDirectories.push_back(computeAbsolutePath(executableDirectory, "kiwix-linux/xulrunner"));
xulrunnerPossibleDirectories.push_back(computeAbsolutePath(executableDirectory, "kiwix-win/xulrunner"));
xulrunnerPossibleDirectories.push_back(computeAbsolutePath(executableDirectory, "kiwix-windows/xulrunner"));
/* Possible xulrunner paths: system directories */
string binaryPath = getenv("PATH") == NULL ? "" : string(getenv("PATH"));
std::vector<std::string> xulrunnerPossibleSystemDirectories = ::split(binaryPath, ":");
for (directoriesIt = xulrunnerPossibleSystemDirectories.begin() ;
directoriesIt != xulrunnerPossibleSystemDirectories.end() ;
directoriesIt++) {
xulrunnerPossibleDirectories.push_back(*directoriesIt);
}
/* Possible xulrunner binary names */
std::vector<std::string> xulrunnerPossibleNames;
xulrunnerPossibleNames.push_back(std::string("xulrunner") + std::string(EXEXT));
xulrunnerPossibleNames.push_back(std::string("xulrunner-bin") + std::string(EXEXT));
xulrunnerPossibleNames.push_back(std::string("xulrunner-") + std::string(GECKO_VERSION));
xulrunnerPossibleNames.push_back(std::string("xulrunner-") + std::string(GECKO_VERSION) +
std::string(".0"));
xulrunnerPossibleNames.push_back(std::string("xulrunner-") + std::string(MAJOR_GECKO_VERSION));
xulrunnerPossibleNames.push_back(std::string("xulrunner-") + std::string(MINOR_GECKO_VERSION));
/* Find xulrunner (binary) path */
string xulrunnerPath;
std::vector<std::string>::iterator filesIt;
directoriesIt = xulrunnerPossibleDirectories.begin();
while (xulrunnerPath.empty() && directoriesIt != xulrunnerPossibleDirectories.end()) {
if (fileExists(*directoriesIt)) {
filesIt = xulrunnerPossibleNames.begin();
while (xulrunnerPath.empty() &&
filesIt != xulrunnerPossibleNames.end()) {
xulrunnerPath = computeAbsolutePath(*directoriesIt, *filesIt);
if (!fileExists(xulrunnerPath)) {
xulrunnerPath.clear();
}
filesIt++;
};
}
directoriesIt++;
}
if (!fileExists(xulrunnerPath)) {
perror("Error: unable to find the xulrunner binary.");
return EXIT_FAILURE;
}
/* Compute xulrunner directory */
string xulrunnerDirectory = removeLastPathElement(xulrunnerPath);
/* Compute application.ini path */
std::vector<std::string> applicationIniPossiblePaths;
applicationIniPossiblePaths.push_back(computeAbsolutePath(executableDirectory,
"application.ini"));
applicationIniPossiblePaths.push_back(computeAbsolutePath(executableDirectory,
"kiwix/application.ini"));
applicationIniPossiblePaths.push_back(computeAbsolutePath(executableDirectory,
"kiwix-linux/application.ini"));
applicationIniPossiblePaths.push_back(computeAbsolutePath(executableDirectory,
"kiwix-win/application.ini"));
applicationIniPossiblePaths.push_back(computeAbsolutePath(executableDirectory,
"kiwix-windows/application.ini"));
string applicationIniPath;
filesIt = applicationIniPossiblePaths.begin();
while (applicationIniPath.empty() &&
filesIt != applicationIniPossiblePaths.end()) {
if (fileExists(*filesIt)) {
applicationIniPath = *filesIt;
}
filesIt++;
};
if (!fileExists(xulrunnerPath)) {
perror("Error: unable to find the application.ini file.");
return EXIT_FAILURE;
}
/* Debug prints */
/*
cout << "Executable directory (executableDirectory): " << executableDirectory << endl;
cout << "Executable path (executablePath): " << executablePath << endl;
cout << "Xulrunner directory (xulrunnerDirectory): " << xulrunnerDirectory << endl;
cout << "Xulrunner path (xulrunnerPath): " << xulrunnerPath << endl;
cout << "Application.ini path (applicationIniPath): " << applicationIniPath << endl;
*/
/* Modify environnement variables */
#ifdef _WIN32
string sep = ";";
string execlArg0 = "kiwix-launcher.exe";
#else
string sep = ":";
string execlArg0 = xulrunnerPath.c_str();
#endif
string ldLibraryPath = getenv("LD_LIBRARY_PATH") == NULL ? "" : string(getenv("LD_LIBRARY_PATH"));
string putenvStr = "LD_LIBRARY_PATH=" + xulrunnerDirectory + sep + ldLibraryPath;
PUTENV((char *)putenvStr.c_str());
/* Launch xulrunner */
if (argc == 0) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
NULL);
} else if (argc == 1) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
NULL);
} else if (argc == 2) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
NULL);
} else if (argc == 3) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
NULL);
} else if (argc == 4) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
NULL);
} else if (argc == 5) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
prepareArgument(argv[5]),
NULL);
} else if (argc == 6) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
prepareArgument(argv[5]),
prepareArgument(argv[6]),
NULL);
} else if (argc == 7) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
prepareArgument(argv[5]),
prepareArgument(argv[6]),
prepareArgument(argv[7]),
NULL);
} else if (argc == 8) {
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
prepareArgument(argv[5]),
prepareArgument(argv[6]),
prepareArgument(argv[7]),
prepareArgument(argv[8]),
NULL);
} else if (argc >= 9) {
if (argc > 9) {
cerr << "Kiwix was not able to forward all your arguments to the xulrunner binary." << endl;
}
return EXECL(xulrunnerPath.c_str(),
execlArg0.c_str(),
prepareArgument(applicationIniPath.c_str()),
prepareArgument(argv[1]),
prepareArgument(argv[2]),
prepareArgument(argv[3]),
prepareArgument(argv[4]),
prepareArgument(argv[5]),
prepareArgument(argv[6]),
prepareArgument(argv[7]),
prepareArgument(argv[8]),
prepareArgument(argv[9]),
NULL);
}
}

View File

@@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>kiwix</string>
<key>CFBundleDisplayName</key>
<string>Kiwix</string>
<key>CFBundleGetInfoString</key>
<string>0.9</string>
<key>CFBundleIconFile</key>
<string>kiwix.icns</string>
<key>CFBundleIdentifier</key>
<string>org.kiwix.kiwix</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Kiwix</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleSignature</key>
<string>KIWI</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLIconFile</key>
<string>kiwix.icns</string>
<key>CFBundleURLName</key>
<string>Kiwix URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>zim</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>kiwix-ZIM.icns</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeName</key>
<string>OpenZIM Content File</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>zim</string>
<string>zimaa</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>i386</key>
<string>10.6.0</string>
<key>x86_64</key>
<string>10.6.0</string>
</dict>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>NSPrincipalClass</key>
<string>GeckoNSApplication</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>org.kiwix.kiwix.zim</string>
<key>UTTypeReferenceURL</key>
<string>http://www.kiwix.org</string>
<key>UTTypeDescription</key>
<string>Kiwix ZIM File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>TBMZ</string>
<key>public.filename-extension</key>
<array>
<string>zim</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>

View File

@@ -1,3 +0,0 @@
CFBundleName = "Kiwix";
NSHumanReadableCopyright = "Copyright © 2006-2014 Contributors.";

View File

@@ -1 +0,0 @@
APPLMOZM

View File

@@ -1,109 +0,0 @@
#!/usr/bin/env python
import sys
import os
import subprocess
import re
MODE_COMPONENT = 1
MODE_BINARY = 2
MODE_LIBRARY = 3
MODES = {'c': MODE_COMPONENT,
'b': MODE_BINARY,
'l': MODE_LIBRARY}
is_library = False
is_component = False
is_binary = False
def usage():
print(u"Usage: %s MODE component/path.dylib" % sys.argv[0])
print(u" MODE is c: component or b: binary or l: library")
if len(sys.argv) < 3:
usage()
exit(0)
component = sys.argv[-1]
mode = MODES.get(sys.argv[-2].lower())
if not mode:
usage()
exit(1)
# mode switchers
if mode == MODE_COMPONENT:
is_component = True
elif mode == MODE_LIBRARY:
is_library = True
else:
is_binary = True
if not os.path.exists(component):
print(u"Unable to access component at: %s" % component)
exit(1)
# we'll also allow binaries to be fixed.
#
if (is_library or is_component) and not component.endswith('.dylib'):
print(u"%s is not a dylib component" % component)
exit(1)
print("Fixing %s..." % component)
basename = os.path.basename(component)
try:
name, ext = basename.rsplit('.', 1)
except ValueError:
name = basename
ext = ''
libname = u'lib%s%s.0.dylib' % (name[0].upper(), name[1:])
# change ID if component to match new name/path
if is_component:
os.system('install_name_tool -id %s %s' % (basename, component))
# run otool to get a list of deps.
otool = subprocess.Popen(['otool', '-L', component], stdout=subprocess.PIPE)
otool_out, otool_err = otool.communicate()
for line in otool_out.split('\n'):
if ('executable_path' in line
or 'libSystem' in line
or ':' in line
or not len(line)
or 'aria2c' in basename):
continue
path, junk = line.strip().split(' (', 1)
# erroneous_links.append(path)
_basename = os.path.basename(path).strip()
if _basename == basename:
continue
# is it a library link?
match = re.match(r'lib([a-z\_\-\d\+]+)([\.?\d]*)\.dylib', _basename)
if match:
print("match: %s" % match.groups()[0])
if 'libstdc++' in line or 'libgcc' in line:
# newpath = u'/usr/lib/lib%s%s.dylib' % (match.groups()[0], match.groups()[1])
# newpath = u'lib%s%s.dylib' % (match.groups()[0], match.groups()[1])
# newpath = u'@executable_path/lib%s%s.dylib' % (match.groups()[0], match.groups()[1])
continue
elif is_component:
# newpath = u'@executable_path/../Frameworks/lib%s.dylib' % match.groups()[0]
newpath = u'@executable_path/lib%s.dylib' % match.groups()[0]
elif is_binary:
# newpath = u'@executable_path/../../Frameworks/lib%s.dylib' % match.groups()[0]
newpath = u'@executable_path/../lib%s.dylib' % match.groups()[0]
else:
newpath = u'@loader_path/lib%s.dylib' % match.groups()[0]
print('install_name_tool -change %s %s %s' % (path, newpath, component))
os.system('install_name_tool -change %s %s %s' % (path, newpath, component))
continue
print('\tUnmatched: %s' % path)

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

View File

Binary file not shown.

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

View File

Binary file not shown.

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

View File

Binary file not shown.

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>

View File

Binary file not shown.

View File

@@ -1,23 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix-compact \- Compacteur d'index pour fichier ZIM
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix-compact INDEX_PATH
.SH DESCRIPTION
.PP
Compacte les fichiers d'index des ZIM à l'aide de xapian-compact.
.TP
\fBINDEX_PATH\fR
Chemin de l'index plein texte à compacter.
.SH SEE ALSO
kiwix(1) kiwix-index(1) kiwix-manage(1) xapian-compact(1)
.br
kiwix-install(1) kiwix-serve(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,31 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix\-index \- Indexeur de fichiers ZIM
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix\-index [\-\-backend|\-b=xapian|clucene] ZIM_PATH INDEX_PATH
.SH DESCRIPTION
.PP
Génère un index plein texte xapian ou cLucene pour un fichier ZIM.
.TP
\fB\-\-backend=xapian|clucene\fR
Séléctionne un moteur d'indexation.
.TP
\fBZIM_PATH\fR
Chemin du fichier ZIM à indexer.
.TP
\fBINDEX_PATH\fR
Chemin où enregistrer l'index plein texte.
.SH SEE ALSO
kiwix\-compact(1) kiwix\-manage(1) kiwix\-serve(1)
.br
kiwix(1) kiwix\-install(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,40 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix\-install \- Installeur de fichiers ZIM
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix\-install [\-\-verbose|-v] [\-\-backend|\-b=xapian|clucene] [\-\-buildIndex|\-i] addcontent ZIM_PATH KIWIX_PATH
.SH DESCRIPTION
.PP
Créé une arborescence contenant Kiwix et des données pour redistribution.
.br
Si demandé, créé aussi un index plein texte.
.TP
\fB\-\-verbose\fR
Active le mode verbeux de la sortie.
.TP
\fB\-\-backend=xapian|clucene\fR
Séléctionne un moteur d'indexation.
.TP
\fB\-\-buildIndex\fR
Créer un index plein texte pour le fichier ZIM.
.TP
\fBZIM_PATH\fR
Chemin du fichier de contenu ZIM.
.TP
\fBKIWIX_PATH\fR
Chemin d'accès dossier kiwix/.
.br
Le chemin doit contenit le binaire statique de Kiwix.
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-serve(1) kiwix\-compact(1) kiwix\-manage(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -57,8 +57,8 @@ Chemin vers l'index plein texte correspondant au fichier ZIM.
Définit l'adresse URL corresponsant au fichier ZIM pour pouvoir être téléchargé depuis Kiwix.
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-install(1) kiwix\-serve(1) kiwix\-compact(1)
kiwix(1) kiwix\-install(1) kiwix\-serve(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -52,10 +52,10 @@ Chemin vers le fichier bibliothèque de Kiwix.
Le fichier bibliothèque est un fichier XML créé avec \fBkiwix-manage\fB.
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-manage(1)
kiwix(1) kiwix\-manage(1)
.br
kiwix\-install(1) kiwix\-compact(1)
kiwix\-install(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,52 +0,0 @@
.TH KIWIX 1 "12 juin 2012"
.SH NAME
Kiwix \- Lecteur hors-ligne de fichiers ZIM
.SH SYNOPSIS
.B kiwix [-jsconsole] [-articleByUrl] [-articleByTitle] [FILE]
.SH DESCRIPTION
.PP
Kiwix est un lecteur de content au format ZIM.
.br
Les fichiers ZIM sont des archives de contenus compressés (généralement HTML)
.br
Les fichiers ZIM les plus populaires sont ceux de Wikipédia et Wikileaks.
.TP
\fB\-jsconsole\fR
Active la console de debogage JavaScript de Xulrunner.
\fB\-articleByUrl url\fR
Ouvre un article en particulier en renseignant son url. FILE doit être donné.
.TP
\fB\-articleByTitle title\fR
Ouvre un article en particulier en renseignant son titre. FILE doit être donné.
.PP
Fonctionnalités:
* Lecteur de ZIM natif
* Moteur de recherche plein texte
* Signets et Notes
* Serveur Web pour diffuser les fichiers ZIM sur le réseau
* Export HTML et PDF
* Traduits dans de nombreuses langues
* Suggestions de recherche
* Indexation des fichiers ZIM
* Onglets de navigation
* Bibliothèque de contenus intégrée
.SH SEE ALSO
kiwix-index(1) kiwix-install(1) kiwix-serve(1)
.br
kiwix-compact(1) kiwix-manage(1)
.SH TROUBLESHOOTING
Aller à http://reportabug.kiwix.org pour plus de détails sur comment rapporter un bogue.
.SH AUTHORS
Emmanuel Engelhart <kelson@kiwix.org>
Guillaume Duhamel <gduhamel@linterweb.com>
Fabien Coullon <fcoulon@linterweb.com>
Renaud Gaudin <rgaudin@gmail.com>
Wilfredo Rodriguez <wilfredor@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

3
src/man/fr/meson.build Normal file
View File

@@ -0,0 +1,3 @@
install_man('kiwix-manage.1',
'kiwix-serve.1',
install_dir:get_option('mandir')+'/fr/man1')

View File

@@ -1,23 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix-compact \- ZIM index compacter
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix-compact INDEX_PATH
.SH DESCRIPTION
.PP
Compacts ZIM index files used by Kiwix using xapian-compact
.TP
\fBINDEX_PATH\fR
Full-text index path to compact.
.SH SEE ALSO
kiwix(1) kiwix-index(1) kiwix-manage(1) xapian-compact(1)
.br
kiwix-install(1) kiwix-serve(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,31 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix\-index \- Kiwix ZIM Indexer
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix\-index [\-\-backend|\-b=xapian|clucene] ZIM_PATH INDEX_PATH
.SH DESCRIPTION
.PP
Generates a xapian or clucene full-text index for a ZIM file.
.TP
\fB\-\-backend=xapian|clucene\fR
Select an indexing backend.
.TP
\fBZIM_PATH\fR
ZIM file path to index.
.TP
\fBINDEX_PATH\fR
Path to save the full\-text index to.
.SH SEE ALSO
kiwix\-compact(1) kiwix\-manage(1) kiwix\-serve(1)
.br
kiwix(1) kiwix\-install(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,40 +0,0 @@
.TH KIWIX 1 "21 May 2012"
.SH NAME
kiwix\-install \- Kiwix ZIM Installer
.SH SYNOPSIS
.IX Header SYNOPSIS
kiwix\-install [\-\-verbose|-v] [\-\-backend|\-b=xapian|clucene] [\-\-buildIndex|\-i] addcontent ZIM_PATH KIWIX_PATH
.SH DESCRIPTION
.PP
Creates a standalone Kiwix + data hierarchy.
.br
If specified, also creates a full\-text index.
.TP
\fB\-\-verbose\fR
Enable verbose output.
.TP
\fB\-\-backend=xapian|clucene\fR
Select an indexing backend.
.TP
\fB\-\-buildIndex\fR
Build an index for the ZIM file.
.TP
\fBZIM_PATH\fR
ZIM content file path.
.TP
\fBKIWIX_PATH\fR
Path to the kiwix/ folder.
.br
The path must contain the kiwix standalone binary.
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-serve(1) kiwix\-compact(1) kiwix\-manage(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

View File

@@ -1,62 +1,69 @@
.TH KIWIX 1 "21 May 2012"
.TH KIWIX-MANAGE 1 "21 May 2012"
.SH NAME
kiwix\-manage \- Kiwix Library Manager
.SH SYNOPSIS
.IX Header SYNOPSIS
.B kiwix\-manage
.br
kiwix\-manage LIBRARY_PATH add ZIM_PATH ...
.br
kiwix-manage LIBRARY_PATH show [CONTENTID1] [CONTENTID2] ...
.br
kiwix\-manage LIBRARY_PATH remove CONTENTID1 [CONTENTID2]
.SH DESCRIPTION
.SS kiwix\-manage
.PP
\fBkiwix\-manage\fP tool for managing a kiwix library.
.PP
Allows one to manage the content of the kiwix library. Library file is an XML flat file
listing ZIM files with all necessary information like favicon, date, creator,
description, indexpath, filepath, title, source/metalink etc.
.
.PP
Example library file can be found at http://www.kiwix.org/library\.xml
.br
.TP
\fBadd\fR
Add \fBZIM_FILE\fP to \fBLIBRARY_FILE\fP.
\fBkiwix\-manage\fR LIBRARY_PATH \fBadd\fR ZIM_PATH ...
.TP
\fBkiwix\-manage\fR LIBRARY_PATH \fBshow\fR [ZIM_ID_1] [ZIM_ID_2] ...
.TP
\fBkiwix\-manage\fR LIBRARY_PATH \fBremove\fR ZIM_ID_1 [ZIM_ID_2] ...
.TP
\fBkiwix\-manage\fR --version
.TP
\fBkiwix\-manage\fR --help
.SH DESCRIPTION
.PP
\fBkiwix\-manage\fP is a command line tool for manipulating a Kiwix XML library.
.PP
\fBkiwix\-manage\fP allows to manage the entries of the Kiwix
library. The library file is a flat XML file listing ZIM files with
all necessary information like id, favicon, date, creator,
description, filepath, title, url, etc.
.SH ACTIONS
.TP
\fBshow\fR
Show given \fBCONTENT_ID\fP from \fBLIBRARY_FILE\fR. If no \fBCONTENT_ID\fP is given then all contents from \fBLIBRARY_FILE\fR are shown.
\fBadd\fR
Add \fBZIM_FILE\fP to \fBLIBRARY_FILE\fP. Create the library file if necessary.
.TP
\fBremove\fR
Remove the given \fBCONTENT_ID\fR from \fBLIBRARY_FILE\fR. At least one \fBCONTENT_ID\fR should be specified.
Remove the given \fBZIM_ID\fR from \fBLIBRARY_FILE\fR. At least one \fBZIM_ID\fR should be specified.
.TP
\fB\-\-zimPathToSave=\fR
Change the location reference of the ZIM file in the library.
\fBshow\fR
Show given \fBZIM_ID\fP from \fBLIBRARY_FILE\fR. If no \fBZIM_ID\fP is given then all contents from \fBLIBRARY_FILE\fR are shown.
.SH OPTIONS
.TP
Options to be used with the action \fBadd\fR:
.TP
\fB\-\-current\fR
Mark this content as the current (default) content in the library.
\fB\-\-url=HTTP_URL\fR
Set the ZIM online HTTP(S) URL
.TP
\fB\-\-backend=xapian|clucene\fR
Select an indexing backend.
\fB\-\-zimPathToSave=OTHER_FS_PATH\fR
Set an arbitrary ZIM filesystem path (instead of the ZIM_PATH)
.TP
\fB\-\-indexPath=FULLTEXT_IDX_PATH\fR
Path to full-text index for that ZIM file.
Other options (to be used alone):
.TP
\fBurl\fR
Set the content location of the ZIM file over the network for in\-kiwix download.
\fB\-\-help | \-h\fR
Display the kiwix-manage help
.TP
\fB\-\-version | \-v\fR
Display the version of kiwix-manage and all dependences
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-install(1) kiwix\-serve(1) kiwix\-compact(1)
.SH AUTHOR
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)
kiwix\-serve(1)
.SH AUTHORS
Kiwix team <contact@kiwix.org>

21
src/man/kiwix-search.1 Normal file
View File

@@ -0,0 +1,21 @@
.TH KIWIX-SEARCH "1" "July 2020" "kiwix-tools" "User Commands"
.SH NAME
kiwix-search \- find articles using a fulltext search pattern
.SH SYNOPSIS
\fBkiwix-search\fR [OPTIONS] ZIM PATTERN\fR
.SH DESCRIPTION
.TP
ZIM
ZIM file to search
.TP
PATTERN
Words or parts of words to search for in the ZIM file
.TP
\fB\-s\fR, \fB\-\-suggestion\fR
Suggest article titles based on the PATTERN instead of a fulltext search
.TP
\fB\-V\fR, \fB\-\-version\fR
print software version
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Give details about the search process

View File

@@ -1,61 +1,155 @@
.TH KIWIX 1 "21 May 2012"
.TH KIWIX 1 "10 July 2023"
.SH NAME
kiwix\-serve \- Kiwix HTTP Server
kiwix-serve \- Kiwix HTTP Server
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.B kiwix-serve --library [OPTIONS] LIBRARY_FILE_PATH
.br
kiwix\-serve [\-\-index=INDEX_PATH] [\-\-port=PORT] [\-\-verbose] [\-\-daemon] [\-\-attachToProcess=PID] ZIM_PATH
.B kiwix-serve [OPTIONS] ZIM_FILE_PATH ...
.br
kiwix\-serve \-\-library [\-\-port=PORT] [\-\-verbose] [\-\-daemon] [\-\-attachToProcess=PID] LIBRARY_PATH
.B kiwix-serve [OPTIONS] DIRECTORY_PATH ...
.br
.B kiwix-serve [OPTIONS] ZIM_FILE_PATH DIRECTORY_PATH ...
.SH DESCRIPTION
.PP
Stand\-alone HTTP server for serving ZIM content over the network.
The \fBkiwix-serve\fR command is used to run a stand-alone HTTP server for serving ZIM contents over the network.
.SH ARGUMENTS
.TP
\fBLIBRARY_FILE_PATH\fR
Path of an XML library file listing ZIM files to serve. To be used only with the --library option. Multiple library files can be provided as a semicolon (;) separated list.
.TP
\fB\-\-index=INDEX_PATH\fR
Path to index folder created using \fBkiwix-index\fB.
\fBZIM_FILE_PATH ...\fR
ZIM file path(s). Multiple arguments are allowed.
.TP
\fB\-\-port=PORT\fR
Port number on which the server should listen.
\fBDIRECTORY_PATH ...\fR
Path(s) of directories containing ZIM files. Multiple arguments are allowed.
.SH OPTIONS
.TP
\fB--library\fR
By default, kiwix-serve expects a list of ZIM files as command line arguments. Providing the --library option tells kiwix-serve that the command line argument is rather a library XML file.
.TP
\fB-i ADDR, --address=ADDR\fR
Listen only on this IP address. By default, the server listens on all available IP addresses. Alternatively, you can use special values to define which types of connections to accept:
all : Listen for connections on all IP addresses (IPv4 and IPv6).
.br
By default, server listens on port 80.
.TP
\fB\-\-verbose\fR
Enable verbose output.
.TP
\fB\-\-daemon\fR
Run the server as a daemon
.TP
\fB\-\-attachToProcess=PID\fR
Shutdown the server when process numbered PID dies.
.TP
\fBZIM_PATH\fR
ZIM file of the content to serve.
ipv4 : Listen for connections on all IPv4 addresses.
.br
Mandatory if not in library mode.
ipv6 : Listen for connections on all IPv6 addresses.
.TP
\fB\-\-library\fR
Enable library mode.
.br
Serves the contents of a library file instead of a single ZIM file.
\fB-p PORT, --port=PORT\fR
TCP port on which to listen for HTTP requests (default: 80).
.TP
\fBLIBRARY_PATH\fR
Kiwix library file path.
.br
Library is XML file created using \fBkiwix-manage\fB.
\fB-r ROOT, --urlRootLocation=ROOT\fR
URL prefix on which the content should be made available (default: empty).
.SH SEE ALSO
kiwix(1) kiwix\-index(1) kiwix\-manage(1)
.TP
\fB-d, --daemon\fR
Detach the HTTP server daemon from the main process.
.TP
\fB-a PID, --attachToProcess=PID\fR
Exit when the process with id PID stops running.
.TP
\fB-M, --monitorLibrary\fR
Monitor the XML library file and reload it automatically when it changes.
Library reloading can be forced anytime by sending a SIGHUP signal to the
\*(lqkiwix-serve\*(rq process (this works regardless of the presence of the
\*(lq--monitorLibrary\*(rq/\*(lq-M\*(rq option).
.TP
\fB-m, --nolibrarybutton\fR
Disable the library home button in the ZIM viewer toolbar.
.TP
\fB-n, --nosearchbar\fR
Disable the search box in the ZIM viewer toolbar.
.TP
\fB-b, --blockexternal\fR
Prevent users from directly navigating to external resources via links in ZIM content.
.TP
\fB-t N, --threads=N\fR
Number of threads to run in parallel (default: 4).
.TP
\fB-s N, --searchLimit=N\fR
Maximum number of ZIM files in a fulltext multizim search (default: No limit).
.TP
\fB-z, --nodatealiases\fR
Create URL aliases for each content by removing the date embedded in the file name.
The expected format of the date in the filename is \*(lq_YYYY-MM\*(rq. For example, a ZIM file named \*(lqwikipedia_en_all_2020-08.zim\*(rq will be accessible both as \*(lqwikipedia_en_all_2020-08\*(rq and \*(lqwikipedia_en_all\*(rq.
.TP
\fB-c PATH, --customIndex=PATH\fR
Override the welcome page with a custom HTML file.
.TP
\fB-L N, --ipConnectionLimit=N\fR
Max number of (concurrent) connections per IP (default: infinite, recommended: >= 6).
.TP
\fB-k, --skipInvalid\fR
Startup even when ZIM files are invalid (those will be skipped)
.TP
\fB-v, --verbose\fR
Print debug log to STDOUT.
.TP
\fB-V, --version\fR
Print the software version.
.TP
\fB-h, --help\fR
Print a help message.
.SH EXAMPLES
Serve a single ZIM file:
.sp
.nf
.B kiwix-serve myzim.zim
.fi
Serve multiple ZIM files:
.sp
.nf
.B kiwix-serve zim1.zim zim2.zim zim3.zim
.fi
Serve ZIM files within a directory or directories:
.sp
.nf
.B kiwix-serve zimDir1 zimDir2
Serve ZIM files from a library:
.sp
.nf
.B kiwix-serve --library library.xml
.fi
.SH DOCUMENTATION
Online documentation: https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html
.br
kiwix\-install(1) kiwix\-compact(1)
.SH AUTHOR
Source code: https://github.com/kiwix/kiwix-tools
.br
More info: https://wiki.kiwix.org/wiki/Kiwix-serve
.SH AUTHORS
Emmanuel Engelhart <kelson@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)
Vasudev Kamath <kamathvasudev@gmail.com>

View File

@@ -1,52 +0,0 @@
.TH KIWIX 1 "12 June 2012"
.SH NAME
Kiwix \- Offline ZIM file reader
.SH SYNOPSIS
.B kiwix [-jsconsole] [-articleByUrl] [-articleByTitle] [FILE]
.SH DESCRIPTION
.PP
Kiwix is an offline content reader for the ZIM format.
.br
ZIM files are compressed content (usually HTML) archives.
.br
Most popular ZIM includes Wikipedia and Wikileaks.
.TP
\fB\-jsconsole\fR
Enable the Javascript Debug console (Xulrunner)
.TP
\fB\-articleByUrl url\fR
Open a specific article by url. FILE must be given.
.TP
\fB\-articleByTitle title\fR
Open a specific article by title. FILE must be given.
.PP
Features:
* Pure ZIM file reader
* Full text search engine
* Bookmarks & Notes
* ZIM base HTTP server
* PDF/HTML export
* Localized in 80+ languages
* Search suggestions
* ZIM file indexing capacity
* Tabs navigation
* Content manager
.SH SEE ALSO
kiwix-index(1) kiwix-install(1) kiwix-serve(1)
.br
kiwix-compact(1) kiwix-manage(1)
.SH TROUBLESHOOTING
See http://reportabug.kiwix.org for more details on how to report bugs in Kiwix.
.SH AUTHORS
Emmanuel Engelhart <kelson@kiwix.org>
Guillaume Duhamel <gduhamel@linterweb.com>
Fabien Coullon <fcoulon@linterweb.com>
Renaud Gaudin <rgaudin@gmail.com>
Wilfredo Rodriguez <wilfredor@kiwix.org>
.br
Vasudev Kamath <kamathvasudev@gmail.com> (Manual)

Some files were not shown because too many files have changed in this diff Show More