Please read. Significant change on the site that will affect compatibility [ Dismiss ]
Home Β» Forum Β» Author Hangout

Forum: Author Hangout

Bookapy's EPUB Builder

Lazeez Jiddan (Webmaster)
Updated:

I created a system that builds EPUB books for Bookapy. I would appreciate you guys giving it a test or two and report any bugs or suggestions.

For now it's in alpha status. It accepts HTML, text, Markdown, and .docx files. Embedded Images (other than the cover) are not supported yet, but will be.

You'll need one file for the book's text (.txt or html) and a cover image (JPG, PNG and Webp supported - minimum width 1400px, minimum height 2400px). When you submit the info, the system will build the EPUB and download it to your computer. Technically, it's very useable to create books suitable for publishing on Bookapy. You just need to preview the result and make sure it's decent enough.

Please test it and let me know what you think.

https://bookapy.com/author/epubbuilder/

Eventually when it's done, it will be the default in the submission system. But of course, for more advanced EPUBs, you would be able to submit your own EPUB.

Please note that the system is built with efficiency in mind. So the cover will be optimized to a max size of 2400px height.

Michael Loucks 🚫

@Lazeez Jiddan (Webmaster)

It's asking me to login (despite being logged in) and when I click the login button, it takes me to the site. I try to go back to the epub builder and ams once against asked to login.

The Outsider 🚫
Updated:

@Michael Loucks

After I logged in I copied and pasted the link and reloaded. The EPUB creator interface came up without any issues then.

Lazeez Jiddan (Webmaster)

@Michael Loucks

ams once against asked to login

Log out and log back in.

Replies:   Michael Loucks
Michael Loucks 🚫

@Lazeez Jiddan (Webmaster)

That solved it. Thanks.

Lazeez Jiddan (Webmaster)
Updated:

@Lazeez Jiddan (Webmaster)

Added markdown support.

ETA: Added .docx support.

Please note that for HTML, markdown and .docx files, formatting support is limited to the same tags that SOL supports.

Replies:   Switch Blayde
Switch Blayde 🚫

@Lazeez Jiddan (Webmaster)

Please note that for HTML, markdown and .docx files, formatting support is limited to the same tags that SOL supports.

I must not be understanding that comment.

The SOL Wizard strips most HTML tags, like paragraph indenting and line spacing. Do you mean Bookapy's epub builder ignores those tags?

Lazeez Jiddan (Webmaster)

@Switch Blayde

like paragraph indenting and line spacing

Those are styling in CSS, not html tags.

The builder allows you to have your own CSS file embedded into the EPUB if you wish, so you can change the style used.

Lazeez Jiddan (Webmaster)

@Lazeez Jiddan (Webmaster)

The builder is now feature complete. It accepts plain text, html, .docx and markdown files.

It accepts an optional custom CSS file to override the default styling.

The builder now handles images if the book contains them.

Of note, is that nobody seems to have tested the system yet as I got no feedback.

Replies:   Switch Blayde
Switch Blayde 🚫

@Lazeez Jiddan (Webmaster)

nobody seems to have tested the system yet as I got no feedback

I had no need since I use Calibre to create my ebook.

Mushroom 🚫

@Lazeez Jiddan (Webmaster)

https://bookapy.com/author/epubbuilder/

I was testing it, and after putting in a text file and image, it would just sit there and output nothing that I could see.

Gauthier 🚫
Updated:

@Mushroom

Same for me, POST responded after 13sec. But returned me to the same page with prefilled field except for the attached docx and cover, no error message, no epub.

Does it support svg images (there where svg images embeded in the docx)

My cover was 3200x5120

Lazeez Jiddan (Webmaster)

@Gauthier

Does it support svg images (there where svg images embeded in the docx)

It doesn't support any type of images embedded in .docx files.

And no, SVG files aren't supported (yet).

It returned with no error message at all?

Replies:   Gauthier
Gauthier 🚫
Updated:

@Lazeez Jiddan (Webmaster)

no error message visible or in the source of the page.

The prefilled field was by firefox, the source of the post response was as if nothing was submitted.

Text was in French with some Greek, Latin and Thiois

I've sent test data by email.

Maybe my account isn't "author"?
Edit: no change after creating a Pen name on bookapy

Gauthier 🚫

@Gauthier

There isn't any feedback for the upload progress, but 13sec is the time it took to upload the files.

Lazeez Jiddan (Webmaster)
Updated:

@Gauthier

I tried the files you emailed me. Worked first attempt:

https://bookapy.com/tmp/epub-builder/par-del-lalb-do-j.-p.-de-hortius.epub

This is frustrating. I can't replicate any bugs and yet so far it hasn't worked for anybody else.

Thank you for trying.

Maybe it's important, but what's your system's configuration? System version, browser and browser version?

Gauthier 🚫
Updated:

@Lazeez Jiddan (Webmaster)

Windows 10 Pro 22H2 with built in antivirus Defender. Clean Install I tried with firefox 109.0.1 yesterday and Chrome 109.0.5414.120 today. No Browser plug-in, no proxy/vpn, both fail in the same way.
Upload time 17sec, processing time 162ms.
(That seems fast for a conversion process)
Time to upload the file count as processing time for PHP.
I'll try with smaller files.

