This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- fallback if there's no source for reference pages | |
-- gives the actual number of pages in the status bar page_progress & page_left_book instead of a label | |
local ReaderFooter = require("apps/reader/modules/readerfooter") | |
local ReaderPageMap = require("apps/reader/modules/readerpagemap") | |
local userpatch = require("userpatch") | |
local footerTextGeneratorMap = userpatch.getUpValue(ReaderFooter.applyFooterMode, "footerTextGeneratorMap") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- enhance compact items: | |
-- use the better frontlight icons, and add the battery percentage | |
-- better separator for title/chapter/author in compact mode with no separator | |
local ReaderFooter = require("apps/reader/modules/readerfooter") | |
local userpatch = require("userpatch") | |
local footerTextGeneratorMap = userpatch.getUpValue(ReaderFooter.applyFooterMode, "footerTextGeneratorMap") | |
local symbol_prefix = userpatch.getUpValue(footerTextGeneratorMap.frontlight, "symbol_prefix") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MOVED TO https://github.com/sebdelsol/KOReader.patches | |
-- based on https://gist.github.com/IntrovertedMage/d759ff214f799cfb5e1f8c85daab6cae | |
-- Menu added in the Reader menu: | |
-- settings > Status bar > Progress bar > Thickness, height & colors > Read color | |
-- settings > Status bar > Progress bar > Thickness, height & colors > Unread color | |
local Blitbuffer = require("ffi/blitbuffer") | |
local Math = require("optmath") | |
local ProgressWidget = require("ui/widget/progresswidget") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local GEMINI_API_KEY = "here is my key" | |
local MY_LANGUAGE = "English" | |
local CONFIGURATION = { | |
-- Choose your preferred AI provider: "anthropic", "openai", "gemini", "openrouter", "deepseek" or "ollama" | |
provider = "gemini", | |
-- Provider-specific settings | |
provider_settings = { | |
anthropic = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- NEED at least v2025-04-52 ! | |
local ReaderFooter = require("apps/reader/modules/readerfooter") | |
local util = require("util") | |
local logger = require("logger") | |
local FooterCurrentPresetSetting = "footer_current_preset" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- KOReader userpatch to show info in the file manager title bar | |
-- based on https://gist.github.com/hius07/c53bc1ed00e0490cb1a0709c5ed6e735#file-2-fm-title-info-lua | |
-- Menu added in the File browser menu (1st icon) to change all the settings and rearrange the items in the title bar | |
-- Items added: Custom text, Brightness Level, Warmth Level, Up time, Time spent awake, Time in suspend | |
-- Settings added: Auto refresh clock, Custom separator, Number of spaces around separator, Show wifi when disabled, Show frontlight when off, Show path | |
-- Fix screen rotation (path was disappearing) | |
-- Arrange items reorders the items the menu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
local BD = require("ui/bidi") | |
local Blitbuffer = require("ffi/blitbuffer") | |
local Device = require("device") | |
local Geom = require("ui/geometry") | |
local Math = require("optmath") | |
local ProgressWidget = require("ui/widget/progresswidget") | |
local ReaderFooter = require("apps/reader/modules/readerfooter") | |
local ReaderToc = require("apps/reader/modules/readertoc") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- Add 4 new options @ the end of the "Sleep screen" menu : | |
-- Close widgets before showing the screensaver | |
-- Refresh before showing the screensaver | |
-- Message do not overlap image | |
-- Center image | |
-- By default it doesn't change the sleep screen behavior |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- **MOVED to https://github.com/sebdelsol/KOReader.patches** | |
-- Youd need a version >= v2025.04-12 to be able to show the screen saver's info message | |
local InfoMessage = require("ui/widget/infomessage") | |
local Math = require("optmath") | |
local ReaderUI = require("apps/reader/readerui") | |
local Screensaver = require("ui/screensaver") | |
local UIManager = require("ui/uimanager") | |
local _ = require("gettext") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import threading | |
from typing import Any, Callable, Self | |
from mitmproxy import http | |
from mitmproxy.addons import default_addons, script | |
from mitmproxy.master import Master | |
from mitmproxy.options import Options |
NewerOlder