hius07

Results 641 comments of hius07

Try this (put your my_md.lua to the template folder). ```Lua local userpatch = require("userpatch") userpatch.registerPatchPluginFunc("exporter", function(Exporter) local Exporter_init = Exporter.init function Exporter:init() Exporter_init(self) local export = self.targets.markdown.export local _, idx...

my_md.lua is a copy of the original md.lua with some changes in formatting, right?

> my custom exporter code to _patches/template/my_md.lua_ Sorry, I was on mobile and missed this point. my_md.lua should be put to `koreader\plugins\exporter.koplugin\template\`. Or you can set other location in line...

Good! Maybe a little bit simpler ```Lua local md, idx = userpatch.getUpValue(export, "md") local formatters = md.formatters md.prepareBookContent = function(book, formatting_options, highlight_formatting) -- end userpatch.replaceUpValue(export, idx, md) ```

Both use the same template/md.lua. The patch patches the Markdown export to use custom template. NextCloud still uses the original one.

Try to change the line in the above patch ```Lua local export = self.targets.nextcloud.export ```

Not as automized as position syncing, but may be useful. https://github.com/koreader/koreader/pull/13372

Already in the nightly build: https://build.koreader.rocks/download/nightly/v2024.11-230-gcfbb676d7_2025-03-10/

If you mean the statistics, highly unlikely, you do not open a book when streaming.