View Single Post
Old 09-04-2021, 04:05 PM   #15
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,762
Karma: 731681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2021-09-04_21-56-13.png
Views:	152
Size:	394.5 KB
ID:	189107  

Last edited by Frenzie; 09-04-2021 at 04:22 PM.
Frenzie is offline   Reply With Quote