diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2024-01-16 11:12:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-16 22:12:02 +0300 |
| commit | 394ec4cd5283725f1e1c92fde8266524b26aebfd (patch) | |
| tree | 6fd7745d1b254a75b3f95fc4691b368a0a77a0ef /bin | |
| parent | aec6be126965f622624f611070645fc1931bf18a (diff) | |
Drop MOBI support (#458)
Amazon is slowly killing it, it's just a question of time when it fully dies.
References:
* https://kdp.amazon.com/en_US/help/topic/GULSQMHU5MNH4EZM
> Starting August 1, 2021, we will no longer support MOBI files for reflowable eBooks. Use EPUB, DOCX or KPF to publish new or update reflowable eBooks.
* https://www.amazon.com/gp/help/customer/display.html?nodeId=G5WYD9SAF7PGXRNA
> Beginning in late 2022, you'll no longer be able to send MOBI (.AZW, .MOBI) files to your Kindle library using Send to Kindle. This change won't affect any MOBI files already in your Kindle library. You can still read them with Kindle. MOBI is an older file format and won't support the newest Kindle features for documents.
* https://www.reddit.com/r/kindle/comments/16rw6e3/amazon_announcement_about_mobi_support_timeline/
> We will end all Send to Kindle support for MOBI files by December 20, 2023.
* https://www.mobileread.com/forums/showthread.php?t=336365
> Does anyone still have Kindle Previewer installer older than 3.49 that you could share? The reason I am looking for it is because newer versions no longer open .mobi files.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/adb-push-ebook | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/bin/adb-push-ebook b/bin/adb-push-ebook deleted file mode 100755 index ca9b074..0000000 --- a/bin/adb-push-ebook +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -ADB = ENV['ADB'] || 'adb' -TARGETS = { - '.epub' => '/sdcard/', - '.mobi' => '/sdcard/Android/data/com.amazon.kindle/files/' -}.freeze - -unless File.executable? ADB - warn %(adb-push-ebook: `adb` not found.\nPlease set the ADB environment variable or add `adb` to your PATH.) - exit 1 -end - -require 'open3' -require 'shellwords' - -payload_file = ARGV[0] || '_output/sample-book' - -transfers = if (payload_file_ext = File.extname payload_file).empty? - TARGETS.map do |(ext, target_dir)| - { - src: %(#{payload_file}#{ext}), - dest: target_dir - } - end - else - [{ src: payload_file, dest: TARGETS[payload_file_ext] }] - end - -transfers.each do |transfer| - next unless File.file? transfer[:src] - - Open3.popen2e Shellwords.join([ADB, 'push', transfer[:src], transfer[:dest]]) do |_input, output, _wait_thr| - output.each { |line| puts line } - end -end |