The file you produced added some {1} {2} {3} in the epub
[p]{2}Chapitre I[/p]

but failed to build a table of content or style the chapters.
It also didn't handle end of page notes and ignored images embedded in the word file.

Gauthier 🚫

@Lazeez Jiddan (Webmaster)

Test with smaller files on firefox resulted in the same behavior.
Upload time was 350ms processing time 560ms (a bit longer but not much.)

Gauthier 🚫

@Lazeez Jiddan (Webmaster)

There is a small difference between Firefox & Chrome:
Firefox Original Publisher date appear as dd/mm/yyyy
Chrome appears as yyyy/mm/dd

The form POST data is however yyyy-mm-dd (for firefox)
-----------------------------206223753140705050883472267547
Content-Disposition: form-data; name="dop"

2022-12-25

Can't spy on Chrome post data.

Also tried edge and tried to leave out the dop.
Same problem remain.

Lazeez Jiddan (Webmaster)

@Gauthier

Also tried edge and tried to leave out the dop.
Same problem remain.

Can you please give it another try. I added extensive input data logging to see what's being received. It could be the date. My own browser shows 2023-02-09 format and that's what the builder expects. Previous experience with dates show that this is always the case, but who knows.

Thank you for the help.

Replies:   Gauthier
Gauthier 🚫

@Lazeez Jiddan (Webmaster)

Done, no change.

Gauthier 🚫

@Gauthier

also tested a markdown text, same result

Lazeez Jiddan (Webmaster)

@Gauthier

Well, I found the reason.

Somehow the same code that works perfectly in Safari, doesn't work in the latest version of Firefox.

I updated Firefox to the latest version and it's stopping the form from submitting. So the form wasn't submitting the form at all except on Safari (desktop and mobile) but nothing else.

I have to rework the javascript validation code.

Replies:   Gauthier
Gauthier 🚫

@Lazeez Jiddan (Webmaster)

That's not my problem, firefox/Chrome/Edge all do a successful POST which take the appropriate time to do the upload. With firefox, I can see the multipart posted data, it is there. And the server do respond with a 200 to the posted data.

Gauthier 🚫

@Gauthier

If you do not see my test in your logs, that means that you are confusing GET and POST server side.
Check $_SERVER['REQUEST_METHOD'];
With [form enctype="multipart/form-data"] you may be missing something.

Lazeez Jiddan (Webmaster)

@Gauthier

If you do not see my test in your logs, that means that you are confusing GET and POST server side.

No, I'm not. It's not my first script you know. This has been weird. The javascript validation intercept is blocking Firefox and Chrome from submitting the form. Nothing was reaching the server, trust me.

Alright, new code is up. I tested it with Firefox and it worked. Did not test it with Chrome, but it should work too.

Please give it a try.

🀞

Lazeez Jiddan (Webmaster)

@Gauthier

With firefox, I can see the multipart posted data, it is there. And the server do respond with a 200 to the posted data.

Maybe it seems to be working, but somehow the request isn't being delivered to the server.

I inserted code to log whatever data was being posted to the server at the start of the script. So the flow, once the upload button was clicked and the server received the data, before doing anything, it would log all the data received to a log file. Nothing is being logged at all with Firefox and Chrome. As if the request didn't reach the server.

I'm working on some new code. I'll post when there is something new to work with.

Replies:   Gauthier
Gauthier 🚫
Updated:

@Lazeez Jiddan (Webmaster)

Nothing is being logged at all with Firefox

The server raw response contains the field data:

like value="Par delΓ  l'albΓ©do"

That means that you at least saw $_POST

$_FILES could still have issues.

But If you do not see my $_POST in the logs, we are not talking to the same server...

Edit: for me: bookapy.com [45.33.64.7]

Gauthier 🚫

@Lazeez Jiddan (Webmaster)

https://bookapy.com/tmp/epub-builder/title-author.epub

Not sure if it is the normal save target, but that should be protected by the file owner login. Currently, it is public no login required.

Lazeez Jiddan (Webmaster)

@Gauthier

Not sure if it is the normal save target, but that should be protected by the file owner login. Currently, it is public no login required.

Not important. Once built, the system give you a button to download the file. Once the file is downloaded the file gets erased.

Lazeez Jiddan (Webmaster)

@Mushroom

I was testing it, and after putting in a text file and image, it would just sit there and output nothing that I could see.

How big were the files?

If possible, can you email me the same file that resulted in nothing? (lazeez@storiesonline.net)

Replies:   Mushroom
Mushroom 🚫
Updated:

@Lazeez Jiddan (Webmaster)

It was the 794k text file that I got from creating a text file right here of my story "Bohica". As well as an image in JPG for a cover.

https://images2.imgbox.com/7d/6b/xOJk2sH9_o.jpg

I was only doing it as a test, to see how it came out. But I also got nothing.

Lazeez Jiddan (Webmaster)
Updated:

@Mushroom

I downloaded the text file and your cover and tried. Worked as expected, first attempt (working from a particularly slow internet connection too):

