This project is obsolete, check out Coffee instead!

Do was inspired by Gnome Do and is an extensible tool for quick & painless Drupal site administration and development.

Usage

Press Ctrl + Space to open the dialog and type a command (this shortcut can be configured). Hit Enter to execute it.

Examples

A command be followed by unlimited parameters, separated by spaces:

command parameter1 parameter2 parameter3...

The following commands are natively supported (modules can define their own! See "Hooks" below):

alias
You can define aliases to create even simpler shortcuts for commonly used functions. Accepts two parameters: "alias" and "command". For example: alias cc cache_clear_all
goto
Redirect to an internal Drupal path
cc
Flush all caches
drush
Forward commands to Drush!

Hooks!

Use hook_do() to extend Do and create your own shortcuts and custom functionality.

In order to define a command, implement hook_do():

// array keys are optional and act as aliases for the command

function mymodule_do() {
  return array(
    'myfunction
    'my_alias' => 'other_function'
  );
}

Now, implement the function:

// commands get resolved to "MODULENAME_COMMAND"

function mymodule_myunction() {
  // do something amazing
  return array(
    'ok' => FALSE, // signal failure
    'msg' => t('Function executed!'), // display message on screen
    'redirect' => 'user' // redirect to this path, can also be an absolute URL
  );
}

function mymodule_other_function($param1, $param2) {
  // all parameters get forwarded here
  return array(
    'ok' => TRUE,
    'redirect' => TRUE, // TRUE means page gets refreshed
  );
}

Now you can quickly access your functions:

// all additional parameters get forwarded to your function
mymodule my_alias param1 param2

Motivation

The basic idea is to offer an unobtrusive, easily-accessible & flexible shortcut shell to complement Drush for more hands-on stuff like navigation, toggling settings and exposing functionality from modules for quick and convenient access.

Get involved!

This went from idea to release very quickly and is still a bit rough around the edges, despite being surprisingly stable! All contributions are welcome, be it bug reports, feature requests, patches, you name it!

Help this project grow!

Downloads

Recommended releases

Version Downloads Date Links
6.x-1.0-beta4 tar.gz (17.16 KB) | zip (20.4 KB) 2011-May-02 Notes

Development releases

Version Downloads Date Links
6.x-1.x-dev tar.gz (17.17 KB) | zip (20.41 KB) 2011-May-02 Notes

Project Information


Maintainers for Do

  • alexweber - 12 commits
    last: 1 year ago, first: 1 year ago

Issues for Do

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
nobody click here