Closed norabelle101 closed 1 year ago
@BonBon Please provide URL of page with translator's notes.
@dteviot
Ah I'm really sorry! Almost all their novels have translator's notes, but here's a novel URL that has many:
https://chrysanthemumgarden.com/novel-tl/gcf/
But specifically, as an example, these few chapters has translator's note (it can be found in the tooltip tag): https://chrysanthemumgarden.com/novel-tl/gcf/gcf-10/ https://chrysanthemumgarden.com/novel-tl/misvil/misvil-3/ https://chrysanthemumgarden.com/novel-tl/misvil/misvil-4/ https://chrysanthemumgarden.com/novel-tl/misvil/misvil-5/
Thank you!
@vanessabluellie Test versions for Firefox and Chrome have been uploaded to https://drive.google.com/drive/folders/1B_X2WcsaI_eg9yA-5bHJb8VeTZGKExl8?usp=sharing. Pick the one suitable for you, follow the "How to install from Source (for people who are not developers)" instructions at https://github.com/dteviot/WebToEpub/tree/ExperimentalTabMode#user-content-how-to-install-from-source-for-people-who-are-not-developers and let me know how it goes. Tested with:
For my notes: 19 minutes work
@dteviot
Hello! Thank you very much for the fix! It works really well! But I was wondering, is it perhaps not possible to also somehow make it so that WebToEpub will also not fetch the tags that come with every individual Translator's Note as well (in the chapter text)? Ah, but if this is not possible and too time-consuming, then that's okay! Just disabling the translator's notes is really good! Apologies again for the inconvenience and thank you very much!
@vanessabluellie
make it so that WebToEpub will also not fetch the tags that come with every individual Translator's Note as well
Please provide an example of what you mean.
@dteviot
Ah okay! So on the website itself, throughout a chapter, when a word or phrase has a Translator's Note, you'd need only to click on the word to make the Translator's Note appear overhead which is created by the tags. I would ordinarily be able to edit them out via Calibre, but the target number (e.g. Translator's Note) for each Translator's Note changes continuously (and totals in the hundreds). It's also not constant because it would become a different number each time the chapter is re-opened.
It looks like this on the source itself:
And this on the "page source":
But if this is not possible, then forget it ahah, it's only a little cumbersome but not a major inconvenience. Thank you very much again!
Those are <span> elements.
If I remove them, the text inside the elements will be removed.
This will result in bad text.
So, you presumably don't want these elements removed, just replaced with the text that's inside them.
Which is reasonably easy for me to do. (Testing that it works properly and doing the commit paperwork will be the time consuming bit.)
Note, I can probably give you a script that will let EpubEditor do this for any of your existing epubs, if you like.
That said, these are span elements, unless there's something in the stylesheet (and there isn't in the default one used by WebToEpub) then they have no effect. So why do you want them replaced?
Note, I'm not refusing to do this, I'm trying to understand why you want it done.
My mental model says, doing this will have no observable effect.
You're asking for this to be done, which says to me "there is an effect."
I'm trying to understand where the discrepancy is.
@dteviot
AH, I'm really sorry! You're completely correct that there is no observable effect at all to doing this. But since I edit the text in all my epubs (with the formatting and chapter text itself sometimes), I'm very particular with unnecessary tags even when I can't see them in the viewer because of how I kept going back and editing the same epubs continuously. I've spent hundreds of hours combing through them and deleting, so I'm just a little too picky ahah.
So, you presumably don't want these elements removed, just replaced with the text that's inside them.
For this, I'm a little confused? Does it mean to like delete the tags and replace it with the text that is encased inside the span tags, not the translator's note, but the actual chapter text being quoted in those translator notes? I think that's what I tried to do, albeit manually...
A script in EpubEditor to get rid of these span tags would be absolutely amazing (if the chapter text in really doesn't get deleted ahah), but if this is much too time-consuming, then that's completely okay! Apologies for taking up your time again! :D
@vanessabluellie Script you want is
let toChange = [...dom.querySelectorAll("span.tooltip-toggle")];
for(let s of toChange) {
s.replaceWith(s.textContent);
}
return 0 < toChange.length;
Instructions
Wait a little bit. Depending on your chrome settings you will either 5.1 Get a file dialog asking you for name to save the fixed epub, or 5.2 Modified epub will be saved.
For my notes: 25 minutes work. (Mostly test and write-up.)
@vanessabluellie This is what the EpubEditor was created for. Doing bulk edits to epubs, where Calibre's regex or search isn't quite up to the job.
@vanessabluellie This is what the EpubEditor was created for. Doing bulk edits to epubs, where Calibre's regex or search isn't quite up to the job.
AH, I see! Thank you so much!!! It worked perfectly!!!!! :D
Hello!
I'm really sorry for the inconvenience and bother, but I was just wondering if it was possible to create a "checkbox" option where the user can choose to not fetch the "Translator's Notes" from the site "https://chrysanthemumgarden.com/" as well as also not retrieving these html tags that appear with each individual footnote in the text.
Like this image below (from another site which has this option enabled):
There are many notes that are actually irrelevant to the text and are more so comments that sometimes total in the hundreds which are a bit inconvenient to delete one by one.
If this is too much trouble then that's completely okay too! Thank you very much again!