https://bookapy.com/tmp/epub-builder/bohica-mushroom.epub

I don't know what you guys are doing differently to end up with different results (not working at all).

Thank you for trying.

Maybe it's important, but what's your system's configuration? System version, browser and browser version?

Michael Loucks 🚫

@Lazeez Jiddan (Webmaster)

Tried it with text files. Page simply reset. No button to download the file.

Arc browser (chromium based) on Mac OS 13.2

Gauthier 🚫
Updated:

@Lazeez Jiddan (Webmaster)

works now.

Problem list (Calibre Editor Check):

Post 1 with docx

Fatal issue 1: file lisence.xhtml is not valid xhtml (missing [/div] tag)

Warning Issue 2: use of & r s q u o ; in end.xhtml and & a s y m p ; in info.xhtml

Named entities are often only incompletely supported by various book reading software. Therefore, it is best to not use them, replacing them with the actual characters they represent. This can be done automatically.

Issue 3:

CDATA around style in comment -> empty comment warning. I'm not sure this one is legit.

Previous issues remains, insertion of {x}, no TOC, etc.

Post 2 with markdown

Handling of 200 response with error is incorrect.
As the response doesn't replace the submit page
response contained:
[h4 class="error"]Unsupported Book Text File format[/h4]
Along with a form copy.

How does it detect that the document submited is Markdown?

Lazeez Jiddan (Webmaster)

@Gauthier

Post 1 with docx

Fatal issue 1: file lisence.xhtml is not valid xhtml (missing [/div] tag)

Fixed.

Warning Issue 2: use of & r s q u o ; in end.xhtml and & a s y m p ; in info.xhtml

Not really issues, but fixed.

I trust the command line epubcheck over calibre considering how many invalid EPUBs I receive that were generated by Calibre. epubcheck never flagged those as issues.

Issue 3:

CDATA around style in comment -> empty comment warning. I'm not sure this one is legit.

Previous issues remains, insertion of {x}, no TOC, etc.

Empty comment, not an issue.

No TOC is documented, for now, one has to code the TOC in the text. Later I'll add a checkbox that when checked will have the builder try to find 'chapter xx' in the text and 'part xx'.

insertion of {x}? I don't know what you mean by that. Please refresh my memory.

Handling of 200 response with error is incorrect.
As the response doesn't replace the submit page
response contained:
[h4 class="error"]Unsupported Book Text File format[/h4]
Along with a form copy.

Yeah, artifact of the change in code to submit the form. I'll fix.

How does it detect that the document submited is Markdown?

The code checks its mime type. What file extension did your file have?

.md is detected by Safari and Firefox as text/markdown.

Replies:   Gauthier  Gauthier  Gauthier
Gauthier 🚫
Updated:

@Lazeez Jiddan (Webmaster)

The code checks its mime type

My File extension is .md

MIME type would be the problem, Windows 10 doesn't know the MIME type for .md:

So Firefox sent this:

-----------------------------310083848427627238762375161137
Content-Disposition: form-data; name="text_file"; filename="gauthier-markdown-test-small.md"

Content-Type: application/octet-stream

I added to the registry:

[HKEY_CLASSES_ROOT.md]
"Content Type"="text/markdown"

And that solve the problem, but you can't expect a normal user to do that.

Lazeez Jiddan (Webmaster)

@Gauthier

MIME type would be the problem, Windows 10 doesn't know the MIME type for .md:

Updated builder to detect Markdown files regardless of mime type support of underlying system.

Also fixed the issue with error reports.

To-do: Table of contents detection.

Gauthier 🚫

@Lazeez Jiddan (Webmaster)

insertion of {x}

If in word I have this text:

Chapitre I

Which is styled Titre2, and bookmarked _Tocxxx
In the Epub, I will see:

{2}Chapitre I

Gauthier 🚫

@Lazeez Jiddan (Webmaster)

No TOC is documented, for now, one has to code the TOC in the text. Later I'll add a checkbox that when checked will have the builder try to find 'chapter xx' in the text and 'part xx'.

Just looking for the text may not be a good idea.

For Markdown, you may add a requirement of normal heading marker #, ##, ###

For docx, the style name is language dependent (Titre2, vs Heading2 for example)

The best way would be to have a table of contents within word and identify the bookmark labelled _TOCxxx in the xml

but that is probably hard to implement.

Lazeez Jiddan (Webmaster)

@Gauthier

but that is probably hard to implement.

Due to the various options that each submission format uses for header, it's tricky yes. I took the easy way out and made it up to the author for now.

Word, due to language support offers the biggest challenge.

I will add the check box. I would never make it the default for the software to assume that there is a TOC. If the author ticks the box, then the software will try to figure it out.

Lazeez Jiddan (Webmaster)

@Lazeez Jiddan (Webmaster)

Updated builder to support .odt files (OpenOffice/LibreOffice).

Added table of contents detection basic support.

Back to Top

Close
 

WARNING! ADULT CONTENT...

Storiesonline is for adult entertainment only. By accessing this site you declare that you are of legal age and that you agree with our Terms of Service and Privacy Policy.


Log In