dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
737 stars 139 forks source link

AO3 Single Chapter Stories in Series #1555

Closed Demaar closed 2 weeks ago

Demaar commented 1 month ago

Describe the bug When Using WebToEpub on a Series page, it lists the chapters of all the stories that are part of the Series in order. Stories that have only one chapter, however, are Ignored completely.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'The Fundamental Essence of Villainy'
  2. Click on the WebToEpub extension.
  3. See that only chapters from Multi-Chapter Stories are Shown.

Expected behavior For all chapters to be listed.

Desktop (please complete the following information):

Additional context More Examples: 10 Works, All One chapter except one with Three which is all that shows up. Three Works, All One chapter, None of them show up

dteviot commented 1 month ago

@Demaar

In my defense, this use case is outside WebToEpub's original design intent.

  1. These are series pages. WebToEpub was intended to pack on a per story basis. So, the intent was you'd go to page for each story and collect the chapters. The idea that someone would create a Story as a Series didn't occur to me. The fact that it works at all for series pages was not originally intended.
  2. WebToEpub also didn't try to handle case of Story with a single chapter. Because for that case, you could just download the page. Not to mention, Single Chapter stories have a different format to Multi-Chapter stories, so more work for me to do.
  3. I've been tempted to remove support for A03, because the site now supports downloading stores as Epubs.
  4. That said, site seems to have make same assumption as I did about Story vs Series. I don't see a way on site to download an entire series as an epub. So, it makes sense to add that functionality.

Anyway, I've added proper support for series pages now.

Test versions for Firefox and Chrome have been uploaded to https://github.com/dteviot/WebToEpub/releases/tag/developer-build. 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:

Notes

Demaar commented 1 month ago

Works so far for me. Issues:

  1. W2E can't find the Author when downloading a series and as such just gives [unknown].
  2. The chapter numbers. The Single-Chapters are not numbered while the Multi-Chapters are. An option to disable the numbering would be nice at least.
dteviot commented 1 month ago

@Demaar

W2E can't find the Author when downloading a series and as such just gives [unknown].

Fixed

The Single-Chapters are not numbered while the Multi-Chapters are

That's how the chapters are on site. Stories have different layout depending on number of chapters.

An option to disable the numbering.

Not happening. If it really bothers you, feel free to use the following EpubEditor https://github.com/dteviot/EpubEditor script to remove the chapter numbering from the created epub.

let toChange = [...dom.querySelectorAll(".title")];
for(let s of toChange) {
    console.log(s);
    s.querySelector("a")?.remove();
    s.textContent = s.textContent.replace(":", "");
}
return 0 < toChange.length;

Test versions for Firefox and Chrome have been uploaded to https://github.com/dteviot/WebToEpub/releases/tag/developer-build. 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:

Notes Time taken: 177 minutes (total)

dteviot commented 2 weeks ago

@Demaar

Updated version (1.0.1.0) has been submitted to Firefox and Chrome stores. Firefox version is available now. Chrome might be available in a few hours (typical) to 21 days.