kindle-periodical icon indicating copy to clipboard operation
kindle-periodical copied to clipboard

Generated file isn't treated by Kindle as a periodical

Open dgarrett opened this issue 3 years ago • 2 comments

I'm trying to generate a simple periodical. However, Kindle Previewer and my Kindle Oasis both show the resulting .mobi as a normal book rather than a periodical.

The simplest repro is: node cmd.js tests/book.json

But the same thing happens if I try to use kindle-periodical as a library in my own project.

Are there any known good examples I could use to validate my setup? Something that others have seen produce a periodical formatted file.

Logs:

-> create article (HTML) with Name 0-00000.html


⚠️ Your `allowedTags` option includes, `style`, which is inherently
vulnerable to XSS attacks. Please remove it from `allowedTags`.
Or, to disable this warning, add the `allowVulnerableTags` option
and ensure you are accounting for this risk.


-> create article (HTML) with Name 0-00001.html


⚠️ Your `allowedTags` option includes, `style`, which is inherently
vulnerable to XSS attacks. Please remove it from `allowedTags`.
Or, to disable this warning, add the `allowVulnerableTags` option
and ensure you are accounting for this risk.


-> create article (HTML) with Name 1-00000.html


⚠️ Your `allowedTags` option includes, `style`, which is inherently
vulnerable to XSS attacks. Please remove it from `allowedTags`.
Or, to disable this warning, add the `allowVulnerableTags` option
and ensure you are accounting for this risk.


-> create article (HTML) with Name 1-00001.html


⚠️ Your `allowedTags` option includes, `style`, which is inherently
vulnerable to XSS attacks. Please remove it from `allowedTags`.
Or, to disable this warning, add the `allowVulnerableTags` option
and ensure you are accounting for this risk.


-> create contents (HTML) with Name contents.html
-> create opf (HTML) with Name contents.opf
-> create ncx (HTML) with Name nav-contents.ncx

*************************************************************
 Amazon kindlegen(Linux) V2.9 build 1028-0897292 
 A command line e-book compiler 
 Copyright Amazon.com and its Affiliates 2014 
*************************************************************

Info:I9007:option: -c2: Kindle Huffdic compression
Info(prcgen):I1047: Added metadata dc:Title        "ebook-title-simple-from-json"
Info(prcgen):I1047: Added metadata dc:Date         "2020-8-3"
Info(prcgen):I1047: Added metadata dc:Creator      "creator"
Info(prcgen):I1047: Added metadata dc:Publisher    "publisher"
Info(prcgen):I1047: Added metadata dc:Subject      "subject"
Info(prcgen):I1047: Added metadata dc:Description  "description"
Info(prcgen):I1002: Parsing files  0000005
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Info(prcgen):I1008: Resolving start reading location
Info(prcgen):I1049: Building table of content     URL: /usr/src/app/book/nav-contents.ncx
Warning(prcgen):W14016: Cover not specified
Info(pagemap):I8000: No Page map found in the book
Info(prcgen):I1045: Computing UNICODE ranges used in the book
Info(prcgen):I1046: Found UNICODE range: Basic Latin [20..7E]
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000001
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000002
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000004
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000008
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000016
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000032
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000064
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000128
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000134
Info(prcgen/compress):I4002: Compression pass  0000001
Info(prcgen/compress):I4002: Compression pass  0000002
Info(prcgen/compress):I4002: Compression pass  0000003
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  517.89%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003052 bytes 000000053 entries 
Info(prcgen/compress):I4002: Compression pass  0000004
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  516.58%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003034 bytes 000000051 entries 
Info(prcgen/compress):I4002: Compression pass  0000005
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  516.91%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003026 bytes 000000049 entries 
Info(prcgen/compress):I4005: Advanced compression successful (decoded and verified).
Info(prcgen):I1039: Final stats - text compressed to (in % of original size):  517.24%
Info(prcgen):I1040: The document identifier is: "ebook-title--mple-from-json"
Info(prcgen):I1041: The file format version is V6
Info(prcgen):I1031: Saving PRC file
Info(prcgen):I1033: PRC built with WARNINGS!
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(prcgen/compress):I4001: Compiling source text for compression (4096 passes max). Pass  0000053
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  336.43%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003308 bytes 000000078 entries 
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  334.98%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003272 bytes 000000073 entries 
Info(prcgen/compress):I4006: Text compressed to (in % of original size):  338.08%
Info(prcgen/compress):I4007: Compression dictionary statistics:  000003252 bytes 000000069 entries 
Info(prcgen):I1039: Final stats - text compressed to (in % of original size):  338.08%
Info(prcgen):I1041: The file format version is V8
Info(prcgen):I1032: PRC built successfully
Info(prcgen):I15000:  Approximate Standard Mobi Deliverable file size :   0000016KB
Info(prcgen):I15001:  Approximate KF8 Deliverable file size :   0000018KB
Info(prcgen):I1037: Mobi file built with WARNINGS!
--> .mobi file created

dgarrett avatar Aug 19 '20 04:08 dgarrett

Hi, maybe this helps you?

https://github.com/moszeed/kindle-periodical/blob/master/tests/tests.js these are the tests that i use to verify

moszeed avatar Aug 25 '20 11:08 moszeed

The same problem.

I searched the Internet for a long time. There are few results for this problem. Consult to https://bookfere.com/post/218.html, maybe the different version of kindlegen causes.

skytt avatar May 04 '21 03:05 skytt