Code Monkey home page Code Monkey logo

Comments (11)

belldandu avatar belldandu commented on June 29, 2024

The problem is less about building the epubs and more about filtering certain problems that appear on some pages within baka-tsuki that may cause issues with certain readers.

We already know the common formats for an epub in fact i was the one who suggested we adopt the more common format (we made slight changes to prevent issues on some OS cough_windows_cough)

from webtoepub.

dteviot avatar dteviot commented on June 29, 2024

@typhoon71
Not a bad suggestion. The problem is finding what really are "well formatted epubs".
What would also be useful is a list of what changes you need to manually make to the epubs that WebToEpub generates? Then I can look at automating that. Similar to Belldandu's comment, what are the "oddball cases" we run into on Baka-Tsuki?

from webtoepub.

toshiya44 avatar toshiya44 commented on June 29, 2024

I think the extension is doing pretty great. Just need to fix a few errors here and there and it will work almost perfectly with Baka-Tsuki. Not sure about other sites, since there haven't been any feedback from their users for a while...
As for formatting, I'd suggest adding a few more rules in the default stylesheet. (I can help with that if you decide to do that).

from webtoepub.

dteviot avatar dteviot commented on June 29, 2024

@toshiya44

I'd suggest adding a few more rules in the default stylesheet. (I can help with that if you decide to do that).

Someone already sent me some suggestions. However, I seem to have mislaid them. If that was you, I apologise. That said, sure, please post your recommendations. Note: I don't promise to include them, but I will give them serious consideration.

from webtoepub.

toshiya44 avatar toshiya44 commented on June 29, 2024

This is the general css I throw in for epubs made from BT pages.
(Apparently I can't upload css files, so saved it as text)
stylesheet.txt

from webtoepub.

dteviot avatar dteviot commented on June 29, 2024

You can do it like this, I think.

/*Style for svg images. I got this from BTE-Gen epunbs. Works nicely.*/
div.svg_outer {
  display: block;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  text-align: left;
}
div.svg_inner {
  display: block;
  text-align: center;
}

/*Centered headings and some margin to make sure it's not too close to the content.*/
h1, h2 {
  text-align: center;
  page-break-before: always;
  margin-bottom: 10%;
  margin-top: 10%;
}
h3, h4, h5, h6 {
  text-align: center;
  margin-bottom: 15%;
  margin-top: 10%;
}

/*Style for lists. Calibre sometimes has issues with the placement of lists, this fixes it.*/
ol, ul {
  padding-left: 8%;
}

/*In case there are images in img tags. It's up to you.*/
img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2%;
  margin-top: 2%;
}

/* To make hr tags more visible. BT doesn't use them very often but other sites might.*/
hr {
  color: black;
  background-color: black;
  height: 2px;
}

/*Styling all links.*/
a:link {
  text-decoration: none;
  color: #0B0080;
}
a:visited {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:active {
  text-decoration: underline;
}

from webtoepub.

belldandu avatar belldandu commented on June 29, 2024

Well there is one issue @dteviot when i tried to place everything in OEBPS/Styles/stylesheet.css and then include that file everywhere i got some annoying complaints from epubcheck about the link tag not being allowed (not sure if this is still a problem or not since the dirty hack for doctype was implemented).

I will be looking into it tomorrow though.

EDIT:

I also tried this before too <?xml-stylesheet href="../Style/style.css" type="text/css"?> while epubcheck didn't complain NONE of the epub readers including calibre understood this (which means lots of bug reports are needed for all epub readers about this).

Literally all the readers ignored the stylesheet

EDIT 2: After looking i noticed that you already added the link tag in so i guess its now just a matter of checking if epubcheck complains.

from webtoepub.

belldandu avatar belldandu commented on June 29, 2024

epubcheck likes it now :D

from webtoepub.

dteviot avatar dteviot commented on June 29, 2024

@toshiya44
You've probably noticed, but in case you haven't, the default Stylesheet now uses the settings you've suggested.

from webtoepub.

toshiya44 avatar toshiya44 commented on June 29, 2024

Yup, I've noticed :D

from webtoepub.

dteviot avatar dteviot commented on June 29, 2024

I now run epubcheck against output to check for issues.
And stylesheet has been added.
So closing.

from webtoepub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.