ePUB Generator

Forum for volunteer developers working on Baka-Tsuki related applications (Baka-Reader, BTprince, etc).

Moderators: thelastguardian, Fringe Security Bureau, Senior Editors, Senior Translators, Alt. Language Translator/Editor, Executive Council, Project Translators, Project Editors

Locked
HoennSquall
Haruhiist Sensei
Posts: 93
Joined: Tue May 21, 2013 5:38 am
Favourite Light Novel:

Re: ePUB Generator

Post by HoennSquall »

hmmm, well, the last novel I haven't got any issues was Leviathan v4, so I guess I'll start from the novels I dl'd after that and check
Index
Mikuru's Master
Posts: 28
Joined: Fri May 08, 2015 7:00 pm
Favourite Light Novel: Toaru Majutsu No Index

Re: ePUB Generator

Post by Index »

So you guys know, i am actively working on development from the chrome extension.

Originally opened an issue for an enhancement to add general wayback machine support for all sites
https://github.com/dteviot/WebToEpub/issues/2

Which i then escalated later to a pull request which both me and the author discussed.
https://github.com/dteviot/WebToEpub/pull/3

Then someone asked about fixing the epub formating (including making images that are dups be removed and improving resolution of files and a few other things.) i Fixed the first part of his issue and said i would deal with the other 2 parts as well.
https://github.com/dteviot/WebToEpub/issues/4

Anyone that knows javascript that wants to beat me to the pie on this one is welcome to do so. This is low priority for me right now.
https://github.com/dteviot/WebToEpub/issues/5

And ah yes adding firefox compatibility using WebExtensions. This is extremely Low priority for me since WebExtensions are still in beta and are not mainlined yet.
https://github.com/dteviot/WebToEpub/issues/6
User avatar
reyfista11
Astral Realm

Re: ePUB Generator

Post by reyfista11 »

actually you can easily fix the error book by using calibre e-book editor. just cut and paste the html code for the images and move them to the appropriate places.
just search ".jpg" on the body.html and you will find the correct places.
User avatar
Guest
Astral Realm

Re: ePUB Generator

Post by Guest »

Index wrote:So you guys know, i am actively working on development from the chrome extension.

Originally opened an issue for an enhancement to add general wayback machine support for all sites
https://github.com/dteviot/WebToEpub/issues/2

Which i then escalated later to a pull request which both me and the author discussed.
https://github.com/dteviot/WebToEpub/pull/3

Then someone asked about fixing the epub formating (including making images that are dups be removed and improving resolution of files and a few other things.) i Fixed the first part of his issue and said i would deal with the other 2 parts as well.
https://github.com/dteviot/WebToEpub/issues/4

Anyone that knows javascript that wants to beat me to the pie on this one is welcome to do so. This is low priority for me right now.
https://github.com/dteviot/WebToEpub/issues/5

And ah yes adding firefox compatibility using WebExtensions. This is extremely Low priority for me since WebExtensions are still in beta and are not mainlined yet.
https://github.com/dteviot/WebToEpub/issues/6
I'm afraid I don't have the knowledge needed to contribute to the code myself, but I tried the extension and it ended up fetching lower resolution versions of the images which I had to manually replace with full resolution versions using Sigil. Was this by design?
User avatar
Guest
Astral Realm

Re: ePUB Generator

Post by Guest »

Guest wrote:I tried the extension and it ended up fetching lower resolution versions of the images which I had to manually replace with full resolution versions using Sigil. Was this by design?
Yes, it was by design. However, due to overwhelming complaints, the latest version (0.0.0.4) now fetches the highest resolution images. My thanks to Index.
It's been submitted to Google and should be available from the store in a couple of hours.

