Aivean / royalroad-downloader

https://royalroad.com book downloader
MIT License
57 stars 4 forks source link

[Feature Request] Create a title page and link back to fiction page #30

Closed kekkoudesu closed 7 months ago

kekkoudesu commented 9 months ago

It would be useful to generate a title page with these details:

I mostly just wanted a link to get back to the fiction page.

Aivean commented 7 months ago

Implemented in https://github.com/Aivean/royalroad-downloader/releases/tag/v2.10.0

ZeeWanderer commented 3 months ago

The title page section needs chapter class like in #22 to appear in ToC post-conversion to epub. Changing "title" class to "chapter" sort of works, but because title and description are divided by 2 distinct h1/h2 tags they are treated as separate chapters. The chapter name is whatever in the h1/h2 tags. Maybe a good idea to instead put Title into the first h1 tag and make a link and image a paragraph content and then the same thing for description.

Something like this for the title

          <h1 class="chapter">
            Title
          </h1> <!-- link back to the fiction page -->
          <a href="https://www.royalroad.com/fiction/86267">
            [Farmer] Mage | Royal Road
          </a>
          <be> <!-- needed -->
          <img class

and

          <h1 class="chapter">
              Description
          </h1>
          <h3>by
            S.C. King

for description so that it looks like this image image

Aivean commented 3 months ago

@ZeeWanderer, why do you you need a separate ToC item for the title, if it's the first page of the book?

ZeeWanderer commented 3 months ago

Hhhhhhm, i can't really answer that question coherently. I guess for feature completeness and because it usually is that way. If it's a separate "section" its supposed to be indexed. On the other hand some publishers do leave out the title page, but index the rest. image image

I suppose its not truly needed or required so - sorry for the disturbance.

Aivean commented 3 months ago

@ZeeWanderer, I have objection for marking title page with the chapter class — semantically it's not a chapter. If you find an alternative method that is supported by your converter, PR would be welcome.