Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2026, 03:17 PM   #1
gillesit
Enthusiast
gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.gillesit shines like a glazed doughnut.
 
Posts: 37
Karma: 8788
Join Date: Nov 2014
Location: Italy
Device: Kobo AuraOne
Delete all bookmarks from an ebook

Hi, I've been using KoReader for a while now and I'm looking for a patch/plugin that can reset all bookmarks for a specific book in a single command. Thanks.
gillesit is offline   Reply With Quote
Old 04-03-2026, 03:40 PM   #2
Gormagon
monstrous mythical beast
Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.Gormagon ought to be getting tired of karma fortunes by now.
 
Gormagon's Avatar
 
Posts: 119
Karma: 4504294
Join Date: May 2023
Location: Klopstokia
Device: Tab Ultra C, Meebook P78 Pro, Viwoods AIPaper Reader, various NXTPAPER
You can just delete the sdr folder for the book in a file browser like Total Commander if you're using Android. Or you just delete the metadata.epub(or pdf depending on the file).lua file in that folder.
In a test the bookmarks for the one book vanished after deleting the sdr folder.
The bookmarks also disappeared in the Bookmark Browser in KOReader.

But beware: the reading progress of that book disappears too in KOReader as does specific layout adjustments just for this book. Assuming you've finished this book you can just open it and go to the last page, so it's fully read again for KOReader.
The book still appears in the history though.
Gormagon is online now   Reply With Quote
Advert
Old Yesterday, 12:53 PM   #3
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 596
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by gillesit View Post
Hi, I've been using KoReader for a while now and I'm looking for a patch/plugin that can reset all bookmarks for a specific book in a single command. Thanks.
Code:
local ConfirmBox = require("ui/widget/confirmbox")
local IconButton = require("ui/widget/iconbutton")
local ReaderBookmark = require("apps/reader/modules/readerbookmark")
local Screen = require("device").screen
local UIManager = require("ui/uimanager")
local _ = require("gettext")

local DGENERIC_ICON_SIZE = G_defaults:readSetting("DGENERIC_ICON_SIZE")

local function remove_all(bookmark, bm_menu)
if #bookmark.ui.annotation.annotations == 0 or bookmark.ui.highlight.select_mode then
return
end
UIManager:show(ConfirmBox:new({
text = _("Remove all bookmarks?"),
ok_text = _("Remove"),
ok_callback = function()
for i = #bookmark.ui.annotation.annotations, 1, -1 do
local item = bookmark.ui.annotation.annotations[i]
if item.drawer then
bookmark.ui.highlight:deleteHighlight(i)
else
bookmark:removeItemByIndex(i)
end
end
bookmark:updateBookmarkList({}, 1)
end,
}))
end

local function add_titlebar_button(bookmark, bm_menu)
local title_bar = bm_menu.title_bar
if not title_bar or title_bar._select_all_delete_button then
return
end
local right_button = title_bar.right_button
if not right_button then
return
end
local right_icon_size = Screen:scaleBySize(DGENERIC_ICON_SIZE * title_bar.right_icon_size_ratio)
right_button.padding_left = title_bar.button_padding
right_button:update()
local button = IconButton:new({
icon = "delete_bookmarks",
width = right_icon_size,
height = right_icon_size,
padding = title_bar.button_padding,
padding_left = title_bar.button_padding,
padding_right = title_bar.button_padding,
padding_bottom = right_icon_size,
overlap_offset = { 0, 0 },
callback = function()
remove_all(bookmark, bm_menu)
end,
allow_flash = false,
show_parent = title_bar.show_parent,
})
local right_size = right_button:getSize()
local button_size = button:getSize()
local gap = 20
local x = title_bar.width - right_size.w - button_size.w - gap
local y = math.floor((right_size.h - button_size.h) / 2)
button.overlap_offset = { x, y }
table.insert(title_bar, button)
title_bar._select_all_delete_button = button
end

local orig_onShowBookmark = ReaderBookmark.onShowBookmark
function ReaderBookmark:onShowBookmark(...)
local ok = orig_onShowBookmark(self, ...)
local bm_menu = self.bookmark_menu and self.bookmark_menu[1]
if not bm_menu then
return ok
end
add_titlebar_button(self, bm_menu)
return ok
end
Found it somewhere. It generates a button in Bookmarks to delete all. The icon does not show up properly though.
nqk is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete bookmarks when in Coolreader? PKFFW OpenInkpot 2 07-19-2011 06:47 PM
Delete All Bookmarks? emt PocketBook 17 05-30-2010 08:05 AM
PRS-300 Delete all bookmarks? markj126 Sony Reader 3 04-18-2010 10:45 AM
Delete Bookmarks on 700 Palladin Sony Reader 11 12-18-2008 02:43 PM
can't figure out how to delete old bookmarks sthapit Sony Reader 9 06-27-2007 01:40 PM


All times are GMT -4. The time now is 09:38 AM.


MobileRead.com is a privately owned, operated and funded community.