Answers.Body: <p>AFAIK, you can't directly convert from the command line using Kindle Previewer. You also can't convert multiple files.</p>
  <p>But there is a <a href="https://wiki.mobileread.com/wiki/Kindle_Previewer#Calibre_plugin" rel="nofollow noreferrer">plugin for Calibre</a> that would allow you to do it. Now you use <a href="https://calibre-ebook.com/" rel="nofollow noreferrer">Calibre</a> to convert from the command line using the Calibre executable <a href="https://manual.calibre-ebook.com/generated/en/ebook-convert.html" rel="nofollow noreferrer">ebook-convert</a>:</p>
  <pre><code>ebook-convert myfile.input_format myfile.output_format -h
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-20T21:41:55.893Z
Answers.LastActivityDate: 2021-11-20T21:41:55.893Z
Answers.UserDisplayName: neves
Answers.Body: <p>I’m not sure you can generate an AZK from the command line. From <a href="https://wiki.mobileread.com/wiki/KindleGen" rel="nofollow noreferrer">https://wiki.mobileread.com/wiki/KindleGen</a></p>
  
  <blockquote>
    <p>Note that Kindle Previewer is currently the only way to generate AZK files for iOS use.</p>
  </blockquote>
  
  <p>Not the answer you seek, but an answer. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-22T23:50:28.210Z
Answers.LastActivityDate: 2019-10-22T23:50:28.210Z
Answers.UserDisplayName: StandardEyre
Answers.Body: <p>You can generate via caliber..</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T15:28:25.403Z
Answers.Text: Welcome to the site Anthony! If you could link to some documentation and put a summary of the steps in your answer (in case the link ever changes) that would be very helpful, thanks!
Answers.UserDisplayName: Jason Down
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-17T12:28:14.147Z
Answers.Text: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/6142)
Answers.UserDisplayName: mmmmmm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-26T14:21:50.487Z
Answers.LastActivityDate: 2020-11-26T14:21:50.487Z
Answers.UserDisplayName: Anthony Xavier
Body: <p>I'm trying to generate an AZK file from the command line.</p>
  
  <p>I need an AZK file because I need to test my Kindle books on iOS devices. These books are in Japanese, which currently is not supported for Enhanced Typesetting, so I need to sideload an AZK file. It's a pain to generate this in Kindle Previewer each time, so I want to automate the process.</p>
  
  <p>The source file is an epub.</p>
  
  <p>I convert the epub with Kindle Previewer 3 via the command line:</p>
  
  <p><code>kindlepreviewer myfile.epub -convert -showpreview</code></p>
  
  <p>This will create a mobi from the epub and then launch Kindle Previewer.  From Kindle Previewer, I can then go to File->Export and output an AZK-- this is the part I want to automate.</p>
  
  <p>It seems there was a <a href="https://libraries.io/go/github.com%2Ftooolbox%2Fgozak" rel="nofollow noreferrer">tool called Gozak</a> for doing this but it's not available anymore.</p>
  
  <p>I tried running <strong>azkcreator</strong> via the path in MacOS but it just segfaults:</p>
  
  <pre><code>➜  ~ /Applications/Kindle\ Previewer\ 3.app/Contents/MacOS/lib/azkcreator
  [1]    18208 segmentation fault  /Applications/Kindle\ Previewer\ 3.app/Contents/MacOS/lib/azkcreator
  </code></pre>
  
  <p>So, my guess is that there is no way to create an AZK file from the command line at the moment-- but I hope someone can prove me wrong!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-03T06:25:50.137Z
Comments.Text: If you create a repo called `gozak` on Github, I will give you a PR with the source.
Comments.UserDisplayName: Matt Mc
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-01T12:14:24.407Z
Comments.Text: @MattMc Thanks! https://github.com/ptmkenny/gozak
Comments.UserDisplayName: Patrick Kenny
Tags: <kindle><mobi><ios>
Title: How to generate Kindle AZK on the command line from mobi/epub?
UserDisplayName: Patrick Kenny
ThreadText: # How to generate Kindle AZK on the command line from mobi/epub?
  
  (Asked by: username_0 on 2019-10-22)
  
  I'm trying to generate an AZK file from the command line.
  
  I need an AZK file because I need to test my Kindle books on iOS devices. These books are in Japanese, which currently is not supported for Enhanced Typesetting, so I need to sideload an AZK file. It's a pain to generate this in Kindle Previewer each time, so I want to automate the process.
  
  The source file is an epub.
  
  I convert the epub with Kindle Previewer 3 via the command line:
  
  `kindlepreviewer myfile.epub -convert -showpreview`
  
  This will create a mobi from the epub and then launch Kindle Previewer. From Kindle Previewer, I can then go to File->Export and output an AZK-- this is the part I want to automate.
  
  It seems there was a [tool called Gozak](https://libraries.io/go/github.com%2Ftooolbox%2Fgozak) for doing this but it's not available anymore.
  
  I tried running **azkcreator** via the path in MacOS but it just segfaults:
  
  ```
  ➜  ~ /Applications/Kindle\ Previewer\ 3.app/Contents/MacOS/lib/azkcreator
  [1]    18208 segmentation fault  /Applications/Kindle\ Previewer\ 3.app/Contents/MacOS/lib/azkcreator
  
  ```
  
  So, my guess is that there is no way to create an AZK file from the command line at the moment-- but I hope someone can prove me wrong!
  
  **Tags:** kindle, mobi, ios
  
  > **Comments:**
  > **username_1**: If you create a repo called `gozak` on Github, I will give you a PR with the source.  
  > **username_0**: @username_1 Thanks! https://github.com/ptmkenny/gozak  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2021-11-20. Score: 2
  
  AFAIK, you can't directly convert from the command line using Kindle Previewer. You also can't convert multiple files.
  
  But there is a [plugin for Calibre](https://wiki.mobileread.com/wiki/Kindle_Previewer#Calibre_plugin) that would allow you to do it. Now you use [Calibre](https://calibre-ebook.com/) to convert from the command line using the Calibre executable [ebook-convert](https://manual.calibre-ebook.com/generated/en/ebook-convert.html):
  
  ```
  ebook-convert myfile.input_format myfile.output_format -h
  
  ```
  
  
  ---
  
  ### Answer by username_3 on 2019-10-22. Score: 1
  
  I’m not sure you can generate an AZK from the command line. From <https://wiki.mobileread.com/wiki/KindleGen>
  
  > Note that Kindle Previewer is currently the only way to generate AZK files for iOS use.
  
  Not the answer you seek, but an answer.
  
  
  ---
  
  ### Answer by username_4 on 2020-11-26. Score: -1
  
  You can generate via caliber..
  
  > **Comments:**
  > **username_5**: Welcome to the site username_4! If you could link to some documentation and put a summary of the steps in your answer (in case the link ever changes) that would be very helpful, thanks!  
  > **username_6**: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/6142)  
  
  ---
  
  