2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

7645 Commits

Author SHA1 Message Date
NiLuJe
a8da762955
Initial handling of the upcoming Kobo Nia (#6380)
Obviously untested ;p
2020-07-16 13:18:10 +02:00
yparitcher
783103b488
Perception expander: disable margin increase when set to 0 (#6377)
Closes #6376
2020-07-15 20:31:40 -04:00
yparitcher
bda44a99ef
Dispatcher: use sections (#6364)
use `device` `filemanager` `rolling` and `paging` sections to organize the
dispatcher menu and allow the user to know when the action will apply

add events from ReaderGesture

allow profiles in FM
2020-07-14 17:39:03 -04:00
NiLuJe
4e5def4282
Tame a few tests that relied on pairs being somewhat deterministic (#6371)
* Mangle stupid defaults test so that it compares tables, and not a non-deterministic string representation of one.

It's still extremely dumb and annoying to update. (i.e., feel free to kill it with fire in a subsequent PR, I think everybody would cheer).

* Rewrite DepGraph to be deterministic

i.e., fully array based, no more hashes, which means no more pairs randomly re-ordering stuff.

Insertion order is now preserved.

Pretty sure a couple of bugs have been fixed and/or added along the way
;p.

* Resync frontend/apps/filemanager/lib/md.lua w/ upstream

And use orderedPairs in the attribute parsing code, just to make that stupid test happy.
2020-07-14 18:25:26 +02:00
yparitcher
70f89c4df1
ReaderGesture: cleanup (#6292)
convert all gesture actions to use events for better modularity
add network event handlers and device event handlers
2020-07-12 14:47:49 -04:00
Martín Fernández
f4dad2fae8
[doc] WSL extra bits (#6368)
Fixes #6354
2020-07-11 08:16:26 +02:00
Martín Fernández
1adea4a497 Add macOS target
Co-authored-by: Jason Benwell <jbenwell@hotmail.com>
2020-07-11 01:29:49 +02:00
Martín Fdez
a376a52c3a easier user font paths with Device.home_dir 2020-07-10 15:16:38 +02:00
NiLuJe
509ee7bb86
Allow locking the gyro to the current screen mode (#6347)
* Allow locking the gyro to the current screen mode (i.e., orientation).
* Tweak the "sticky rota" option to work both ways
* More rotation constant usage instead of magic numbers
2020-07-09 19:11:44 +02:00
Martín Fernández
f9293a67b0
[fix] Remove isAllowedScript leftovers (#6366)
Fixes #6365
2020-07-09 18:11:56 +02:00
yparitcher
d6b820fd5a
Do not link cache dir as it may already exist (#6358)
use bash with extglob to not match one result

closes koreader/koreader#6357
2020-07-09 08:39:36 +02:00
Martín Fdez
8324154177 keep newlines outside translations 2020-07-09 01:08:47 +02:00
Martín Fdez
7094519e1b android: support for native surface rotation 2020-07-09 01:08:47 +02:00
poire-z
580b38e775
bump crengine: memory fixes, speedup, bg image enhancements (#6350)
Includes:
- Cleanup some files permissions
- (Upstream) Font: improve management of HarfBuzz features
- (Upstream) Fix invalid cache usage
- (Upstream) Fix many memory errors, allow boxing when cache file
- Disable hasCacheFile()/setBoxingWishedButPreventedByCache()
- globalHash: exclude some settings on initial loading
- CSS: optimize pseudoclass nth-child() and friends
- (Multiple) Fix/silence/avoid clang warnings
- Don't mangle source pixel when alpha-blending to 8bpp
- (Upstream) HyphMan cleanup
- Rendering methods: remove erm_runin
- Text formatting: simplify 'display: run-in' handling
- Simplify background image drawing
- CSS: adds support for "background-size" property
- CSS: support background:url("data:image/png;base64,...)
- Fix elements cancelling inherited "white-space: pre"
- initNodeStyle(): skip some possibly costly validation
2020-07-05 23:35:26 +02:00
yparitcher
8f2399caa9
[fix] Allow default FM rotation on init when Keep FM rotation is disabled (#6348) 2020-07-05 17:34:44 +02:00
Frans de Jonge
8a61e70fad
[fix] Bring kodev cov command in line with kodev test (#6341) 2020-07-02 11:45:12 +02:00
yparitcher
f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
2020-07-01 16:17:41 -04:00
Frans de Jonge
09c654c7ec
[chore] Simplify OPDSBrowser http.request handling (#6334)
Cf. <https://github.com/koreader/koreader/pull/6307>.
2020-06-30 17:37:34 +02:00
Frans de Jonge
bb376fb16b
[feat] Add text/html to OPDSBrowser (#6335) 2020-06-30 17:37:08 +02:00
Frans de Jonge
4a3710b6d3
[i18n] Add support for fledgling Hebrew translation (#6333)
See <https://hosted.weblate.org/languages/he/koreader/> if you'd like to contribute.
2020-06-30 17:20:03 +02:00
Frans de Jonge
86db43a052
[UX] Move double tap to gesture manager (#6322)
Also replaces the default with +10/-10 pages instead of prev/next chapter.

Closes <https://github.com/koreader/koreader/issues/2721>.
2020-06-28 15:41:24 +02:00
yparitcher
5795e6d63c
Dispatcher: fix table (#6324)
accessing the table via reference rather than copying the values was breaking the configdialog
2020-06-28 12:18:45 +02:00
Frans de Jonge
ac1fa5d677
[plugin] Wallabag: Make remove from history consistent with deletion (#6320)
Finished is a specific status distinct from 100% read.

Also reorganize the menus slightly.

Closes <#6316>.
2020-06-28 11:34:22 +02:00
yparitcher
b54d04de5d
Tests: make sure files are deleted (#6323)
calling `docsettings:flush()` was causing the sidecar file to be recreated leaving garbage folders in the KOreader folder after running the tests
2020-06-28 08:03:37 +02:00
Galunid
37cf106fce
EvernoteOAuth set logger (#6308)
evernote-sdk-lua#4 to logger.dbg, instead of default print
2020-06-27 17:35:25 +02:00
Frans de Jonge
8ea7a1354a
[chore, plugin] Simplify Wallabag http.request handling (#6307)
See <https://github.com/koreader/koreader-base/issues/594#issuecomment-484233915>.

LuaSocket takes care of everything now, so all similar code can be simplified.
2020-06-27 09:12:30 +02:00
Frans de Jonge
7a37accdcc
[UX] Add left to close to ConfigDialog for hasFewKeys (#6318)
Follow-up to <https://github.com/koreader/koreader/pull/6195>.

Part of <https://github.com/koreader/koreader/issues/4029>.
2020-06-27 09:11:05 +02:00
Frans de Jonge
060ee98048
[feat] FocusManager: wrap around horizontally (#6315)
There doesn't seem to be a reason not to, but it could be limited to `Device:hasFewKeys()` if desired.

Cf. <https://github.com/koreader/koreader/pull/6312#issuecomment-650207697>.
2020-06-27 08:43:28 +02:00
Martín Fernández
32207523b0
emulator: add fake network manager (#6314) 2020-06-26 20:47:09 +02:00
roshavagarga
46bf88c573
Add PocketBook 614W (Basic 3) definition (#6312)
Cf. <#6311>.
2020-06-26 16:15:49 +02:00
zwim
43693c9fe9
Add the possibility run shell scripts from filemanager on android (#6288) 2020-06-25 21:33:51 +02:00
poire-z
9385728769
Bookmarks prev/next via gestures: add location to stack (#6306)
Was correctly done when jumping bookmarks via the Bookmarks
menu and the SkimTo widget, but not from gestures.
Also prevent fillToc() on each page turn when book has no TOC.
2020-06-25 21:19:50 +02:00
poire-z
71744688c7 Style tweaks: use 0.8rem instead of 80% for in-page footnotes 2020-06-25 14:51:32 +02:00
poire-z
8a568a2721 bump crengine: add support for <ruby> elements
Includes:
- Fix some non-recursive subtree walkers
- Text: skip formatting optimisations when inlineBoxes
- CSS parsing: parse selectors starting with [attrib]
- Use T="" for internal elements attributes
- CSS: re-order css_d_* (display) enum for easier checking
- Rendering methods: remove erm_table_cell
- Rendering methods: remove erm_table_caption
- Rendering methods: remove erm_list_item
- getRenderedWidths(): better estimate table width
- styleToTextFmtFlags(): adds is_block parameter
- Adds support for "display: ruby" and <ruby> elements
- Fix prev/next-VisibleWord-Start/End() with CJK text

Also bump HarfBuzz to 2.6.8 and evernote-lua-sdk.
2020-06-25 14:51:32 +02:00
Frans de Jonge
f8af0a9e0e
[doc] Add some tips about GitHub PR refs (#6289) 2020-06-24 12:49:34 +02:00
Martín Fdez
8e61a8f285 disable runtime behaviour changes on fdroid 2020-06-24 12:49:14 +02:00
Martín Fdez
d91d2d72d7 disable background runner on android 2020-06-24 12:49:14 +02:00
Frans de Jonge
eee54ffbae
Add FR template (#6296)
Follow-up to <https://github.com/koreader/koreader/pull/6291>.
2020-06-22 18:26:39 +02:00
Galunid
f09a4e7c8e
Translator: Add definition of the word to the translation (#6295)
closes #6293
2020-06-22 15:17:14 +02:00
Frans de Jonge
1abaa39c27
[plugin] Add menu separators to Evernote menu (#6294)
This makes the menu structure slightly clearer.
See <https://github.com/koreader/koreader/issues/2778#issuecomment-647324742>.
2020-06-22 10:00:22 +02:00
Frans de Jonge
3892e3a84d
Bump base for DjVu and SQLite (#6290)
Contains
* Update to SQLite 3.32.3 https://github.com/koreader/koreader-base/pull/1118
* thirdparty/djvulibre Bump to latest master https://github.com/koreader/koreader-base/pull/1119
2020-06-22 08:32:30 +02:00
Frans de Jonge
704f174c3d
Migrate to new issue templates workflow (#6291)
See https://help.github.com/en/github/building-a-strong-community/about-issue-and-pull-request-templates
2020-06-22 08:31:54 +02:00
NiLuJe
ff1e50c5c0
Don't rotate BookStatus & ReadingProgress in screensavers. (#6286)
They're full-screen, and they work fine in Landscape.

re: #5724

* Fix multiline indents in the Kindle c/p ;p
2020-06-21 16:27:43 +02:00
Martín Fernández
699ee3efc1
[Android] Migrate user directories after update (#6287)
I've played a bit with #6275, to make the iterator available for non-power users too.

this PR automate user data migration (which happens once per update). If the folder `koreader/scripts.afterupdate` contains a file `migrate` then files will be copied to internal dir preserving their relative path. Thus user data **needs** to have the same hierarchy as internal directories.

Shell scripts will be find and run if the folder `koreader/scripts.afterupdate` exists and has no `migrate file`.

In the case of `koreader/scripts.always` there's no migration available, just shell scripts.

Digging a bit seems not possible to create new directories on app internal storage (it just crashes on the emulator since API25). So very fancy extensions are not supported, but it is ok to override files and create new files if dir already exists.

Tested with:

```find scripts.afterupdate/                                            
scripts.afterupdate/
scripts.afterupdate/data
scripts.afterupdate/data/hyph
scripts.afterupdate/data/hyph/Roman.pattern
scripts.afterupdate/data/example.css
scripts.afterupdate/migrate
```

Results:

```
06-20 16:16:33.590  3584  3597 I KOReader: after-update: running migration
06-20 16:16:33.596  3584  3597 I KOReader: command cp /storage/emulated/0/koreader/scripts.afterupdate/data/hyph/Roman.pattern /data/user/0/org.koreader.launcher/files/data/hyph/Roman.pattern returned 0
06-20 16:16:33.600  3584  3597 I KOReader: command cp /storage/emulated/0/koreader/scripts.afterupdate/data/example.css /data/user/0/org.koreader.launcher/files/data/example.css returned 0
06-20 16:16:33.604  3584  3597 I KOReader: command rm /data/user/0/org.koreader.launcher/files/afterupdate.marker returned 0
```
2020-06-20 18:06:24 +02:00
NiLuJe
416c1c7356
More robust way to detect our own path on Kobo (#6283)
* More robust way to detect our own path on Kobo

Should take care of all the weird and interesting ways people manage to
find to break it...

NOTE: "$(dirname $(realpath "${0}"))" works, too, but I'm not sure if
really old devices ship with the realpath applet...

* Abort early if KOREADER_DIR is null
2020-06-20 17:15:55 +02:00
yparitcher
a9d4e97115
[plugin] Dispatcher: for profiles & gestures (#6106)
add a Dispatcher module that allows for dispatching multiple events at once.
This will allow for profiles & for gestures that do multiple things.

it has 2 methods:
Execute which is given a kv table of settings to change and fires an event for each of them.
addSubMenu adds a menu item to a menu to allow for modifying which events are called
it also has settingsList which is a master table of all allowed setting and their corresponding info
(it is mostly from ReaderGesture and needs a lot of work)

to allow for a new setting all one has to do is add a entry to settingsList with a corresponding event and it will work out of the box.

the profile plugin is right now still a stub, just to test Dispatcher. the plan is to finish it and eventually refactor ReaderGesture to rely on this.
This also needs effort to move many functions out of reader gesture into events where they belong.
2020-06-19 23:38:53 +02:00
zwim
488721e62e
[Android] Add support for custom startup scripts (#6275)
Add the possibility to run *.sh scripts:

After an update of koreader all *.sh scripts in /sdcard/koreader/scripts.afterupdate
are executed.

On every start of koreader run all *.sh scripts in /sdcard/koreader/scripts.always
2020-06-19 21:23:47 +02:00
Martín Fernández
88feefe788
[chore, UX] Move some 'permanent' settings inside more_tools (#6282)
Err, kind of nitpick PR. Is just add some "permanent" menus other than plugins to the new "more_tools" submenu. So it will never be empty.

Follow-up: #6279
Supersedes: #5512 #6092
Fixes: #5461
2020-06-19 20:40:40 +02:00
Martín Fernández
83cde64bcc
unified calibre plugin (#6177)
joins calibre metadata search and calibre wireless connections into a single plugin

search metadata changes:

- search directly into calibre metadata files.
- search can be performed on more than one library (configurable from a menu)
- device scans now find all calibre libraries under a given root
- search options can be configured from a menu. (case sensitive, find by title, author and path)
- removed legacy global variables.
- *option* to search from the reader
- *option* to generate a cache of books for faster searches.

calibre wireless connection changes:

- keep track of books in a library (includes prunning books from calibre metadata if the file was deleted locally)
- remove files on device from calibre
- support password protected connections
- FM integration: if we're in the inbox dir it will be updated each time a book is added or deleted.
- disconnect when requested by calibre, available on newer calibre versions (+4.17)
- remove unused opcodes.
- better report of client name, version and device id
- free disk space checks for all calibre versions
- bump supported extensions to match what KOReader can handle. Users can override this with their own list of extensions (or from calibre, by configuring the wireless device).
2020-06-19 12:22:38 +02:00
Martín Fernández
2e731dd4dd
[chore] Device abstraction (#6280)
* generic Device:info() function which returns the model

* add Device:canSuspend() and make it true in all devices that have suspend routines and the emulator

* also enable fake poweroff/reboot on the emulator

* add Device.home_dir

* add Device:hasExitOptions() and update menus & comments
2020-06-19 09:41:50 +02:00