Skip to content

Commit

Permalink
Drop MOBI support (#458)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slonopotamus authored Jan 16, 2024
1 parent aec6be1 commit 394ec4c
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 440 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
This document provides a high-level view of the changes to the {project-name} by release.
For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.

== Unreleased

* Drop MOBI support

== 2.0.1 (2024-01-13) - @slonopotamus

* restore styling of `<strong>` and `<em>` (#461)
Expand Down
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ group :optional do
# epubcheck-ruby might be safe to be converted into runtime dependency,
# but could have issues when packaged into asciidoctorj-epub3
gem 'epubcheck-ruby', '~> 5.1.0.0'

# Kindlegen is unavailable neither for 64-bit x86 macOS nor for ARM
# Also, skip JRuby on Windows for now. See https://github.com/jruby/jruby/issues/7171
gem 'kindlegen', '~> 3.1.0' unless RUBY_PLATFORM =~ /darwin/ || (Gem.win_platform? && RUBY_ENGINE == 'jruby')
end
11 changes: 1 addition & 10 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[project chat,
image:https://img.shields.io/gem/v/asciidoctor-epub3.svg[Latest Release,link={uri-gem}]
image:{uri-project}/workflows/CI/badge.svg?branch=main[GitHub Actions,link={uri-ci}]

{project-name} is a set of Asciidoctor extensions for converting AsciiDoc documents directly to the EPUB3 and KF8/MOBI e-book formats.
{project-name} is a set of Asciidoctor extensions for converting AsciiDoc documents directly to the EPUB3 e-book format.

== Documentation

Expand Down Expand Up @@ -53,15 +53,6 @@ $ asciidoctor-epub3 -D output path/to/book.adoc
When the script completes, you'll see the file [file]_book.epub_ appear in the [path]_output_ directory.
Open that file with an EPUB3 reader to view the result.

You may also produce KF8/MOBI file by setting `ebook-format` attribute to `kf8`.

[source,shell script]
----
$ asciidoctor-epub3 -D output -a ebook-format=kf8 path/to/book.adoc
----

When the script completes, the file [file]_book.mobi_ will appear in [path]_output_ directory.

== Contributing

In the spirit of free software, _everyone_ is encouraged to help improve this project.
Expand Down
12 changes: 0 additions & 12 deletions WORKLOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* reorder sections in README; needs to flow a bit better...Getting Started is too large & after Structuring your Manuscript
* link to https://medium.com/@sandersk/responsive-ebook-design-a-primer-8bba01328219 in style section in README
* only uppercase document title if detected in CSS
* add empty front matter page in kf8 version if one is specified to allow navigation to first entry from TOC
** why can't we navigate to first chapter on Kindle from TOC?
* document more clearly how to provide your own CSS
** currently it's not possible to override the epub3-fonts.css (though it should be)
* cleanup this sanitize XML stuff; move to Asciidoctor::Helpers?
Expand Down Expand Up @@ -43,7 +41,6 @@
* MEDIUM: add icon & icon placement as attributes on btn macro
* MEDIUM: move client sniffer JavaScript to file and read/include from converter
* MEDIUM: use the dfn element for defining a definition of a term (not just term class); see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn
* MEDIUM: to remove text indent in mobi7, set width="0pt" (text-indent) on <p> tag; also set height="1em" (margin top)
* MEDIUM: create back link in bibliography entry for each reference to it (currently only the first)
* implement checklists

Expand All @@ -70,14 +67,12 @@

table.table div.embed > *:not(p) { font-size: 1.25em; }

* HIGH: kindlegen no longer strips <header> elements, so we can drop our div wrapper hack
* HIGH: don't set text color so light on monochrome devices (use media query to detect) (#67)
* HIGH: make justify-text a class on body that can be controlled from AsciiDoc attribute
* HIGH: image border option (or add drop shadow to screenshots in README)
* HIGH: review the table border color
* HIGH: style example block
* HIGH: allow theme to be customized using stylesheet attribute
* HIGH: move -webkit-hyphens: auto to epub3-css3-only inside @media not amzn-kf8? (if we decide to reenable)
* MEDIUM: headshot has too much top margin when at top of page (not below section title)
* MEDIUM: namo pubtree is justifying preformatted blocks (still true?)
* support both jpg and png avatars
Expand Down Expand Up @@ -131,13 +126,6 @@
* Control+Shift+u to type in a unicode sequent, then press enter to accept
* Calibre gets confused when there are local fonts that closely match font in stylesheet, uses them over embedded styles (in particular M+ weights)
* iBooks info: http://authoradventures.blogspot.com/2013/08/ibooks-tutorial-update-version-30.html
* use the following media query to target non-Kindle devices (works in iBooks at least)

@media not amzn-kf8 {
@media not amzn-mobi {
}
}

* selector for all prose text (including symbols)

body p, ul, ol, li, dl, dt, dd, figcaption, caption, footer,
Expand Down
6 changes: 3 additions & 3 deletions asciidoctor-epub3.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Gem::Specification.new do |s|
s.name = 'asciidoctor-epub3'
s.version = Asciidoctor::Epub3::VERSION

s.summary = 'Converts AsciiDoc documents to EPUB3 and KF8/MOBI (Kindle) e-book formats'
s.summary = 'Converts AsciiDoc documents to EPUB3 e-book format'
s.description = <<~EOS
An extension for Asciidoctor that converts AsciiDoc documents to EPUB3 and KF8/MOBI (Kindle) e-book archives.
An extension for Asciidoctor that converts AsciiDoc documents to EPUB3 e-book format.
EOS

s.authors = ['Dan Allen', 'Sarah White']
Expand All @@ -25,7 +25,7 @@ Gem::Specification.new do |s|
Dir['**/*']
end
s.files = files.grep %r{^(?:(?:data/(?:fonts|images|styles)|lib)/.+|Gemfile|Rakefile|LICENSE|(?:CHANGELOG|NOTICE|README)\.adoc|\.yardopts|#{s.name}\.gemspec)$}
s.executables = %w[asciidoctor-epub3 adb-push-ebook]
s.executables = %w[asciidoctor-epub3]

s.require_paths = ['lib']

Expand Down
37 changes: 0 additions & 37 deletions bin/adb-push-ebook

This file was deleted.

2 changes: 1 addition & 1 deletion data/samples/sample-book.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ v1.0, 2014-04-15
:doctype: book
:epub-chapter-level: 2
:producer: Asciidoctor
:keywords: Asciidoctor, samples, e-book, EPUB3, KF8, MOBI, Asciidoctor.js
:keywords: Asciidoctor, samples, e-book, EPUB3, Asciidoctor.js
:copyright: CC-BY-SA 3.0
:username: graphitefriction
:description: This guide describes the Asciidoctor attributes, values, and layout options available for producing a customized and polished document.
Expand Down
1 change: 1 addition & 0 deletions data/styles/epub3-css3-only.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ body code, body kbd, body :not(.verse) > pre, :not(.verse) > pre :not(code) {
font-family: "M+ 1mn", monospace !important;
}

/* TODO: DO we still need this? */
@media amzn-kf8 {
/* Kindle does its own margin management, so don't use an explicit margin */
/*body {
Expand Down
7 changes: 5 additions & 2 deletions data/styles/epub3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ div.verse {
page-break-inside: avoid;
}

/* TODO we may want to reenable hyphens here, but not for kf8 */
/* TODO we may want to reenable hyphens here */
div.verse > pre {
font-family: "M+ 1p", sans-serif;
background-color: transparent;
Expand Down Expand Up @@ -1160,7 +1160,10 @@ nav[hidden~="hidden"] {
}

@media amzn-mobi {
/* NOTE mobi7 doesn't support custom fonts, so revert to generic ones */
/*
NOTE mobi7 doesn't support custom fonts, so revert to generic ones.
See https://github.com/asciidoctor/asciidoctor-epub3/issues/56.
*/
body p, ul, ol, li, dl, dt, dd, figcaption, caption, footer,
table.table th, table.table td, div.verse .attribution {
font-family: serif;
Expand Down
Loading

0 comments on commit 394ec4c

Please sign in to comment.