Commit Graph

518 Commits

Author SHA1 Message Date
Frans de Jonge
105694e117 [plugin] NewsDownloader: add HTTP basic authentication (#14303)
Closes <https://github.com/koreader/koreader/issues/13300>.
2025-09-14 15:50:49 +02:00
Frans de Jonge
eb00488fa6 [plugin] OPDS: ignore query string in file extension workaround (#14304)
Closes <https://github.com/koreader/koreader/issues/14300>.
2025-09-11 21:46:40 +02:00
hius07
826455961d Export highlights: customizable export filename (#14212) 2025-08-26 09:41:09 +03:00
Zeedif
f7b160bdda feat(opds): add support for facets via a context menu
This commit introduces support for OPDS 1.2 facets, enabling advanced filtering and sorting in compatible catalogs.

To maintain a clean and uncluttered book list, facet options are presented in a dedicated context menu. When a catalog provides facets or a search link, the top-left button now triggers a menu with all available actions.

- Facet links are parsed and grouped by the `opds:facetGroup` attribute.
- The context menu includes facet groups, search, and bookmarking.
- Adds support for `opds:activeFacet` and `thr:count`.
- The parsing logic now cleanly separates feed-level links from entries, correctly handling catalogs with facets but no initial items.
- Unrelated style changes were reverted and the test suite was improved for reliability.
2025-07-28 10:18:38 +02:00
Benoit Pierre
456ce2fa36 gettext: switch to binary catalogs
Binary catalogs are more space efficient (total translations disk usage:
14MB instead of 35MB), and easier and faster (roughly 10 times) to load:
no parsing, and less processing (no need to unescape strings).

Not much difference on the Android APK size (a ~600KB reduction), but
other TAR.GZ / ZIP distributions see a reduction of ~3.5MB.
2025-06-21 17:47:15 +02:00
Benoit Pierre
b8369d743a tests: fix newsdownloader tests isolation (#13954)
Cf. https://github.com/koreader/koreader/pull/13953#issuecomment-2972614736.
2025-06-14 21:14:25 +02:00
Frans de Jonge
0257caad05 Add tests for NewsDownloader (#13806)
To help prevent situations like #13799.

As also referenced in <https://github.com/koreader/koreader/pull/13407#issuecomment-2722714846>.

Also fixes single item RSS and single entry Atom feeds in passing.

References #3073.
2025-05-30 19:20:17 +02:00
hius07
70fcc90a3c Highlights: quicker Style and Note marker dialogs (#13223) 2025-02-12 09:14:03 +02:00
NiLuJe
aa421bf277 GestureDetector: Translate start & end gesture positions when rotated (#13101)
* GestureDetector:adjustGesCoordinate: Remove one layer of indirectiçon in
direction translation

That function call wrapper felt pretty unnecessary to me ;).

* GestureDetector: Translate complex gesture positions, too

i.e., if there's a start and end position, translate those, too.

Fix #13090
2025-01-31 18:30:23 +01:00
Frans de Jonge
63bf9d5bdf Add CacheSQLite (#13131)
Persist is intended for larger objects, which works best for things like cached tiles with some metadata.

For many small to medium entries that you nevertheless don't necessarily want to keep around in memory, that seems a bit inefficient.

SQLite then, is effectively a way of minimizing the amount of writes in this scenario.

Relates to #13061. Depends on #13122.
2025-01-29 21:33:44 +01:00
Benoit Pierre
d270f08ceb bump base (#13140)
- https://github.com/koreader/koreader-base/pull/2016
2025-01-25 21:58:40 +01:00
Frans de Jonge
d98639f341 Persist: add support for zstd serialization/deserialization in memory (#13122) 2025-01-24 22:43:16 +01:00
Frans de Jonge
12b075a4ac [minor] normalize a few requires (#13055) 2025-01-13 08:33:18 +01:00
Benoit Pierre
bb41c40d6f tests: cleanup & speedup readerfooter tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
2e4158b651 tests: cleanup readerhighlight tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
cf827a309a tests: cleanup readerpaging tests
Fix error trace: "ReaderUI instance mismatch".
2024-12-25 17:29:40 +01:00
Benoit Pierre
616d52ba88 tests: speedup readerdictionary tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
fbcda02726 tests: fix translator tests tags 2024-12-25 17:29:40 +01:00
Benoit Pierre
d2d62d8550 tests: speedup readerbookmark tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
ddaf562250 tests: cleanup readerbookmark tests
Fix screenshots.
2024-12-25 17:29:40 +01:00
Benoit Pierre
cc5ef2dbce tests: speedup koptinterface tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
77ef1ea1a2 tests: cleanup and speedup screenshoter tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
3d2a6a17ad tests: speedup readerrolling tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
5bf1464f09 tests: cleanup readerrolling tests
Fix error trace: "ReaderUI instance mismatch".
2024-12-25 17:29:40 +01:00
Benoit Pierre
cee0fef497 tests: cleanup filemanager tests
Fix error trace: "FileManager instance mismatch".
2024-12-25 17:29:40 +01:00
Benoit Pierre
6956b6c560 tests: speedup readerview tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
9f5974dbe9 tests: speedup readerui tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
cdf69113c2 tests: speedup readersearch tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
f1b522acb9 tests: factorize UI related helpers 2024-12-25 17:29:40 +01:00
Benoit Pierre
480eb7e142 tests: speedup random tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
d568b8fbbc tests: cleanup filemanager test
Remove dead code.
2024-12-25 17:29:40 +01:00
Benoit Pierre
e0562f72e5 tests: speedup document tests 2024-12-25 17:29:40 +01:00
Benoit Pierre
646ed9a07f tests: avoid loading unnecessary plugins 2024-12-25 17:29:40 +01:00
Benoit Pierre
cb2d67aac9 tests: drop package.unloadAll workaround
Unnecessary, busted auto-insulation already insulate each test file run.
2024-12-25 17:29:40 +01:00
Benoit Pierre
7a5465bfe6 tests: drop workaround for older busted versions
No necessary anymore, now that we ship our own up-to-date version.
2024-12-25 17:29:40 +01:00
Martín Fernández
e503cc4b9c add provider module (#12641)
* implements a Provider singleton, to be used by thirdparty plugins
* exporter: support for thirdparty providers
* splits plugin loading into two steps: discovery and load
  1. get a list of all candidate plugins to load for the different paths
  2. sort providers before on the rest of them and try to load them
2024-12-18 19:40:22 +01:00
hius07
7444ec53e9 Remove onSetFullScreen() (#12871) 2024-12-09 12:33:16 +02:00
Martín Fernández
162685df50 remove autofrontlight + backgroundrunner (#12809)
* remove autofrontlight
* remove background-runner

thirparty plugins that rely on the backgroundrunner no longer work.
2024-12-06 21:28:56 +01:00
Eric P Hutchins
76a7633531 Translator: add romanizations setting in Translation settings (#12829)
This adds a new setting in "Translation settings" called "Show romanizations" which tells the translation popup to include in the query the parameter dt=rm and then extracts romanizations from the results to display.
2024-12-02 23:05:52 +01:00
Benoit Pierre
d4cc87c502 tests: rename PDF benchmark file
So it's picked up by the bench testsuite.
2024-11-25 22:55:57 +01:00
Benoit Pierre
de676292f6 tests: drop nocov tags 2024-11-25 22:55:57 +01:00
Benoit Pierre
e10017042e tests: tweak tags
Drop `nocov` tag for tests already tagged with `notest`
(already ignored when doing a coverage run).
2024-11-25 22:55:57 +01:00
Benoit Pierre
8c839d9ead tests: improve frontend testsuite isolation 2024-11-25 22:55:57 +01:00
Benoit Pierre
8005275388 tests: improve PDF benchmarks
Factorize and use a proper separate test for each benchmark.

Note: only open the 9 fist pages (reduce memory so benchmarks
can be run on more limited memory devices, like the Kindle).
2024-11-25 22:55:57 +01:00
Benoit Pierre
64dabfa605 tests: speedup persist huge tables test (#12786)
For example on my machine:

| test duration (ms) |  master  |             PR |
| :-                 | -:       | -:             |
| regular run        |   859.82 |  104.38 (÷8.2) |
| coverage run       | 40735.60 | 4151.34 (÷9.8) |
2024-11-23 19:28:57 +01:00
Benoit Pierre
fbde771306 tests: speedup readhistory reduce test (#12785)
For example on my machine:

| test duration (ms) |  master  |             PR |
| :-                 | -:       | -:             |
| regular run        |  2645.94 | 106.83 (÷24.8) |
| coverage run       | 26133.27 | 641.59 (÷40.7) |
2024-11-23 17:54:46 +01:00
hius07
47feaaa1df Highlights: page boxes cache (#12768) 2024-11-23 14:05:05 +02:00
mergen3107
f8446538c0 Fix KOReader spelling in the code (#12670) 2024-10-24 10:46:46 +02:00
Benoit Pierre
0c0d2ab9f1 input: drop use of ffi/input
Get rid of the weird interaction between device implementations,
`ffi.util` (`isSDL`, `noSDL`) and the device input code: each
device knows if it's using SDL or not, so rely on that to load
the right underlying input implementation.
2024-09-24 16:08:58 +02:00
NiLuJe
da74691515 Chore: Don't cache static data tables (ui/elements, ui/data, kb layouts & co) (#12519)
Using `require` didn't make much sense since most of them are only used in a single place anyway, and it takes care of a few weird interactions in the process (besides not polluting `package.loaded` with useless crap ;)).
2024-09-16 17:11:42 +02:00