It should also fix the issue with cover images not showing on iBooks on the iPad. (I don't have an iPad to test.)
If anyone can confirm it works, that would be appreciated.
User avatar
Guest
Astral Realm

Re: ePUB Generator

Post by Guest »

On the topic of cover issues with the extension, could I make a suggestion, to allow the setting of covers using an image from any URL instead of just those available on the page?

For example, take this page

Code: Select all

https://www.baka-tsuki.org/project/index.php?title=The_Zashiki_Warashi_of_Intellectual_Village:Volume9
As visible on that page itself (and therefore available for packing by the extension), the closest one can get to a cover would be

Code: Select all

https://www.baka-tsuki.org/project/images/3/31/Zashiki_v09_000.jpg
However, this is too wide as it includes the front cover, the spine, and the back cover as well.

If on the other hand one were to check the main series page,

Code: Select all

https://www.baka-tsuki.org/project/index.php?title=The_Zashiki_Warashi_of_Intellectual_Village
there is a much better option available to act as a cover, not present on the volume's full text page.

Code: Select all

https://www.baka-tsuki.org/project/images/3/30/Zashiki_Volume_9_Cover.jpg
As-is, the extension does not allow for setting this as the cover, and therefore the epub needs to be manually tweaked after the fact to replace the cover.

Since I'm uncertain if there is any practical easy one-size-fits-all fix to somehow magically detect the presence of a cover image on a page other than the one being viewed, then a solution could be to allow entering an image URL to fetch a specific image to act as cover.
User avatar
Astral Cat
Astral Realm

Re: ePUB Generator

Post by Astral Cat »

First of all thanks for your work on the Chrome extension, it's been a godsend since BTE-GEN started acting up after the server move.

Could I make a couple of suggestions that would introduce more parity with the design EPUBs created by BTE-GEN?

Firstly, as far as I see using the extension creates a EPUB wherein all the images are renamed to image(number).jpg, would it be at all possible to preserve the Baka-Tsuki filenames instead?

Secondly, the way the old generator was set up, the color illustrations sections would have illustrations set up like so

Code: Select all

<div class="svg_outer svg_inner">
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 x y" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="y" width="x" xlink:href="../Images/filename.jpg"></image>
    </svg>
</div>
This creates a nice clean page with just an illustration.

The extension on the other hand packs in the whole gallery's HTML, wherein all the illustrations are part of an unordered list

Code: Select all

<ul class="gallery mw-gallery-traditional">
			<div class="gallerytext">
<p><b>(caption)</b>
</p>
			</div>
		</div></li>
		<li class="gallerybox"><div>
			<div class="svg_outer svg_inner"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" width="100%" version="1.1" preserveAspectRatio="xMidYMid meet" viewBox="0 0 x y"><image xlink:href="../Images/filename.jpg" height="y" width="x"></image></svg>
</div>
<!--And so on and so forth with the rest of the illustrations-->
</ul>
This results in some unsightly bullet points attached to each and every one of the images when viewed in an epub viewer, which for those images that lack captions are simply bullet points with nothing attached to them.

If there was any way for the extension to strip out the list code and just leave the images in that would go a long way to making a more aesthetically pleasing outcome.
Index
Mikuru's Master
Posts: 28
Joined: Fri May 08, 2015 7:00 pm
Favourite Light Novel: Toaru Majutsu No Index

Re: ePUB Generator

Post by Index »

Astral Cat wrote:First of all thanks for your work on the Chrome extension, it's been a godsend since BTE-GEN started acting up after the server move.

Could I make a couple of suggestions that would introduce more parity with the design EPUBs created by BTE-GEN?

Firstly, as far as I see using the extension creates a EPUB wherein all the images are renamed to image(number).jpg, would it be at all possible to preserve the Baka-Tsuki filenames instead?

Secondly, the way the old generator was set up, the color illustrations sections would have illustrations set up like so

Code: Select all

<div class="svg_outer svg_inner">
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 x y" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="y" width="x" xlink:href="../Images/filename.jpg"></image>
    </svg>
</div>
This creates a nice clean page with just an illustration.

The extension on the other hand packs in the whole gallery's HTML, wherein all the illustrations are part of an unordered list

Code: Select all

<ul class="gallery mw-gallery-traditional">
			<div class="gallerytext">
<p><b>(caption)</b>
</p>
			</div>
		</div></li>
		<li class="gallerybox"><div>
			<div class="svg_outer svg_inner"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" width="100%" version="1.1" preserveAspectRatio="xMidYMid meet" viewBox="0 0 x y"><image xlink:href="../Images/filename.jpg" height="y" width="x"></image></svg>
</div>
<!--And so on and so forth with the rest of the illustrations-->
</ul>
This results in some unsightly bullet points attached to each and every one of the images when viewed in an epub viewer, which for those images that lack captions are simply bullet points with nothing attached to them.

If there was any way for the extension to strip out the list code and just leave the images in that would go a long way to making a more aesthetically pleasing outcome.
I managed to fix the bullet points and duplicate images here https://github.com/dteviot/WebToEpub/pull/10 which when accepted should make it into 0.0.0.5

I opened a new issue here for preserving image file names as a marker for me https://github.com/dteviot/WebToEpub/issues/11
Guest wrote:On the topic of cover issues with the extension, could I make a suggestion, to allow the setting of covers using an image from any URL instead of just those available on the page?

For example, take this page

Code: Select all

https://www.baka-tsuki.org/project/index.php?title=The_Zashiki_Warashi_of_Intellectual_Village:Volume9
As visible on that page itself (and therefore available for packing by the extension), the closest one can get to a cover would be

Code: Select all

https://www.baka-tsuki.org/project/images/3/31/Zashiki_v09_000.jpg
However, this is too wide as it includes the front cover, the spine, and the back cover as well.

If on the other hand one were to check the main series page,

Code: Select all

https://www.baka-tsuki.org/project/index.php?title=The_Zashiki_Warashi_of_Intellectual_Village
there is a much better option available to act as a cover, not present on the volume's full text page.

Code: Select all

https://www.baka-tsuki.org/project/images/3/30/Zashiki_Volume_9_Cover.jpg
As-is, the extension does not allow for setting this as the cover, and therefore the epub needs to be manually tweaked after the fact to replace the cover.

Since I'm uncertain if there is any practical easy one-size-fits-all fix to somehow magically detect the presence of a cover image on a page other than the one being viewed, then a solution could be to allow entering an image URL to fetch a specific image to act as cover.
As for this one refer here https://github.com/dteviot/WebToEpub/issues/9

As i answered there the only problem here blocking a quick fix is inconsistent file names and the lack of the extension setting the variable imageInfo.isCover. Aside from that allowing for a url for the cover will be done in a different pull request then the current one.#10 which hasn't been excepted just yet.
User avatar
BaronKrause
Astral Realm

Re: ePUB Generator

Post by BaronKrause »

This plugin has really come along amazinfg over the past few weeks, it can now create a epub that looks the same (if not formated a little better as of the last update) then the ones that were found on http://ln.m-chan.org and those required the sites host to manually edit each one to look that way.


Excellent work man!
HoennSquall
Haruhiist Sensei
Posts: 93
Joined: Tue May 21, 2013 5:38 am
Favourite Light Novel:

Re: ePUB Generator

Post by HoennSquall »

idiot question but where do I check which volumes are recently finished? been using the epub gen's update page for that, but since it's now gone.....
Cthaeh
Yuki-Nagator
Posts: 647
Joined: Sun Nov 11, 2012 6:54 pm
Favourite Light Novel:

Re: ePUB Generator

Post by Cthaeh »

HoennSquall wrote:idiot question but where do I check which volumes are recently finished? been using the epub gen's update page for that, but since it's now gone.....
It's whenever a chapter is complete, I think, not specifically volumes, but the BT twitter and FB community list updates.


On a different topic, many of the recent posts seem to be about the newer browser plug-in epub generator, which I believe has it's own thread. I'm thinking of moving those posts over to that thread, unless anyone has a reason why they should be here.
amit34521
Mikuru's Master
Posts: 26
Joined: Fri Oct 10, 2014 10:51 am
Favourite Light Novel:

Re: ePUB Generator

Post by amit34521 »

Can someone add a similar generator for the mobile users or some other option for the mobile users who used the epub generator before???
dteviot
Literature Club Member
Posts: 31
Joined: Fri Sep 19, 2014 10:02 pm
Favourite Light Novel:

Re: ePUB Generator

Post by dteviot »

amit34521 wrote:Can someone add a similar generator for the mobile users or some other option for the mobile users who used the epub generator before???
Well the WebToEpub extension is really just a web page. (It's just HTML and javascript) and it only uses a tiny bit of Chrome specific stuff to find the URL of the user's current page when it starts.
I think it could easily converted into an ordinary web page that you just browse to, type in the URL you want processed and then hit load. I'd just need a Web server that's willing to host the HTML and javascript.

Do you want to talk to the Baka-Tsuki admins? Maybe could be hosted here?

Another possibility is this:
http://lifehacker.com/chrome-for-ios-ad ... 1637664312
Note, given the enormous "pain in the ass" getting Apple to approve an app is, I'm not prepared to do this. But the code is open source, so if you want to go to the pain and expense of trying to get Apple approval, you have my blessing. Incidentally, someone told me a literal interpretation of Apple's approval process strictly forbids open source.
User avatar
Guest
Astral Realm

Re: ePUB Generator

Post by Guest »

dteviot wrote:
amit34521 wrote:Can someone add a similar generator for the mobile users or some other option for the mobile users who used the epub generator before???
Well the WebToEpub extension is really just a web page. (It's just HTML and javascript) and it only uses a tiny bit of Chrome specific stuff to find the URL of the user's current page when it starts.
I think it could easily converted into an ordinary web page that you just browse to, type in the URL you want processed and then hit load. I'd just need a Web server that's willing to host the HTML and javascript.

Do you want to talk to the Baka-Tsuki admins? Maybe could be hosted here?

Another possibility is this:
http://lifehacker.com/chrome-for-ios-ad ... 1637664312
Note, given the enormous "pain in the ass" getting Apple to approve an app is, I'm not prepared to do this. But the code is open source, so if you want to go to the pain and expense of trying to get Apple approval, you have my blessing. Incidentally, someone told me a literal interpretation of Apple's approval process strictly forbids open source.
Side note i have a dedicated server so i honestly don't mind hosting it at webtoepub.ilp.moe
Index
Mikuru's Master
Posts: 28
Joined: Fri May 08, 2015 7:00 pm
Favourite Light Novel: Toaru Majutsu No Index

Re: ePUB Generator

Post by Index »

dteviot wrote:
amit34521 wrote:Can someone add a similar generator for the mobile users or some other option for the mobile users who used the epub generator before???
Well the WebToEpub extension is really just a web page. (It's just HTML and javascript) and it only uses a tiny bit of Chrome specific stuff to find the URL of the user's current page when it starts.
I think it could easily converted into an ordinary web page that you just browse to, type in the URL you want processed and then hit load. I'd just need a Web server that's willing to host the HTML and javascript.

Do you want to talk to the Baka-Tsuki admins? Maybe could be hosted here?

Another possibility is this:
http://lifehacker.com/chrome-for-ios-ad ... 1637664312
Note, given the enormous "pain in the ass" getting Apple to approve an app is, I'm not prepared to do this. But the code is open source, so if you want to go to the pain and expense of trying to get Apple approval, you have my blessing. Incidentally, someone told me a literal interpretation of Apple's approval process strictly forbids open source.

Side Note i have a dedicated server so i don't mind hosting it at webtoepub.ilp.moe see https://github.com/dteviot/WebToEpub/issues/51
Locked

Return to “Developers and Code”