I've gone through the code and made several changes for drush 2.0, fixed typos, and added a few help callbacks. There's plenty of cleanup left but now it works for me for listing and exporting cck types, variables, and views.
While I was at it I decided to make the optional directory argument for the export action mandatory, and to make the list and export actions take an optional list of variables or views to act upon. I find I often want to only export a few views or variables at a time, and with this optional argument, the directory needs to be a required first argument so that the arguments aren't ambiguous. In the future this ought to take the * wildcard in arguments, to allow exporting all variables matching theme*, for example.
I have tested the export and list actions, but I haven't even tried the import functions.
Also, I believe the files drush_sm.info and drush_sm.module should be deleted.
The patch file for my changes turned out to be longer than the original file, so I've posted my changes here: http://drupal.pastebin.com/f6585abac
Feedback very welcome. I am very interested in using this tool as part of my development process so I'd like to see it improve.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 466588.patch | 15.76 KB | mvc |
Comments
Comment #1
mvcI've just made another change: the required directory argument I mentioned above can now be the character - to allow dumping to standard output.
New version: http://drupal.pastebin.com/f338d7570
Comment #2
mvcAnd here's the patch file, for reference.
Comment #3
clemens.tolboomThere are some nice things in your patch ... hope to apply these soon.
Comment #4
clemens.tolboomThanks mvc for the 'hints'.
I did a complete restructure of the code base and implemented your stdout.
If you want to contribute a *.sm.inc that would be great. blocks would be the first on my list ;)
Hope you find my changes to you likings.