Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2021, 11:34 PM   #16
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
Quote:
Originally Posted by Frenzie View Post
The links to footnotes look like this:
Code:
<a href="part0025.html#mah0002108" id="mah0004586" class="calibre5"><sup class="EBsup">1</sup></a>
The footnote looks like this:
Code:
<p id="mah0002107" class="footnotes"><a href="part0015.html#mah0004586" id="mah0002108" class="calibre5"><sup class="EBsup">1</sup></a><em class="calibre7">Rwywbbh</em> huive zh lof. Bcq ozllz md Upqdn coxcvk ewyd ks Oyoun ucl gicp pqsottdyv dy Zdyfxgp 32 (Vggsbg 5).</p>
It will show up as a footnote if you move that ID attribute from the A element over to its parent P element:
Code:
<p id="mah0002108" class="footnotes"><a href="part0015.html#mah0004586" class="calibre5"><sup class="EBsup">1</sup></a><em class="calibre7">Rwywbbh</em> huive zh lof. Bcq ozllz md Upqdn coxcvk ewyd ks Oyoun ucl gicp pqsottdyv dy Zdyfxgp 32 (Vggsbg 5).</p>
Unfortunately I'm not sure if there's an easy way to automate that, and there are hundreds of footnotes.

There's probably something available in Node for example that'd allow you to write out a new file after performing a transformation like this
Code:
const footnotes = document.getElementsByClassName('footnotes');
// for each footnote
footnote.setAttribute('id', footnote.firstChild.getAttribute('id'));
Or as a regular expression, something along the lines of:
Code:
<p id="([a-z0-9]*)" class="footnotes"><a href="[a-z0-9]*\.html#[a-z0-9]*" id="([a-z0-9]*)"
And then you have to replace the first group by the second group…

The second would probably be easier to do, but either way I'm not sure if there's a user-friendly way to do it. Suggestions on nice GUI apps welcome.
I don't understand the second way, but I understand the first way like this (picture 1):

Copy red underline from <a, replace yellow underline of <p with it and delete the X red, then we have <p with blue underline. This one will show in-page footnotes.

Since I notice the red underline of <a exists in <p as well, I can just cut red underline of <p and replace yellow underline of <p with it, then we have the same final <p with blue underline (picture 2). This way we don't have to look at <a at all. Are these all right?
xversion1 is offline   Reply With Quote
Old 09-05-2021, 02:32 AM   #17
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
@poire-z Mentioned that it'll suffice to remove the ID from the P. But I'd already expanded on my regex above. Luckily it didn't take very long.

For example, here in the calibre ebook editor:

Find:
Code:
<p id="([a-z0-9]*)"( class="footnotes?"><a href="[a-z0-9]*\.html#[a-z0-9]*" id="([a-z0-9]*)")
Replace:
Code:
<p \3\2
Mode: regex
All text files

Quote:
Originally Posted by xversion1 View Post
Are these all right?
I think that's correct, yes. The only problem is you don't want to be doing that 600 times.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2021-09-05_08-28-03.jpg
Views:	119
Size:	825.7 KB
ID:	189118   Click image for larger version

Name:	Screenshot_2021-09-05_08-33-10.png
Views:	124
Size:	372.1 KB
ID:	189120  
Attached Files
File Type: epub The Mahabharata_ Volume 6 - Bibek Debroy_scrambled-fix.epub (2.53 MB, 115 views)

Last edited by Frenzie; 09-05-2021 at 02:35 AM.
Frenzie is offline   Reply With Quote
Advert
Old 09-05-2021, 03:27 AM   #18
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
Quote:
Originally Posted by Frenzie View Post
@poire-z Mentioned that it'll suffice to remove the ID from the P. But I'd already expanded on my regex above. Luckily it didn't take very long.

For example, here in the calibre ebook editor:

Find:
Code:
<p id="([a-z0-9]*)"( class="footnotes?"><a href="[a-z0-9]*\.html#[a-z0-9]*" id="([a-z0-9]*)")
Replace:
Code:
<p \3\2
Mode: regex
All text files

