Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in opf #50

Closed
toshiya44 opened this issue Jul 12, 2016 · 18 comments
Closed

Errors in opf #50

toshiya44 opened this issue Jul 12, 2016 · 18 comments

Comments

@toshiya44
Copy link

metadata, manifest, spine and guide sections in the opf has xmlns="" inserted in them.

<metadata xmlns="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<manifest xmlns="">
<spine xmlns="" toc="ncx">
<guide xmlns="">

Again, calibre can still open the book, but I guess it might be an issue for other lightweight apps.
(using Firefox 49.0a2)

@belldandu
Copy link
Collaborator

Can confirm i had these issues even when opening Tests.html in firefox aurora. I had initially ignored them because it didn't seem like they cause any issues however you are right it could potentially cause issues in the more light weight readers.

@belldandu
Copy link
Collaborator

Priority changed due to affecting firefox review.

dteviot added a commit that referenced this issue Jul 16, 2016
dteviot added a commit that referenced this issue Jul 16, 2016
@dteviot
Copy link
Owner

dteviot commented Jul 16, 2016

@toshiya4, @belldandu, @typhoon71, @dreamer2908

Issues with namespaces should now be fixed in Sonako branch.
I've also tweaked the RoyalRoad parser to delete the "Try the beta reader" advert, if you'd like to give it a go.

@typhoon71
Copy link

Tried the new build on RoyalRoad, but this happens (chrome):

uff

I could pack the epub with the previous version (but there was the "Try the beta reader" advert)

Firefox instead does this:

fuu

The same happens on BakaTsuki.

@toshiya44
Copy link
Author

toshiya44 commented Jul 16, 2016

@dteviot Currently, putting jszip.js or jszip.min.js in "plugin/jszip" gives error. I tried putting the entire thing from Stuck/jszip into that folder and it worked (and the resulting epub didn't have any bugs). I don't get it ;-;

@typhoon71
Copy link

Oh, so that was it. It needed the whole thing. Works now.

@belldandu
Copy link
Collaborator

@toshiya44 @typhoon71 @dteviot The path is now plugin/jszip/dist/jszip.min.js not plugin/jszip/jszip.min.js

This path is also specified in the edited popup.html and UnitTest.html files.

@dteviot
Copy link
Owner

dteviot commented Jul 16, 2016

D'oh!
Previously, the jszip library was included directly in WebToEpub's git. i.e. the file jszip.min.js was a file checked into GitHub, so when you got the source, it included jszip.
jszip is has been replaced with a submodule. So when you do a Git checkout, it goes to the jszip project and pulls the file from there. Obviously, if you donwload just WebToEpub you no longer get jszip.
I'll update the install from source instructions.

@belldandu
Copy link
Collaborator

@dteviot you would think that when downloading the zip file it would include the submodule repo's. Not sure if bug or intentionally like that to prevent issues on githubs end.

@belldandu
Copy link
Collaborator

@dteviot We should probably shoot github an email asking whether this behavior is intentional or not.

@dteviot
Copy link
Owner

dteviot commented Jul 16, 2016

@belldandu
I'm pretty sure it's intentional.
wbond/package_control#126 (comment)

@belldandu
Copy link
Collaborator

Lovely

@toshiya44
Copy link
Author

toshiya44 commented Jul 17, 2016

So, now the solution is to download JSZip from Stuck/jszip, unzip it and copy-paste the dist folder to plugin/jszip.
The namespace issue has been fixed. So I'm closing this.

@dteviot
Copy link
Owner

dteviot commented Jul 17, 2016

@toshiya44

So, now the solution is to download JSZip from Stuck/jszip, unzip it and copy-paste the dist folder to plugin/jszip.

Correct.

The namespace issue has been fixed. So I'm closing this.

Thank you.

@AzSiAz
Copy link

AzSiAz commented Jul 18, 2016

As say in the git doc : https://git-scm.com/book/en/v2/Git-Tools-Submodules
In Terminal :

git clone --recursive URL_REPO

Or if downloaded zip

cd webToEpub_Directory
git submodule init
git submodule update

Or as toshiya44 say just download JSZip and unzip

@belldandu
Copy link
Collaborator

@AzSiAz Thanks.
@dteviot I think it would be a good idea to add the above to the readme. What about you?

@dteviot
Copy link
Owner

dteviot commented Jul 20, 2016

@belldandu
I'd assumed that anyone who is getting it using Git knows about submodules.
Most Git GUIs will tell users there are submodules and offer to fetch them.

I've already updated the read me with instructions to download jszip if using source download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants