Giter Site home page Giter Site logo

kindle-periodical's People

Contributors

danmandle avatar moszeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kindle-periodical's Issues

生成的电子书文件内容会乱码。

kindle-periodical.js 第241行 修改为 :
var fileContent = '<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">' + '<head>' + '<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type" />' + '<title></title>' + '</head>' + '<body>' + _checkContent(article.content) + '</body>' + '</html>'
这样中文就能正常显示了。

book folder missing in src

In order to make your lib work, you need to have a "book" folder under src. Otherwise it fails and can't create the temporary files.

Generated file isn't treated by Kindle as a periodical

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

Can no longer download/install kindlegen

README.md says "Kindlegen will be installed automatically" and "Kindlegen must NOT be in PATH, will be downloaded on install!" however that doesn't appear to work anymore. During npm install I see the error:

> [email protected] install
> node install.js

fail to download
/Users/x/kindle-periodical/install.js:19
        throw Error(err);
              ^

Error: HTTPError: Response code 403 (Forbidden)
    at /Users/x/kindle-periodical/install.js:19:15
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

It's my understanding Amazon replaced kindlegen with other software so perhaps this is not surprising.

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.