Quote:
Originally Posted by sbaguz
Thanks, I will test it. 
But, as far as I understand, it's a true converter. I mean: somewhere I will find a xxx.html file generated from my stored xxx.md file. Correct?
|
You're correct
Quote:
Originally Posted by sbaguz
I was thinking about something working under the hood and simply rendering the original file without creating a new one (or at least in a temporary way only).
|
That's actually more involved
Each type of document can be opened with one or more "viewers". I'm quoting viewers because they can be whatever, from simple things built on top of available widgets (like
htmlboxwidget.lua) to wrappers to full engine backends like crengine, mupdf or djvulibre.
"Viewers" share in common that they need to be added to a documentRegistry, so the program knows which type of files a given viewer supports.
In the case of markdown files, there're currently 2 "viewers": CREngine and the text editor plugin (see attachments).
You can wrap you own widget based on htmlboxwidget and handle md documents with it. In that case you can do conversion on the fly, without storing the html in a cache file. That should work for little files, but don't expect to convert the Bible in a Kobo Mini on the fly.
My suggestion, if you go that route, is checking the file size of the document you want to render, doing on the fly conversion until a certain size and using a cache file for larger documents.
Anyways, you can look at the code in
https://github.com/koreader/koreader...ntend/document
Have fun