Wiz 0.9.5: Admin & Developer Tools, Batch Output

The latest batch of Wiz updates includes some useful stuff for developers as well as some administrative features. Included in this bundle of Wizzy goodness is the ability to output any table output in csv, pipe, or tab delimited output. This makes it very easy to utilize Wiz with other commands (or potentially feed information from Wiz back into itself!)
c
Here is a complete list of the changes in 0.9.5:

  1. The internal configuration system was rewritten to look more like Magento’s own configuration system — using XML files. This isn’t really used heavily yet, but we’ve got some stuff coming in the next few months that will take full advantage of this.
  2. You can now toggle the following “developer” flags from the CLI:
    1. Allow Symlinks (For templates, 1.5.1.0+)
    2. Logging
    3. JS Merging
    4. CSS Merging
    5. Profiler
  3. You can view all of the above configuration values as well with the
    devel-config

    command.

  4. Get a list of all registered event listeners.
  5. Get a list of all Models registered in the system and module rewrites.
  6. Scriptable output. Output tabular data in csv, pipe-delimieted, or tab-delimited formats.

If you just want to get going:
Browse on Github

Be sure to read the Readme file on Github for more information about the added commands!

The Good Stuff

Okay, so the configuration system isn’t a huge deal… but it does open up more potential for 3rd party developers to write plugins that need to store things: usernames, passwords, etc. without having to provide their own storage mechanism. Let’s get to the really exciting stuff!

Developer Configuration

$ wiz devel-config
+---------------------------------+-------+
| Path                            | Value |
+---------------------------------+-------+
| dev/debug/profiler              | No    |
| dev/js/merge_files              | No    |
| dev/css/merge_css_files         | No    |
| dev/log/active                  | No    |
| dev/debug/template_hints        | No    |
| dev/debug/template_hints_blocks | No    |
| dev/template/allow_symlink      | No    |
+---------------------------------+-------+

You can now flip off/on or view the status of each of these independently. Each of these work the same way

devel-showhints

works.

Developer Helpers

One of the things I’m curious about sometimes is to see what modules are listening to what events. Well, now with a new command, you can see that:

wiz-listener-list

 

wiz devel-listeners

give you a list of the events and the modules and their model/method that is responding to that event.

Often times, I want to know what overrides have been performed by other modules. Now I can see a total picture of what modules provide what models:

wiz-model-list

As you can see, all of the standard models are shown, but you can also see what overrides are performed by all of the modules on the system.

Scriptable Table Output

Finally, of the coolest thing (in my opinion) is the scriptable output. Wiz has a pretty decent table output system that makes it fairly easy for your eyes. However, getting that data out of the table took me far too much time. Enter

--batch

.

The –batch argument takes the model list we show above and transforms it into:

"Model Name","PHP Class"
varien/*,Varien_*
core/*,Mage_Core_Model_*
core_resource/*,Mage_Core_Model_Resource_*
eav/*,Mage_Eav_Model_*
eav_resource/*,Mage_Eav_Model_Resource_*
page/*,Mage_Page_Model_*
install/*,Mage_Install_Model_*
install_resource/*,Mage_Install_Model_Resource_*
admin/*,Mage_Admin_Model_*

The –batch argument can take one of three arguments: csv, pipe, or tab. csv is the default (as you can see above). Pipe replaces the commas with “|”s and tabs… well, you get the idea. 😉 Now you can take your Wiz output and pipe it through grep, cut, etc. or output straight to CSV and load it up into Excel/Numbers/OpenOffice/etc.

Enjoy!

Get Wiz

Browse on Github

Share it

Topics

Related Posts

Affordable Uniforms

Five Things You Should Know About eCommerce Fraud

4 Ingredients for Creating Product Descriptions that Sell

Satisfying a Niche: The Ins and Outs of Unique Markets

Contact Us