I think the title says it all... I may look into this sometime this week to see how hard it would be to pull off..

Comments

Garrett Albright’s picture

I wouldn't be against this, but I'm totally unfamiliar with Drush, so I wouldn't be able to pull it off myself. (I really should look into it one of these days…)

redpuma’s picture

Version: 6.x-1.x-dev » 6.x-1.1-beta6

I've been using DRUSH but not developing for it yet, however there is a list of modules which integrate with DRUSH here
http://drupal.org/taxonomy/term/4654.
There looks like a good example of how to integrate within the Features module in the
features.drush.inc file.

Maybe if I get time I'd have a look, could be an interesting task.

betz’s picture

yeah this would be a great feature indeed :)

Garrett Albright’s picture

Howdy, folks! Assuming I didn't screw anything up, when the release bot packages the next dev release, it should include support for Drush. Getting it to work ended up being less work than I thought it would be. It seems to work well, but I haven't extensively tested for bugs - that's what you guys are for. If you're interested in using Drush with Zenophile, please give it a try when the package becomes available.

As a sneak peek, here's the help text (though Drupal's code filter seems to be wrapping it strangely).

Creates Zen subthemes quickly and easily.

Examples:
  zenophile foo_t "A great theme for Foo!"      Create a new theme named "foo_t" and give it a description

Arguments:
  sysname       The machine-compatible name of the new theme. This name may only consist of lowercase letters plus the underscore character.
  description   A short description of this theme.                                                                                          

Options:
  --parent              The parent theme for the new theme. Default: STARTERKIT                                                                                                                                                                                                   
  --friendly            A human-friendly name for the new theme. This name may contain uppercase letters, spaces, punctuation, etc. Default: Theme's sysname.                                                                                                                     
  --layout              "fixed" or "liquid". Default: fixed                                                                                                                                                                                                                       
  --site                Which site directory will the new theme to be placed in? Default: all                                                                                                                                                                                     
  --fresh               Adds a blank CSS file named '[theme_name]-fresh' to the new theme. Enabled by default; use '--fresh=0' to disable.                                                                                                                                        
  --sidebar-left        Left sidebar width, in pixels. Default: 200                                                                                                                                                                                                               
  --sidebar-right       Right sidebar width, in pixels. Default: 200                                                                                                                                                                                                              
  --page                Page wrapper (#page) width, in pixels. Ignored if --layout="liquid". Default: 960                                                                                                                                                                         
  --sidebar-pos         Sidebar positions. Possible values are "left" to place both sidebars to the left of the main content area; "right" to place both sidebars to the right of the main content area; and "normal" to have each sidebar on its respective side. Default: normal
q0rban’s picture

Status: Active » Needs review

Garrett,
Nice! Glad it turned out to be simpler than you thought. :D

q0rban’s picture

Status: Needs review » Fixed

Oops, I guess I should mark this as fixed, since it's been committed. Post new issues for bug reports.

Garrett Albright’s picture

Version: 6.x-1.1-beta6 » 6.x-1.x-dev
Status: Fixed » Needs review

No, I want to leave this open at least until I make a beta release with these updates.

Garrett Albright’s picture

Version: 6.x-1.x-dev » 6.x-1.1-beta9
Status: Needs review » Fixed

Okay, Beta 9 will have the Drush compatibility tweaks. Please try!

scottrigby’s picture

nice work :)

one thing i noticed: when drush-creating a subtheme from within a site-specific multi-site directory (sites/MYSITE) the subtheme is still added to sites/all/themes - rather than sites/MYSITE/themes. Not sure if that's by design though (though.... is it decent practice to have a subtheme in a site-specific folder when zen is in in sites/all/themes anyway?)

PS, looking forward to using this in combo with #530780: drush commands to administer themes

Garrett Albright’s picture

one thing i noticed: when drush-creating a subtheme from within a site-specific multi-site directory (sites/MYSITE) the subtheme is still added to sites/all/themes - rather than sites/MYSITE/themes. Not sure if that's by design though

It sort of is. Use a --site parameter to specify which site directory the theme should be placed in.

(though.... is it decent practice to have a subtheme in a site-specific folder when zen is in in sites/all/themes anyway?)

Yeah, it works fine. I do it all the time.

scottrigby’s picture

Thanks for the info Garret!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.