Skip to content

Instantly share code, notes, and snippets.

@PogiNate
PogiNate / planter.rb
Created December 13, 2012 16:43 — forked from ttscoff/planter.rb
Branch of Brett Terpstra's Planter, with some changes.
#!/usr/bin/env ruby
# ruby script to create a directory structure from indented data.
# Two ways to use it now:
# Pass it a path to a template file.
# p = planter.new
# p.plant(path/to/template.tpl)
#
# or just call it with a simple name and it will look in ~/.planter for a template that matches that name.
# You can put %%X%% variables into templates, where X is a number that corresponds to the index
# of the argument passed when planter is called.