Commit Graph

774 Commits (3c21770d9400c6ffa4655c79bd4e9158eff322a7)

Author SHA1 Message Date
NiLuJe 23cd7e24bb
Minor Lua I/O cleanups (#8921)
Mostly making sure we always explicitly close io handles.
2 years ago
Utsob Roy af7c8cade8
[feat, UX] CoverBrowser: add progressbar in Mosaic View (#8915) 2 years ago
Utsob Roy d266d320e2
[plugin] Exporter: optimized JSON export (#8904)
I've implemented a better JSON export format that removes redundant lists and objects and introduces the `entries` key containing all the entries.

It also add `drawer` values from highlight so that user can use this piece of metadata to generate desirable output.
2 years ago
Tesseract Cat d4bbd74208
Add OPDS PSE 1.0 support (#8919)
This PR adds support for the unofficial page streaming extension for OPDS. See: https://anansi-project.github.io/docs/opds-pse/specs/v1.0. This is useful for streaming comics from a remote server.

Addresses #7500.
2 years ago
Emir Taletovic f8eca5fa03
Calibre plugin - Series/Tag browser updated to show back button. (#8869)
* Calibre plugin - Series/Tag browser updated to show back button.

* Handling page number

* Few updates to search logic:
- Moved "find books" option from CalibreSearch:find(option)
into CalibreSearch:browse(option) function. This way all search options
are handled in one place only.

- Menu is created only once and it is in CalibreSearch:browse(option)
function. This is where it is also invoked with UIManager:show(w).
Switching between different menu content (tags/series/books) is
done using CalibreSearch:switchResults function which will internally
call Menu:switchItemTable. Previously menu was being instantiated
in 2 places depending on are we searching books or series/tags

- Return arrow navigation: Border around Menu is gone to give space
for back arrow. Navigation seems to be working fine so far but will
give it some time to test in case I find any other bugs
2 years ago
Frans de Jonge 7235433b92
[i18n] Add context for calibre configuration type (#8909)
`Manual` could mean several things, most notably some kind of documentation and something you do by hand.

The added context is partially to aid translators and partially to preclude potential collisions in the future.

Cf. <https://github.com/koreader/koreader-translations/pull/138>.
2 years ago
NiLuJe 217a73f3c0
Initial Kindle PW5 support (#8856)
* Rejig frontlight warmth API to more closely match the existing API, and, hopefully, clarify some of its quirks, and reduce boilerplate and duplicate code in platform implementations.
* Tweak Kindle:setDateTime to prefer using the platform's custom script, as in interacts better with the stock UI. And make the fallbacks handle old busybox versions better.
* Add Kindle PW5 support ;).
* Add warmth support to the Kindle platform.
* Random TextBoxWidget cleanups: make sure we immediately free destroyed instances.
* FrontLightWidget: Refactor to make it slightly less obnoxious to grok and update; i.e., separate layout from update, and properly separate brightness from warmth handling. Move to simpler widgets instead of reinventing the wheel.
* TextBoxWidgets: Implement `setText` to match TextWidget's API, as some callers may be using the two interchangeably (i.e., Button).
* NaturalLightWidget: Make sure we pass a string to InputText
* InputText: Add debug guards to catch bad callers not passing strings ;).
2 years ago
hius07 7b4d6fd205
History: filter by book status (#8820) 2 years ago
Emir Taletovic 3e78847c46
Calibre plugin - Fixed hang when book has series but series index is nil (#8870) 2 years ago
Philip Chan 107156c0a8
[feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2 years ago
zwim eef4dc1c0d
Terminal: fix regression from #8845 (#8848)
This should fix a regression introduced with #8845 with reopening a running shell.

Adds more checks and more verbose logging messages on failures.
2 years ago
zwim 1cd396f9c4
Teminal: fix crash when grantpt or unlockpt fail (#8845)
* Fix crash when grantpt or unlockpt fail
* Disable plugin if grantpt or unlockpt fail
2 years ago
Frans de Jonge 67445beea5
[plugin] Terminal: remove stray space at end of string (#8831) 2 years ago
contrun 57188311da
kosync: send progress as a string to the server (#8758)
Currently the progress sent to the server can be either a string or an int (depending on whetther the document has pages).

The following are both payload sent from koreader to the server.

```
{"percentage":0.005,"device":"device_name","device_id":"B78EA04ACC3A453DBA220D720C0BE102","document":"348e34463a44ba68659fc6fe814a6778","progress":3}
```
where document `348e34463a44ba68659fc6fe814a6778` is a pdf file.

```
{"percentage":1,"device":"device_name","device_id":"B78EA04ACC3A453DBA220D720C0BE102","document":"4eb484b229696cb39cd8fe5495aa1bbe","progress":"\/body\/DocFragment[30]\/body\/p\/img.0"}
```
where document `4eb484b229696cb39cd8fe5495aa1bbe` is an epub file.

This may add extra work to the backend server. A few commits were added to my personal fork of [kosyncsrv](https://github.com/yeeac/kosyncsrv) (a kosync backend server). kosyncsrv initially tries to decode progress as a string. It then failed on document with pages (in which, progress is just integer page number). I then change the field's type, only to [revert it later](8a642e31a0).

I believe it is more appropriate for us to fix the progress type to string.
2 years ago
Frans de Jonge 8ff8a05ff3
[plugin] Terminal: move stray newlines outside of translated string (#8830) 2 years ago
Frans de Jonge 4d6a789f6d
[plugin] Terminal: fix @translators comments (#8829) 2 years ago
Scarlett c3332f355f
NewsDownloader: add support for RDF feeds (#8822)
Fixes #8799.
2 years ago
hius07 8dbfead03d gestures: free long-press on FM home button 2 years ago
hius07 8bb08b503a
Cloud storage: enhance download dialog, fix Dropbox uploading (#8809)
(1) ButtonDialogTitle: new method setTitle()

(2) OPDSbrowser
-use setTitle() instead of open/close ButtonDialogTitle (no visual changes to the download dialog)
-reduce logger.info output to avoid flooding crash.log

(3) CloudStorage
-enhance download dialog (similar to OPDS), much optimized code of downloadFile
-fix a bug: cannot create new folder or upload files to the root of the Dropbox storage
2 years ago
hius07 c9fc9496aa
BookShortcuts: fix folders handling (#8795) 2 years ago
hius07 59f04ab018 ReaderProgress: insert TitleBar 2 years ago
hius07 77d3882eed CalendarView: remove close button! 2 years ago
hius07 605b09afbe CalendarView: remove unused CalendarTitle 2 years ago
Frans de Jonge c2812c7956
[plugin] Update capitalization style "Terminal Emulator" → "Terminal emulator" (#8759) 2 years ago
poire-z c627dfd63f ReaderStatistics: avoid self.kv leaking after close 2 years ago
poire-z 83172d62ae ReaderStatistics: reset stack/link on showing first widget
Reset self.kv stack/link on showing first widget.
This avoids return arrow to possibly show previously
displayed old and unrelated KeyValuePage.
Note: when closing a leaf KeyValuePage, the previous
one will leak as self.kv.
2 years ago
poire-z 67b17d0845 ReaderStatistics: allow reset statistics per period per book 2 years ago
poire-z f764a61b69 KeyValuePage: allow for more fancy callbacks
Add support for hold_callback.
Provides kv_page and kv_item to callbacks.
Allow for item removal and refresh.
2 years ago
poire-z 516c3d3225 ReaderStatistics: fix current page stats on close/suspend
Fixes current page statistics (duration) ignored when
document closed, or when suspending and resuming.
On suspend/resume, update the page start ts by the
time spent sleeping, so its duration will be the time
spent on it not sleeping.
2 years ago
poire-z 3a5dbe3420 ReaderStatistics: remove id_book parameter to insertDB()
As it should always just work on the current book.
Also remove uneeded getCalendarView().
2 years ago
zwim 8cff5f88b0
Teminal emulator: fix translatable, fix potential crash (#8756) 2 years ago
Martín Fernández f0197423ad
remove send2ebook plugin (#8747) 2 years ago
zwim b924f38dc0
Terminal emulator: fix elinks 'q' crash (#8749)
This fixes a crash in terminal emulator on exit of elinks.
see: https://github.com/koreader/koreader/pull/8636#issuecomment-1024956177
2 years ago
zwim 7220bdea4f
[fix, plugin] Terminal ldoc (#8742) 2 years ago
zwim f2557a7aa6
Terminal emulator: full rewrite, real vt52 emulator (#8636)
New real terminal emulator, replacing the old plugin.
The emulator is basically a vt52 terminal (enriched with
some ANSI-sequences, as ash, vi and mksh don't behave well
on a vt52 term).
So far working: ash, mksh, bash, nano, vi, busybox, watch...
The input supports: tab-completion; cursor movement;
backspace; start of line, end of line (long press);
page up, page down (long press).
User scripts may be placed in the koterm.koplugin/scripts/
folder, aliases can be put in the file aliases and startup
command in the file profile.user in that folder.
2 years ago
Adrien Gallou 66afbf15f6
wallabag : fixes synchronization when "send review as tags" is checked (#8733)
In this PR https://github.com/koreader/koreader/pull/8637
It worked on my sev environnement, but when updating my device, there
were synchronization errors.

Apparently sometimes documents do not have a summary.
To avoid an error during the synchronisation this change adds checks
when getting tags for the document.
2 years ago
poire-z 95b35ec669 Allow any multiswipe to close some fullscreen widgets
For consistency with BookMap and PageBrowser widgets
where swipe south (the usual gesture to quick close)
can't be used for closing and we had to use any
multiswipe instead, allow any multiswipe to close
these other fullscreen widgets too:
Menu (ToC, Bookmarks), KeyValuePage, ImageViewer,
BookStatusWidget, ReaderProgress, CalendarView.
2 years ago
hius07 c9b4e43bf9 OPDSbrowser: bookinfo multiline title 2 years ago
poire-z 16e3b2f0ac Allow Backspace to work as back button 2 years ago
Scarlett 8a04dc9852
NewsDownloader: new option to allow EPUB volumization (#8263)
When this feature is enabled on a feed and that feed is
synced, all new feed entries will be collected into a new
single EPUB file. This is achieved by implementing a feed
history feature (downloaded feeds are added as M5D hashes
to a LuaSettings file), and by introducing additional
methods into epubdownloader.lua that allow for multiple
HTML documents to be added into single EPUB file.
2 years ago
yparitcher 295ef6b9f7
Battery Stat: for real (#8694)
Thanks @hius07
2 years ago
Martín Fernández 963970be8c
exporter plugin: fix history dir (#8685)
for platforms where history dir don't match installation path.

Fixes #8675
2 years ago
zwim b21dc4dcc6
Autosuspend: fix 'Disable' not disabling (#8684) 2 years ago
poire-z f21a12360a CoverBrowser: use translations for error messages 2 years ago
yparitcher 517dfa3549
Battery Stat: Fix remaining & per hour numbers (#8688)
regression from #8491
papered over in #8582
Fixes #8644 #8687

Root cause was util.secondsToClockDuration (called by duration) takes seconds and we were giving it hours as `Change per hour` needs hours
2 years ago
hius07 334a913b0e
OPDS catalog: add title Plus/Home button (#8660) 2 years ago
hius07 5c39c19a73
[chore] Remove leftover: cface (#8659)
Ancient menu widget had it.

Not used anymore.
2 years ago
hius07 1bfb49c6a5
PathChooser: add left Home button (#8646) 2 years ago
Adrien Gallou 1d40949699
[plugin] Wallabag: add option to send tags added in review (#8637) 2 years ago
hius07 55532b1397
Menu widget: insert TitileBar (#8639) 2 years ago