Sha256: 23a8080076a87b5efe83b90c075ec2490f51a9922fd878becfa667b2d17576bf

Contents?: true

Size: 603 Bytes

Versions: 11

Compression:

Stored size: 603 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'flannel'

module Flannel
  class QuiltIt
    def self.run! *args
      args.each do|a|
	if File.exists?(a)
	  contents = IO.read(a) 
	  
	  doc = Flannel::quilt contents
	  file_n_path = "#{strip_extension(a)}.html"
	  File.open(file_n_path, 'w') {|f| f.write(doc) }
	else
	  puts "Can't find #{a}."
	end
      end
      
      return 1
    end

    def self.strip_extension name
      return name unless name[-8..-1] == '.flannel'
      name[0..-9]
    end
  end
end
    
exit Flannel::QuiltIt.run!(*ARGV)

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
flannel-0.2.10 bin/quilt-it~
flannel-0.2.9 bin/quilt-it~
flannel-0.2.7 bin/quilt-it~
flannel-0.2.6 bin/quilt-it~
flannel-0.2.5 bin/quilt-it~
flannel-0.2.4 bin/quilt-it~
flannel-0.2.3 bin/quilt-it~
flannel-0.2.1 bin/quilt-it~
flannel-0.1.5 bin/quilt-it~
flannel-0.1.4 bin/quilt-it~
flannel-0.1.3 bin/quilt-it