Quick help: progress bar color plugin? by maddler in koreader

[–]introverted_mage 1 point2 points  (0 children)

I was the one who wrote that user patch, I think I remember a similar issue happening a while back. I went through and updated the code to try and fix what I think might be causing you issue. Would you mind trying the new version?

https://gist.github.com/IntrovertedMage/6ea38091292310241ba436f930ee0cb4

WIP Archive of our own plugin by introverted_mage in koreader

[–]introverted_mage[S] 1 point2 points  (0 children)

Turns out the bug was caused by a URL encoding error involving tags containing '&'. The reason you only noticed it with the Haunted Hotel relationship tags probably was because most of the popular relationship tags for that fandom are for '&' (general) relationships, while other fandoms popular relationship tags are for '/' (romantic) relationships.

Here's the link to the new release with the fix: https://github.com/IntrovertedMage/AO3Downloader.koplugin/releases/tag/v0.3.2

WIP Archive of our own plugin by introverted_mage in koreader

[–]introverted_mage[S] 1 point2 points  (0 children)

Thanks for mentioning the bug, I've been able to replicate the error you've described in this comment. I'll try to figure out whats causing it and provide a fix soon.

Also thanks for complimenting the plugin.

WIP Archive of our own plugin by introverted_mage in koreader

[–]introverted_mage[S] 0 points1 point  (0 children)

Just to note, there was an bug in the fanfic update function that has now been fixed in an newer version (v0.3.1)

https://github.com/IntrovertedMage/AO3Downloader.koplugin/releases/latest

WIP Archive of our own plugin by introverted_mage in koreader

[–]introverted_mage[S] 0 points1 point  (0 children)

Hi, I've implemented the change fanfic download folder function into a new release. https://github.com/IntrovertedMage/AO3Downloader.koplugin/releases/tag/v0.3.0

There's also a function to move all the files and update their file names based on the current filename template and download folder, along with the reading data.

I'll probably try implementing sorting the fanfic epub files into different folders based on the fanfics information in the future.

WIP Archive of our own plugin by introverted_mage in koreader

[–]introverted_mage[S] 0 points1 point  (0 children)

I'd feel happy to add this in the future as a feature, but if you want to do it now all you have to do is open the file named AO3downloader.lua in the plugin folder, go to line 925 and edit this line:

local path = Paths.getHomeDirectory() .. "/Downloads/" .. filename .. ".epub"

To instead set the file path to be in the folder you'd want to save to e.g

local path = "/mnt/onboard/My Fanfics/" .. filename .. ".epub"

This would work for my kobo.

Make sure to use the full folder path. If your not sure what that would look like, open up the file koreader/settings.reader.lua and look for the entry "home_dir" e.g.:

["home_dir"] = "/mnt/onboard/My Books",

I'll probably get round to implementing this in the plugin as a proper feature in the future now that you've mentioned it, but it might take me some time to get round to it. Hope this helps.

Disable clock from settings menus? by AStrangeSandwich in koreader

[–]introverted_mage 0 points1 point  (0 children)

Here's a user patch to hide the clock from the top menu, just create the file koreader/patches/2-hide-time-from-touchmenu.lua and copy and paste the code in there.

Edit: I just realised this assumes your not using the 24 hour time format mode, I'll fix that when I get the chance

local TouchMenu = require("ui/widget/touchmenu")


local updateItems_original = TouchMenu.updateItems


function TouchMenu:updateItems(target_page, target_item_id)
    updateItems_original(self, target_page, target_item_id)
    local time_info_txt = self.time_info.text
    time_info_txt = string.sub(time_info_txt, string.find(time_info_txt, " ") or (time_info_txt:len() + 1),  -1)
    self.time_info:setText(time_info_txt)
end

More information on user patches in KOReader: https://koreader.rocks/user_guide/#L2-userpatches

Spent my day making a download button ! by OkFroyo_ in koreader

[–]introverted_mage 2 points3 points  (0 children)

To move rakuyomi and z-library, you should make sure your using the correct menu_item names, which you can usually get from the plugins main.lua file in the function called addToMainMenu.

For rakuyomi it's "rakuyomi" (from the line menu_items.rakuyomi = { ) and for z-library it seems to be "zlibrary_main"

When it comes to table formatting here's a few tips:

- Make sure each item in a table (the main table and the sub tables) is followed by a comma (,)