I think that's correct, yes. The only problem is you don't want to be doing that 600 times.
Wonderful! Thanks!
But I don't know why this trick doesn't work on chapter titled "Mvouhvv Igvsj-Kamq" (can only find it using Ctrl+F, the table content doesn't show the same name). Ironically, it's where I'm reading.

Edit: I found the reason. The <a... of this chapter goes like this:
Quote:
<a href="part0012_split_000.html#mah0003088"
They have a special character "_" so "a-z0-9" doesn't include it. I just add "_" (like this "a-z0-9_"). I know I just got lucky that it happens to be right. Could you please show me how to get all characters in the search so next time I won't miss anything?

Last edited by xversion1; 09-05-2021 at 04:03 AM.
xversion1 is offline   Reply With Quote
Old 09-05-2021, 04:22 AM   #19
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Probably something like this:
Code:
<p id="([^"]*)"( class="footnotes?"><a href="[^"]*" id="([^"]*)")
(i.e., match everything but ")
Frenzie is offline   Reply With Quote
Old 09-05-2021, 05:18 AM   #20
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
Quote:
Originally Posted by Frenzie View Post
Probably something like this:
Code:
<p id="([^"]*)"( class="footnotes?"><a href="[^"]*" id="([^"]*)")
(i.e., match everything but ")
Thanks!
xversion1 is offline   Reply With Quote
Advert
Old 09-07-2021, 01:04 AM   #21
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
There's another strange problem. After I did what Frenzie said, which is this:
Quote:
Find:
Code:
Quote:
<p id="([a-z0-9]*)"( class="footnotes?"><a href="[a-z0-9]*\.html#[a-z0-9]*" id="([a-z0-9]*)")
Replace:
Code:
Quote:
<p \3\2
Mode: regex
All text files
There were other notes that didn't affect as I said above. So I did this to the Frenzie's code (as I said):
Quote:
Edit: I found the reason. The <a... of this chapter goes like this:
Quote:
<a href="part0012_split_000.html#mah0003088"
They have a special character "_" so "a-z0-9" doesn't include it. I just add "_" (like this "a-z0-9_"). I know I just got lucky that it happens to be right. Could you please show me how to get all characters in the search so next time I won't miss anything?
When I copy the book into Koreader via wifi, the first time I open it everything seems fine, the notes appear well. But if I go back to Folder and re-open it, from that point the book's format broken, text-align changes, table content gone, notes don't show, etc.
This is a strange behavior (first open OK, second open everything broken). I tested several times to make sure it's not something happens when the book being sent. I don't hope to fix this one. I think it's not easy as the original problem. I just think I should inform it just in case.
Here's the book: https://www.mediafire.com/file/hltg9...ange.epub/file

Last edited by xversion1; 09-07-2021 at 01:07 AM.
xversion1 is offline   Reply With Quote
Old 09-08-2021, 04:07 AM   #22
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Thanks! That'll be fixed in https://github.com/koreader/crengine...c5d057156826a9

See https://github.com/koreader/koreader...ment-914061568
Frenzie is offline   Reply With Quote
Old 09-08-2021, 08:58 AM   #23
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
Quote:
Originally Posted by Frenzie View Post
I'm not sure I understand what in these links but I guess the issue exists because the book is too long, and it seems to be fixed in the next update?
xversion1 is offline   Reply With Quote
Old 09-08-2021, 09:20 AM   #24
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
The cache failed to do the same thing as the regular code for that specific scenario.
Frenzie is offline   Reply With Quote
Old 09-10-2021, 06:13 AM   #25
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
1. As far as the footnotes are concerned, I noticed that you have 1204 "footnote" and 7 "footnotes". Is there any reason for this?

2. I also got report about backlink broken link for example for this chapter (the same for each of the 1204 + 7 footnote(s)). You should check what it's all about.

Code:
Processing part0020.html ...
"footnote" class found in part0020.html.
Chapter backlink broken [fn ref in other file not found]: mah0000116!
Chapter backlink broken [fn ref in other file not found]: mah0000117!
Chapter backlink broken [fn ref in other file not found]: mah0000119!
Chapter backlink broken [fn ref in other file not found]: mah0000121!
Chapter backlink broken [fn ref in other file not found]: mah0000122!
Chapter backlink broken [fn ref in other file not found]: mah0000123!
Chapter backlink broken [fn ref in other file not found]: mah0000154!

Last edited by roger64; 09-10-2021 at 06:20 AM.
roger64 is offline   Reply With Quote
Old 09-10-2021, 11:34 AM   #26
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by roger64 View Post
1. As far as the footnotes are concerned, I noticed that you have 1204 "footnote" and 7 "footnotes". Is there any reason for this?
[/CODE]
That's why I wrote footnotes? in the regex. I noticed it too. footnotes is used for the first footnote (per chapter) and footnote for all the following footnotes iirc.

tl;dr It's just badly structured. Having a container around the footnotes with class footnotes would make sense, this does not.
Frenzie is offline   Reply With Quote
Old 09-17-2021, 08:41 AM   #27
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
@Frenzie
Is there any way I can apply a quick fix format broken issue? Can't wait for update. Now it happens to even the unfixed file. I have to delay reading since I can't see notes anymore.
xversion1 is offline   Reply With Quote
Old 09-17-2021, 03:56 PM   #28
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
In the hamburger menu (top right) → update you can set the channel to develop and then update, or you can download the nightly build yourself from http://build.koreader.rocks/download/nightly/
Frenzie is offline   Reply With Quote
Old 09-17-2021, 09:05 PM   #29
xversion1
Enthusiast
xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.xversion1 ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 4245188
Join Date: Nov 2019
Device: Kindle
Quote:
Originally Posted by Frenzie View Post
In the hamburger menu (top right) → update you can set the channel to develop and then update, or you can download the nightly build yourself from http://build.koreader.rocks/download/nightly/
Done and it works. I can come back to stable version anytime I want just using the hamburger menu, can't I?

Last edited by xversion1; 09-18-2021 at 12:16 AM.
xversion1 is offline   Reply With Quote
Old 09-18-2021, 03:47 AM   #30
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Depends a bit on how you define back. You can't downgrade, but if you put it back to stable it won't offer to upgrade until the next one's released.

Anyway, the nightly you just installed should be identical to 2021.09 for all intents and purposes.
Frenzie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
landscape set to show 2 pages but page turns still at 1 page at a time badbob001 Server 3 07-22-2020 03:01 PM
Kindle doesnt show other files in library (epub...) nivekkumar Kindle Developer's Corner 1 02-10-2020 12:46 PM
Show difference between ePUB files LGN Sigil 12 01-02-2014 10:32 AM
ePub conversion not adding page breaks on separate HTML files neonbible Conversion 1 11-06-2012 11:36 AM
Solution: Cropping Double Page PDF Files into One-Page PDF files kgydkgyd PDF 4 06-06-2011 11:45 AM


All times are GMT -4. The time now is 04:16 PM.


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