1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[guides] guides:generate:kindle is the new interface to generate .mobi file instead of using KINDLE=1

This commit is contained in:
Rafael Magana 2012-05-28 16:20:10 -05:00
parent 1b5e1c1972
commit 15b229e8aa
3 changed files with 3 additions and 18 deletions

View file

@ -11,7 +11,7 @@ namespace :guides do
ruby "rails_guides.rb" ruby "rails_guides.rb"
end end
desc "Generate .mobi file" desc "Generate .mobi file. The kindlegen executable must be in your PATH. You can get it for free from http://www.amazon.com/kindlepublishing"
task :kindle do task :kindle do
ENV['KINDLE'] = '1' ENV['KINDLE'] = '1'
Rake::Task['guides:generate:html'].invoke Rake::Task['guides:generate:html'].invoke
@ -59,14 +59,10 @@ Some arguments may be passed via environment variables:
EDGE=1 EDGE=1
Indicate generated guides should be marked as edge. Indicate generated guides should be marked as edge.
KINDLE=1
Generate .mobi with all the guides.
Examples: Examples:
$ rake guides:generate ALL=1 $ rake guides:generate ALL=1
$ rake guides:generate KINDLE=1
$ rake guides:generate:kindle
$ rake guides:generate EDGE=1 $ rake guides:generate EDGE=1
$ rake guides:generate:kindle EDGE=1
$ rake guides:generate GUIDES_LANGUAGE=es $ rake guides:generate GUIDES_LANGUAGE=es
help help
end end

View file

@ -47,11 +47,6 @@
# Set to "1" to indicate generated guides should be marked as edge. This # Set to "1" to indicate generated guides should be marked as edge. This
# inserts a badge and changes the preamble of the home page. # inserts a badge and changes the preamble of the home page.
# #
# KINDLE
# Set to "1" to generate the .mobi with all the guides. The kindlegen
# executable must be in your PATH. You can get it for free from
# http://www.amazon.com/kindlepublishing
#
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
require 'set' require 'set'

View file

@ -97,13 +97,7 @@ h3. Kindle Guides
h4(#generation-kindle). Generation h4(#generation-kindle). Generation
To generate guides for the Kindle, you need to provide +KINDLE=1+ as an environment variable: To generate guides for the Kindle, use the following rake task:
<plain>
KINDLE=1 bundle exec rake guides:generate
</plain>
or you can use the following task:
<plain> <plain>
bundle exec rake guides:generate:kindle bundle exec rake guides:generate:kindle