|
|
#1 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#2 |
|
monstrous mythical beast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 596
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
Quote:
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
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
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 |