Permalink
Browse files

reworkding scripts for book-is-a-subdir world

  • Loading branch information...
1 parent 0fd0d97 commit 9ebdb70d77bed7c503b13b1488c0e9358bdd0416 Philip (flip) Kromer committed Aug 18, 2012
Showing with 24 additions and 25 deletions.
  1. +1 −1 Gemfile
  2. +4 −2 Guardfile
  3. +16 −18 Rakefile
  4. +1 −1 big_data_for_chimps
  5. +2 −3 tasks/git_scribe.rake
View
2 Gemfile
@@ -3,7 +3,7 @@ source 'http://rubygems.org'
gem 'configliere'
gem 'gorillib', :github => 'infochimps-labs/gorillib', :branch => 'version_1'
-gem 'wukong', :github => 'infochimps-labs/wukong', :branch => 'vanilla_2'
+gem 'wukong', :github => 'infochimps-labs/wukong', :branch => 'master'
# gem 'gorillib', :path => '../../core/gorillib'
# gem 'wukong', :path => '../../core/wukong_og'
View
6 Guardfile
@@ -16,9 +16,11 @@ require 'guard/notifiers/emacs'
# watch(%r{file/path}) { `command(s)` }
#
guard 'shell' do
- watch(/([^\/]+).asciidoc/) do |match|
+ book_dir = "big_data_for_chimps"
+ ENV['BOOK_CONTENTS'] = File.expand_path(book_dir)
+ watch(/#{book_dir}\/([^\/]+).asciidoc/) do |match|
p [match]
- system 'dexy', '--loglevel', 'DEBUG', '--run', "#{match[0]}" and
+ system 'dexy', '--loglevel', 'DEBUG', '--directory', book_dir, '--run', match[0]and
system 'rake', '--trace', 'gen:html', '--rules', '--', "--book_file=output/#{match[0]}"
end
end
View
34 Rakefile
@@ -1,16 +1,15 @@
require 'logger'
require 'configliere' ; Settings.use :commandline
require 'gorillib/model'
-Log = Logger.new($stderr).tap{|log| log.level = Logger::WARN } unless defined?(Log)
+Log = Logger.new($stderr).tap{|log| log.level = Logger::DEBUG } unless defined?(Log)
-# load 'tasks/git_scribe.rake'
+load 'tasks/git_scribe.rake'
-# Settings.book_file = File.expand_path(
-# 'big_data_for_chimps/ba06-semi_structured_data-d-airline_flights.asciidoc',
-# File.dirname(__FILE__))
-# Settings.resolve!
-# Log.level = Logger::DEBUG if Settings.verbose
-# Log.debug{ "configuration: #{Settings.inspect}" }
+Settings.book_file = File.expand_path(
+ 'output/big_data_for_chimps/ba06-semi_structured_data-d-airline_flights.asciidoc',
+ File.dirname(__FILE__))
+Settings.resolve!
+Log.debug{ "configuration: #{Settings.inspect}" }
#
# Top-level rake tasks
@@ -38,14 +37,13 @@ task :init do
sh('dexy setup')
end
-
-# # --------------------------------------------------------------------------
-# #
-# # Rake Task definitions for book
-# #
+# --------------------------------------------------------------------------
+#
+# Rake Task definitions for book
#
-# HtmlTask.new.tasks
-# PdfTask.new.tasks
-# DocbookTask.new.tasks
-# EpubTask.new.tasks
-# # MobiTask.new.tasks
+
+HtmlTask.new.tasks
+PdfTask.new.tasks
+DocbookTask.new.tasks
+EpubTask.new.tasks
+# MobiTask.new.tasks
2 big_data_for_chimps
@@ -1 +1 @@
-Subproject commit d0462f88955211d6d32044670879ded97a2902cb
+Subproject commit 5271a3e2e5fec31ffde62890853ff5b76e457c8a
View
5 tasks/git_scribe.rake
@@ -3,16 +3,15 @@
require 'configliere'
require 'gorillib/model'
-
Settings.use :commandline
-Settings.define :verbose, default: true, flag: 'v', type: :boolean
+
Settings.define :force, default: false, description: "If true, force output generation (ie pretend all dependencies were updated)", type: :boolean
Settings.define :book_file, default: 'book.asciidoc'
Settings.define :publish, default: false, type: :boolean
Settings.define :edition, default: '0.1'
Settings.define :language, default: 'en'
Settings.define :version, default: '1.0'
-Settings.define :output_dir, default: 'output-scribe', description: "Path to the output directory"
+Settings.define :output_dir, default: 'final', description: "Path to the output directory"
Settings.define :output_types, default: ['docbook', 'html', 'pdf', 'epub', 'mobi', 'site'], type: Array
Settings.define :repo_dir, finally: ->(c){ c[:repo_dir] = Dir.pwd }, type: :filename
Settings.define :assets_dir, default: 'git-scribe', type: :filename

0 comments on commit 9ebdb70

Please sign in to comment.