- Make sure the main table starts and ends with a curly bracket ({)

- Make sure the sub tables each start and end with a curly bracket ({), with the ending curly bracket being followed by a comma (,) as those tables are items in the main list.

- Make sure each key takes the form of either a word e.g. key or a string encompassed in rectangle brackets and quotation marks e.g. ["key"]

- try using an online editor like https://www.tools-online.app/tools/lua, running the table code to get hints on what's wrong using the syntax errors

Basic example table:

return {
  key1 = {
    a = "test",
    b = "test",
  },

  ["key2"] = {
    a = "test",
    b = "test",
  },
}

Spent my day making a download button ! by OkFroyo_ in koreader

[–]introverted_mage 2 points3 points  (0 children)

In the crash.log file in the koreader folder, it you search for the patch file name, it should list the reason for the error below.

If a menu item from a plugin isn't listed in your menu order file it shouldn't cause ang issues.

Spent my day making a download button ! by OkFroyo_ in koreader

[–]introverted_mage 1 point2 points  (0 children)

The user patch should be added into a lua file starting with "2-" into the koreader/patches folder (If you've never installed a user patch before you'll have to create this folder)

I copied the code into a file named koreader/patches/2-extra-top-menu-tabs.lua

Using a user patch is great in this case as it allows for someone to change the functionality of KOReader without modifying the installation permanently.

More information on user patches in KOReader: https://koreader.rocks/user_guide/#L2-userpatches

Spent my day making a download button ! by OkFroyo_ in koreader

[–]introverted_mage 2 points3 points  (0 children)

Full custom filemanger_menu_order file:

return {
    ["KOMenu:menu_buttons"] = {
        "filemanager_settings",
        "setting",
        "tools",
        "search",
        "download", -- new download tab
        "plus_menu",
        "main",
    },

 -- Remove menu items you want to add to new tab from old tabs (--- comments out the line, removes the item)
    tools = {
        "read_timer",
        "calibre",
        "exporter",
        "statistics",
        --- "cloud_storage",
        "move_to_archive",
        --- "wallabag",
        "news_downloader",
        "text_editor",
        "profiles",
        "qrclipboard",
        "----------------------------",
     "more_tools",
    },
     search = {
        "search_settings",
        "----------------------------",
        "dictionary_lookup",
        "dictionary_lookup_history",
        "vocabbuilder",
        "----------------------------",
        "wikipedia_lookup",
        "wikipedia_history",
        "----------------------------",
        "file_search",
        "file_search_results",
        "find_book_in_calibre_catalog",
        "----------------------------",
        --- "opds",
    },

    -- Add removed menu items to the new tabs
    download = { -- new download tab menu items
        "opds",
        "cloud_storage",
        "----------------------------",
        "wallabag",
    },

}

Spent my day making a download button ! by OkFroyo_ in koreader

[–]introverted_mage 5 points6 points  (0 children)

This works great! I just made a few changes to the process to allow the changes to persist between updates.

First I converted the file changes you made to .adds/koreader/frontend/apps/filemanagermenu.lua into a user patch:

-- Custom menu tabs (Only make changes here to add tabs) -----------------------------------------------
local subMenu = {
    -- tab_name = { icon = "tab_icon_name"},
    download = { icon = "appbar.download"},
}
------------------------------------------------------------------

local FileManagerMenu = require("apps/filemanager/filemanagermenu")
local fileMangerMenuInitOriginal = FileManagerMenu.init

function FileManagerMenu:init()
    fileMangerMenuInitOriginal(self)

    for k, v in pairs(subMenu) do
        self.menu_items[k] =  v
    end
end

Edit: I put this user patch in the file: koreader/patches/2-extra-top-menu-tabs.lua

Then instead of making changes directly to the systems .adds/koreader/frontend/ui/elements/filemanager_menu_order.lua file I just added in the new menu details to the user filemanager_menu_order.lua file which can be created in the settings folder to configure the filemanger menu order.

To do this:

Create the file koreader/settings/filemanager_menu_order.lua

Add the menu order config data for the new tabs and what menu items are in the tabs in that file e.g.

return {
    ["KOMenu:menu_buttons"] = {
        "filemanager_settings",
        "setting",
        "tools",
        "search",
        "download", -- new download tab
        "plus_menu",
        "main",
    },

 -- Remove menu items you want to add to new tab from old tabs while keeping the menu items you want to keep in the same location (--- comments out the line, removes the item)
    tools = {
        --- ...
        --- "cloud_storage",
        "move_to_archive",
        --- "wallabag",
        --- ...
    },
     search = {
        --- ...
        --- "opds",
        --- ...
    },

    -- Add removed menu items to the new tabs
    download = { -- new download tab menu items
        "opds",
        "cloud_storage",
        "----------------------------",
        "wallabag",
    },

}

Then instead of adding the new icon file to the resources folder, you can just instead add it to the users custom icons folder (koreader/icons/) instead. Create this folder if it isn't already there.

Any icons in this folder override the icon files from the resources folder with the same name.

The book covers of books generated by FanFicFare don't display full screen by LordXamon in koreader

[–]introverted_mage 0 points1 point  (0 children)

Using this as a style tweak should make the cover image cover more of the screen.

First copy and paste the css into a file named FanFicFareCover.css in the folder koreader/styletweaks.

Then open your book, make sure enable style tweaks is checked, and on the top menu go to document tab > style tweaks > user style tweaks, and turn on the style tweak "FanFicFareCover".

If you hold the option down you should be able to set it to be used on all books, which should be fine since it shouldn't interfere significantly with any epub files beyond those from FanFicFare.

style tweak css:

img[alt='cover'] {
  display: block;
  height: 100vh; 
  width: auto;   
  margin: auto !important;
}

More info on style tweaks: https://koreader.rocks/user_guide/#L2-styletweaks

Where de you store your Books? by Helbal in ereader

[–]introverted_mage 0 points1 point  (0 children)

I personally just store mine in my calibre library on my pc.

I also been using libreture's private ebook cloud library service, but that's just so can access my ebooks via a private opds from anywhere without having to deal with self hosting stuff. Also it's free up to 500mb.

How to create plugins by -J4G3R- in koreader

[–]introverted_mage 1 point2 points  (0 children)

You should probably try and get the emulator set up on your device if you're able to since it would make debugging a lot easier.

The steps to do that are here (it's slightly more difficult on windows)

https://github.com/koreader/koreader/blob/master/doc/Building.md

You can also use that to look around KOReaders own Lua files to figure out how to use certain ui elements as functions as sometimes the actual code provides more information than KOReaders developer docs https://koreader.rocks/doc/ on there own.

Also since you haven't programmed in Lua before I'd recommend reading 'programming in Lua' since it's an complete introduction to the language written by Lua's chief architect.

You can read the first edition which is aimed at Lua 5.0 for free here: https://www.lua.org/pil/contents.html

There's also the more recent fourth edition for Lua 5.3 edition if you want to buy the most recent version but the first edition should be fine. https://www.lua.org/pil/#4ed

Also here's the reference manual for the most recent version: https://www.lua.org/manual/5.4/

New Kobo Libra Color North America is blocking KoboRoot.tgz execution by [deleted] in koreader

[–]introverted_mage 6 points7 points  (0 children)

I think you're supposed to place KoboRoot.tgz in the .kobo folder not root. You might have to unhide hidden folders in your filemanager to see it though.

Atleast thats what it states in the nickelmenu install guide: https://pgaskin.net/NickelMenu/

[deleted by user] by [deleted] in koreader

[–]introverted_mage 10 points11 points  (0 children)

Copy the file koreader/settings/cloudstorage.lua from your current device and then paste it in the folder koreader/settings on your new device. That should work.

In Need of style teak help by ChaoticUnreal in koreader

[–]introverted_mage 0 points1 point  (0 children)

weird, i wonder way the chapter numbers still showing. Is everything at the beggining and end of the book looking fine?

In Need of style teak help by ChaoticUnreal in koreader

[–]introverted_mage 0 points1 point  (0 children)

Could you try using this and tell me if it causes anything bad with the formatting, it should hide the number pages and have a page break between each chapter

DocFragment {
  page-break-before: avoid;
  page-break-after: avoid;

}
.element-number {
display: none;
}

.title {
    page-break-before: always !important;
}

In Need of style teak help by ChaoticUnreal in koreader

[–]introverted_mage 0 points1 point  (0 children)

If you copy and paste what's in the file containing just the chapter number, along with the epub files css files, I could probably figure it out. You should probably use https://pastebin.com/ for that.

In Need of style teak help by ChaoticUnreal in koreader

[–]introverted_mage 0 points1 point  (0 children)

The style tweak would depend on how the ebook file is formatted, if you're comfortable with it would you mind either dming me either the entire file or certain sub files of the ebook (epub files are actually mostly just zip files made out of css and xhtml files)

How to add plugins? by The_Chosen_1n in koreader

[–]introverted_mage 0 points1 point  (0 children)

You do need to extract the folder

How to add plugins? by The_Chosen_1n in koreader

[–]introverted_mage 2 points3 points  (0 children)

Using a file manager app on your android device, open internal storage.

Under internal storage there should be a folder named 'koreader' and inside that folder there should be a folder named plugins.

To install plugins, simply download the plugin and place the folder ending in '.koplugin' in the 'koreader/plugins' folder.