Skip to content

Commit

Permalink
allow build mobi
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherry520 committed Aug 16, 2024
1 parent 4d29e59 commit 00d8491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ gem 'thread_safe'
gem 'epubcheck-ruby'
gem 'html-proofer'

#gem 'kindlegen', '3.1.1'
gem 'kindlegen', '3.1.1'
11 changes: 3 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ namespace :book do
end

desc 'build basic book formats'
task :build => [:build_html, :build_epub, :build_fb2, :build_pdf] do
#task :build => [:build_html, :build_epub, :build_fb2, :build_mobi, :build_pdf] do
task :build => [:build_html, :build_epub, :build_fb2, :build_mobi, :build_pdf] do
begin
# Run check
Rake::Task['book:check'].invoke
Expand All @@ -59,8 +58,7 @@ namespace :book do
end

desc 'build basic book formats (for ci)'
task :ci => [:build_html, :build_epub, :build_fb2, :build_pdf] do
#task :ci => [:build_html, :build_epub, :build_fb2, :build_mobi, :build_pdf] do
task :ci => [:build_html, :build_epub, :build_fb2, :build_mobi, :build_pdf] do
# Run check, but don't ignore any errors
Rake::Task['book:check'].invoke
end
Expand Down Expand Up @@ -102,7 +100,6 @@ namespace :book do

end

=begin
desc 'build Mobi format'
task :build_mobi => 'book/contributors.txt' do
check_contrib()
Expand All @@ -111,7 +108,6 @@ namespace :book do
sh "bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc"
puts " -- Mobi output at progit.mobi"
end
=end

desc 'build PDF format'
task :build_pdf => 'book/contributors.txt' do
Expand All @@ -135,8 +131,7 @@ namespace :book do
begin
puts 'Removing generated files'

FileList['book/contributors.txt', 'progit.html', 'progit-kf8.epub', 'progit.epub', 'progit.fb2.zip', 'progit.pdf'].each do |file|
#FileList['book/contributors.txt', 'progit.html', 'progit-kf8.epub', 'progit.epub', 'progit.fb2.zip', 'progit.mobi', 'progit.pdf'].each do |file|
FileList['book/contributors.txt', 'progit.html', 'progit-kf8.epub', 'progit.epub', 'progit.fb2.zip', 'progit.mobi', 'progit.pdf'].each do |file|
rm file

# Rescue if file not found
Expand Down

0 comments on commit 00d8491

Please sign in to comment.