I’ve updated Planter to 1.3 with a few new features. Previously, it created directory structures based on tab-indented folder trees in plain text, using either the command line or LaunchBar (original post, and the LaunchBar version). Now, it handles file templates as well as slightly more advanced variables.

Templates are (as before) read from ~/.planter. Any file in that directory with the extension “tpl” is available for quickly planting a new project, client info, etc.. Now you can place non-template files in that directory, and any time you use the filename in a template or scratch file, it will copy the original file to that location in the directory structure. For more info on the basics of usage and templates, see the original post. It works with folders as well, so you can pre-build an entire structure and use Planter to add variables to the base folder names, etc.

Example, files and folders mixed in template:

public
	index.html
	js
		jquery.js
	css
		style.css
	images

Speaking of variables, Planter can now handle default values. If you add a pipe and a string within a placeholder (%%1|public%%), the variable will no longer be required to publish the template. If no argument is passed, it defaults to the string after the pipe. Variables still require that you enter their replacements in the order they’re numbered, so if you want to change number three, you still have to pass one and two. Defaults are most useful when you only have one or two variables in a template.

Example with variable top-level folder name and default value:

%%1|public%%
	index.html
	js
		jquery.js
	css
		style.css
	images

I’ve updated the LaunchBar and CLI versions of Planter, and combined them into one download. If I find the time, I will make a version for Alfred 2, as I think it could be a lot smoother than the current process using LaunchBar and CocoaDialog.

I find this tool useful enough to justify the time spent on it, hope some other folks get some use out of it, too.

Planter for LaunchBar/CLI v1.3

Instantly create nested directory structures from indented text

Published 05/05/13.

Updated 05/05/13. Changelog

DonateMore info…