Skip to content

Commit 5eb9b0c

Browse files
authored
Merge pull request #1655 from HonkingGoose/patch-2
Enable .mobi (Kindle) format again
2 parents dc497f8 + bdeca52 commit 5eb9b0c

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

README.asc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ See link:TRANSLATING.md[the translating document] for more information.
1515
== How To Generate the Book
1616

1717
You can generate the e-book files manually with Asciidoctor.
18-
We used to be able to build .mobi files (Kindle), but cannot do so now, see #1496 for more information.
19-
If you run the following you _may_ actually get HTML, Epub and PDF output files:
18+
If you run the following you _may_ actually get HTML, Epub, Mobi and PDF output files:
2019

2120
----
2221
$ bundle install
@@ -25,11 +24,13 @@ Converting to HTML...
2524
-- HTML output at progit.html
2625
Converting to EPub...
2726
-- Epub output at progit.epub
27+
Converting to Mobi (kf8)...
28+
-- Mobi output at progit.mobi
2829
Converting to PDF...
2930
-- PDF output at progit.pdf
3031
----
3132

32-
You can generate just one of the supported formats (HTML, EPUB, or PDF).
33+
You can generate just one of the supported formats (HTML, EPUB, mobi, or PDF).
3334
Use one of the following commands:
3435

3536
To generate the HTML book:
@@ -44,6 +45,12 @@ To generate the EPUB book:
4445
$ bundle exec rake book:build_epub
4546
----
4647

48+
To generate the mobi book:
49+
50+
----
51+
$ bundle exec rake book:build_mobi
52+
----
53+
4754
To generate the PDF book:
4855

4956
----

Rakefile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,9 @@ namespace :book do
8484

8585
desc 'build Mobi format'
8686
task :build_mobi => 'book/contributors.txt' do
87-
# Commented out the .mobi file creation because the kindlegen dependency is not available.
88-
# For more information on this see: #1496.
89-
# This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
90-
91-
# puts "Converting to Mobi (kf8)..."
92-
# `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
93-
# puts " -- Mobi output at progit.mobi"
94-
95-
# FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below
96-
puts "Converting to Mobi isn't supported yet."
97-
puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496."
98-
exit(127)
87+
puts "Converting to Mobi (kf8)..."
88+
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
89+
puts " -- Mobi output at progit.mobi"
9990
end
10091

10192
desc 'build PDF format'

0 commit comments

Comments
 (0)