1 Star 1 Fork 0

leo108/progit2-zh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Rakefile 856 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ben Straub 提交于 2014-10-21 23:43 +08:00 . Copy image files when building book
namespace :book do
desc 'prepare build'
task :prebuild do
Dir.mkdir 'images' unless Dir.exists? 'images'
Dir.glob("book/*/images/*").each do |image|
FileUtils.copy(image, "images/" + File.basename(image))
end
end
desc 'build basic book formats'
task :build => :prebuild do
puts "Converting to HTML..."
`bundle exec asciidoctor progit.asc`
puts " -- HTML output at progit.html"
puts "Converting to EPub..."
`bundle exec asciidoctor-epub3 progit.asc`
puts " -- Epub output at progit.epub"
puts "Converting to Mobi (kf8)..."
`bundle exec asciidoctor-epub3 -a ebook-format=kf8 progit.asc`
puts " -- Mobi output at progit.mobi"
puts "Converting to PDF... (this one takes a while)"
`bundle exec asciidoctor-pdf progit.asc 2>/dev/null`
puts " -- PDF output at progit.pdf"
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/leo108/progit2-zh.git
git@gitee.com:leo108/progit2-zh.git
leo108
progit2-zh
progit2-zh
master

搜索帮助