Drush: examples/xkcd.drush.inc File Reference

  1. 7.x doxygen/html/xkcd_8drush_8inc.html
  2. master doxygen/html/xkcd_8drush_8inc.html
xkcd.drush.inc File Reference

Go to the source code of this file.

Functions

 xkcd_drush_command ()
 xkcd_drush_help ($section)
 drush_xkcd_fetch ($search= '')
 drush_xkcd_display ($url)

Detailed Description

Example XKCD Drush command.

To run this fun command, execute drush --include=./examples xkcd from within your drush directory.

See drush topic docs-commands for more information about command authoring.

You can copy this file to any of the following

  1. A .drush folder in your HOME folder.
  2. Anywhere in a folder tree below an active module on your site.
  3. /usr/share/drush/commands (configurable)
  4. In an arbitrary folder specified with the –include option.
  5. Drupal's /drush or /sites/all/drush folders.

Definition in file xkcd.drush.inc.

Function Documentation

drush_xkcd_display (   $url)

Display a given XKCD cartoon.

Retrieve and display a table of metadata for an XKCD cartoon, then retrieve and display the cartoon using a specified image viewer.

Parameters
string$urlA string with the URL of the cartoon to display.

Definition at line 146 of file xkcd.drush.inc.

References drush_download_file(), drush_get_option(), drush_key_value_to_array_table(), drush_print_table(), drush_register_file_for_deletion(), drush_set_error(), drush_shell_exec(), and dt().

Referenced by drush_xkcd_fetch().

Here is the call graph for this function:

Here is the caller graph for this function:

drush_xkcd_fetch (   $search = '')

Implements drush_hook_COMMAND().

The command callback is where the action takes place.

The function name should be same as command name but with dashes turned to underscores and 'drush_commandfile_' prepended, where 'commandfile' is taken from the file 'commandfile.drush.inc', which in this case is 'sandwich'. Note also that a simplification step is also done in instances where the commandfile name is the same as the beginning of the command name, "drush_example_example_foo" is simplified to just "drush_example_foo". To also implement a hook that is called before your command, implement "drush_hook_pre_example_foo". For a list of all available hooks for a given command, run drush in –debug mode.

If for some reason you do not want your hook function to be named after your command, you may define a 'callback' item in your command object that specifies the exact name of the function that should be called.

In this function, all of Drupal's API is (usually) available, including any functions you have added in your own modules/themes.

See Also
drush_invoke()
drush.api.php
Parameters
string$searchAn optional string with search keyworks, cartoon ID or "random".

Definition at line 110 of file xkcd.drush.inc.

References drush_get_option(), drush_set_error(), drush_xkcd_display(), and dt().

Here is the call graph for this function:

xkcd_drush_command ( )

Implements hook_drush_command().

In this hook, you specify which commands your drush module makes available, what it does and description.

Notice how this structure closely resembles how you define menu hooks.

See drush topic docs-commands for a list of recognized keys.

Definition at line 30 of file xkcd.drush.inc.

References DRUSH_BOOTSTRAP_DRUSH.

xkcd_drush_help (   $section)

Implements hook_drush_help().

This function is called whenever a drush user calls 'drush help <name-of-your-command>'. This hook is optional. If a command does not implement this hook, the command's description is used instead.

This hook is also used to look up help metadata, such as help category title and summary. See the comments below for a description.

Definition at line 67 of file xkcd.drush.inc.

References dt().

Here is the call graph for this function:

File

doxygen/html/xkcd_8drush_8inc.html
View source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Drush: examples/xkcd.drush.inc File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Drush
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xkcd.drush.inc File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="xkcd_8drush_8inc_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aba6645adb9f83a1d5de51cb941de8dc3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xkcd_8drush_8inc.html#aba6645adb9f83a1d5de51cb941de8dc3">xkcd_drush_command</a> ()</td></tr>
<tr class="memitem:aec232fd75d8969d5b94ac6f97b1a0ceb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xkcd_8drush_8inc.html#aec232fd75d8969d5b94ac6f97b1a0ceb">xkcd_drush_help</a> ($section)</td></tr>
<tr class="memitem:a9996ede595d6a353140c6b22ca2936dd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xkcd_8drush_8inc.html#a9996ede595d6a353140c6b22ca2936dd">drush_xkcd_fetch</a> ($search= '')</td></tr>
<tr class="memitem:a1639c8faf7d2d4cdc7563792b479cd69"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xkcd_8drush_8inc.html#a1639c8faf7d2d4cdc7563792b479cd69">drush_xkcd_display</a> ($url)</td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Example XKCD Drush command.</p>
<p>To run this <em>fun</em> command, execute <code>drush --include=./examples xkcd</code> from within your drush directory.</p>
<p>See <code>drush topic docs-commands</code> for more information about command authoring.</p>
<p>You can copy this file to any of the following</p>
<ol type="1">
<li>A .drush folder in your HOME folder.</li>
<li>Anywhere in a folder tree below an active module on your site.</li>
<li>/usr/share/drush/commands (configurable)</li>
<li>In an arbitrary folder specified with the &ndash;include option.</li>
<li>Drupal's /drush or /sites/all/drush folders. </li>
</ol>

<p>Definition in file <a class="el" href="xkcd_8drush_8inc_source.html">xkcd.drush.inc</a>.</p>
</div><h2>Function Documentation</h2>
<a class="anchor" id="a1639c8faf7d2d4cdc7563792b479cd69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">drush_xkcd_display </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Display a given XKCD cartoon.</p>
<p>Retrieve and display a table of metadata for an XKCD cartoon, then retrieve and display the cartoon using a specified image viewer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$url</td><td>A string with the URL of the cartoon to display. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="xkcd_8drush_8inc_source.html#l00146">146</a> of file <a class="el" href="xkcd_8drush_8inc_source.html">xkcd.drush.inc</a>.</p>

<p>References <a class="el" href="drush_8inc_source.html#l00721">drush_download_file()</a>, <a class="el" href="context_8inc_source.html#l00405">drush_get_option()</a>, <a class="el" href="output_8inc_source.html#l00294">drush_key_value_to_array_table()</a>, <a class="el" href="output_8inc_source.html#l00216">drush_print_table()</a>, <a class="el" href="filesystem_8inc_source.html#l00513">drush_register_file_for_deletion()</a>, <a class="el" href="drush_8inc_source.html#l01723">drush_set_error()</a>, <a class="el" href="exec_8inc_source.html#l00078">drush_shell_exec()</a>, and <a class="el" href="output_8inc_source.html#l00145">dt()</a>.</p>

<p>Referenced by <a class="el" href="xkcd_8drush_8inc_source.html#l00110">drush_xkcd_fetch()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_cgraph.png" border="0" usemap="#xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_cgraph" alt=""/></div>
<map name="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_cgraph" id="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_cgraph">
<area shape="rect" id="node3" href="drush_8inc.html#a9cce12bffedae74c4a45174c59c79311" title="drush_download_file" alt="" coords="193,540,332,569"/><area shape="rect" id="node7" href="context_8inc.html#afe91fb3e5219ecb2208c3b036b1f0cb8" title="drush_get_option" alt="" coords="1515,124,1635,153"/><area shape="rect" id="node34" href="group__errorhandling.html#ga23fe9e1e8c1e5ade39256106044b6da4" title="drush_set_error" alt="" coords="1301,1039,1413,1068"/><area shape="rect" id="node46" href="group__outputfunctions.html#ga1218abcb1e27dd3bb412113d1e344d96" title="dt" alt="" coords="1339,1551,1376,1580"/><area shape="rect" id="node57" href="group__filesystemfunctions.html#ga7557e035207db8d2dbe475e6a52c579c" title="drush_register_file\l_for_deletion" alt="" coords="1068,506,1196,553"/><area shape="rect" id="node70" href="group__commandwrappers.html#gafd358ceac1286dbdd141ff2b8eb7d556" title="drush_shell_exec" alt="" coords="624,304,747,333"/><area shape="rect" id="node114" href="group__outputfunctions.html#ga0305cbdc9e5419a9a3a93dad342eb499" title="drush_key_value_to\l_array_table" alt="" coords="193,1286,332,1333"/><area shape="rect" id="node143" href="group__outputfunctions.html#ga2dfb80176f98c67097334acfa98211cd" title="drush_print_table" alt="" coords="203,168,323,197"/><area shape="rect" id="node5" href="drush_8inc.html#a5d3c123a1d8fa15642f08ff635dbe2a1" title="_drush_is_url" alt="" coords="421,565,520,595"/><area shape="rect" id="node15" href="drush_8inc.html#a6b7589c9e3cd3f683c0ef137e1c30f49" title="drush_download_file_name" alt="" coords="381,851,560,880"/><area shape="rect" id="node42" href="group__logging.html#gad820f489a93518301794ada4ff7816b6" title="drush_log" alt="" coords="1536,755,1613,784"/><area shape="rect" id="node68" href="drush_8inc.html#a5c2a88712f3905874900166f3b2c397c" title="_drush_download_file" alt="" coords="397,619,544,648"/><area shape="rect" id="node9" href="context_8inc.html#aee5781894bf828bfa508d9052553f809" title="_drush_get_option" alt="" coords="1729,124,1857,153"/><area shape="rect" id="node11" href="context_8inc.html#ad25559f8d7d753f636fbeac347c29fc5" title="drush_get_context" alt="" coords="1953,753,2081,783"/><area shape="rect" id="node13" href="context_8inc.html#a9f6272c1a68141ce873c07aae3a316ac" title="drush_context_names" alt="" coords="1719,71,1868,100"/><area shape="rect" id="node17" href="includes_2environment_8inc.html#a92afdf9afda25ac6d226ba45f6f1fbe0" title="drush_directory_cache" alt="" coords="609,1004,761,1033"/><area shape="rect" id="node19" href="group__errorhandling.html#ga7bc0a52d28467940b2bb9588a660ed8f" title="drush_clear_error" alt="" coords="1071,835,1193,864"/><area shape="rect" id="node24" href="group__filesystemfunctions.html#gad1036a8fb12d105b55de87b4f3fe8002" title="drush_find_tmp" alt="" coords="843,668,952,697"/><area shape="rect" id="node32" href="group__filesystemfunctions.html#ga6027285d97028ad3299d3aa262be8c2f" title="drush_mkdir" alt="" coords="1085,1040,1179,1069"/><area shape="rect" id="node59" href="includes_2environment_8inc.html#a25a1b7c8414b818e263d31ff06363772" title="drush_get_username" alt="" coords="827,977,968,1007"/><area shape="rect" id="node62" href="includes_2environment_8inc.html#afae6d4a5a12623e5502ca262346c799b" title="drush_server_home" alt="" coords="829,1031,965,1060"/><area shape="rect" id="node21" href="context_8inc.html#af983acfe90e7d7bbdbd67c57f93708ba" title="drush_set_context" alt="" coords="1293,883,1421,912"/><area shape="rect" id="node26" href="includes_2environment_8inc.html#a88114295372bcb0ca8dbb5f10b36368e" title="drush_is_windows" alt="" coords="1293,468,1421,497"/><area shape="rect" id="node28" href="includes_2environment_8inc.html#a339c57f584d4f3d910d8c36763d054c2" title="drush_cwd" alt="" coords="1089,627,1175,656"/><area shape="rect" id="node37" href="includes_2command_8inc.html#a19eba9666aba673a64fbd78a2c5ef4f9" title="drush_command_invoke_all" alt="" coords="1484,1039,1665,1068"/><area shape="rect" id="node39" href="backend_8inc.html#a38490210d77373f3d8492caf4e9a3190" title="drush_backend_packet" alt="" coords="1716,779,1871,808"/><area shape="rect" id="node48" href="includes_2drupal_8inc.html#ad2ccab77d4bc8e7355186f26cd328ac0" title="drush_drupal_major\l_version" alt="" coords="1508,1343,1641,1390"/><area shape="rect" id="node50" href="includes_2drupal_8inc.html#a203e989fd043d054d774954e2b2dff21" title="drush_drupal_version" alt="" coords="1721,1193,1865,1223"/><area shape="rect" id="node52" href="includes_2drupal_8inc.html#aa7ac001ed15d678fa533b54d962eb5bc" title="drush_drupal_load_autoloader" alt="" coords="1920,1193,2115,1223"/><area shape="rect" id="node91" href="group__filesystemfunctions.html#ga01729c5c432a2f30974966d888146d09" title="drush_tempnam" alt="" coords="628,669,743,699"/><area shape="rect" id="node95" href="group__filesystemfunctions.html#ga0d795889ef507c45abb793b8685b36d0" title="drush_file_not_empty" alt="" coords="612,565,759,595"/><area shape="rect" id="node97" href="group__filesystemfunctions.html#gaac7379e8cfa2163a874542fc021bf521" title="drush_move_dir" alt="" coords="628,772,743,801"/><area shape="rect" id="node72" href="group__commandwrappers.html#ga0eed47c4d6d19d386936ad57f34b10b2" title="_drush_shell_exec" alt="" coords="832,301,963,331"/><area shape="rect" id="node74" href="group__commandwrappers.html#gafc52f7e769d935b4d2462467cdf8d5ee" title="drush_escapeshellarg" alt="" coords="1059,299,1205,328"/><area shape="rect" id="node82" href="group__outputfunctions.html#ga63acbb94925d6d2693e235e966bba740" title="drush_print" alt="" coords="1315,124,1400,153"/><area shape="rect" id="node85" href="group__commandwrappers.html#ga3a1bb3ae751f14749ce1dbe4ec9c3288" title="drush_shell_proc_open" alt="" coords="1055,195,1209,224"/><area shape="rect" id="node89" href="group__commandwrappers.html#gac21dc9409bff5197d255978c3cf6e761" title="_drush_shell_exec_output_set" alt="" coords="1033,352,1231,381"/><area shape="rect" id="node77" href="group__commandwrappers.html#gac60b4740ceccf95b8e60d1896d93d2ab" title="_drush_escapeshellarg\l_windows" alt="" coords="1280,347,1435,394"/><area shape="rect" id="node79" href="group__commandwrappers.html#ga561ce790cc15caa5e1f0bfebc2546529" title="_drush_escapeshellarg\l_linux" alt="" coords="1280,278,1435,325"/><area shape="rect" id="node99" href="drush_8inc.html#a903c36790dbe5525fe9369c8476780af" title="drush_op" alt="" coords="1095,781,1169,811"/><area shape="rect" id="node106" href="group__filesystemfunctions.html#ga1d86ac8e2e56a75acb0abcdc8e0dcf09" title="drush_copy_dir" alt="" coords="843,772,952,801"/><area shape="rect" id="node118" href="group__outputfunctions.html#ga9949217d2df2776bd355c4a3d50bba79" title="drush_format" alt="" coords="421,1345,520,1375"/><area shape="rect" id="node121" href="engines_8inc.html#af360562cce71af9828bbbb7326b1d7a8" title="drush_load_engine" alt="" coords="620,1472,751,1501"/><area shape="rect" id="node123" href="engines_8inc.html#ae94a82d80d5e90cb126de1f16a7f8fe4" title="drush_get_engines" alt="" coords="1067,1499,1197,1528"/><area shape="rect" id="node127" href="engines_8inc.html#ac18b04b38c84979a32603cd5cef78c69" title="drush_find_engine_to_use" alt="" coords="811,1656,984,1685"/><area shape="rect" id="node131" href="commands_2core_2drupal_2environment_8inc.html#a643d851fd8dc63ea2ce8cf67aa33098c" title="drush_module_exists" alt="" coords="825,1603,969,1632"/><area shape="rect" id="node133" href="engines_8inc.html#a91df31f18b0a1d05540ccaf85e6d9a88" title="drush_include_engine" alt="" coords="824,1499,971,1528"/><area shape="rect" id="node138" href="engines_8inc.html#a1eb2ea4e50529f3c7953f419956ce51a" title="drush_set_engine" alt="" coords="836,1293,959,1323"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_icgraph.png" border="0" usemap="#xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_icgraph" alt=""/></div>
<map name="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_icgraph" id="xkcd_8drush_8inc_a1639c8faf7d2d4cdc7563792b479cd69_icgraph">
<area shape="rect" id="node3" href="xkcd_8drush_8inc.html#a9996ede595d6a353140c6b22ca2936dd" title="drush_xkcd_fetch" alt="" coords="192,5,317,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a9996ede595d6a353140c6b22ca2936dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">drush_xkcd_fetch </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$search</em> = <code>''</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Implements <a class="el" href="group__hooks.html#gac2e216160a865f14ffe9ed086249d458">drush_hook_COMMAND()</a>.</p>
<p>The command callback is where the action takes place.</p>
<p>The function name should be same as command name but with dashes turned to underscores and 'drush_commandfile_' prepended, where 'commandfile' is taken from the file 'commandfile.drush.inc', which in this case is 'sandwich'. Note also that a simplification step is also done in instances where the commandfile name is the same as the beginning of the command name, "drush_example_example_foo" is simplified to just "drush_example_foo". To also implement a hook that is called before your command, implement "drush_hook_pre_example_foo". For a list of all available hooks for a given command, run drush in &ndash;debug mode.</p>
<p>If for some reason you do not want your hook function to be named after your command, you may define a 'callback' item in your command object that specifies the exact name of the function that should be called.</p>
<p>In this function, all of Drupal's API is (usually) available, including any functions you have added in your own modules/themes.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__dispatching.html#gad45b0ad6ccdc34ebb10d38d5c2d6a1d1">drush_invoke()</a> </dd>
<dd>
<a class="el" href="drush_8api_8php.html">drush.api.php</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">string</td><td class="paramname">$search</td><td>An optional string with search keyworks, cartoon ID or "random". </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="xkcd_8drush_8inc_source.html#l00110">110</a> of file <a class="el" href="xkcd_8drush_8inc_source.html">xkcd.drush.inc</a>.</p>

<p>References <a class="el" href="context_8inc_source.html#l00405">drush_get_option()</a>, <a class="el" href="drush_8inc_source.html#l01723">drush_set_error()</a>, <a class="el" href="xkcd_8drush_8inc_source.html#l00146">drush_xkcd_display()</a>, and <a class="el" href="output_8inc_source.html#l00145">dt()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="xkcd_8drush_8inc_a9996ede595d6a353140c6b22ca2936dd_cgraph.png" border="0" usemap="#xkcd_8drush_8inc_a9996ede595d6a353140c6b22ca2936dd_cgraph" alt=""/></div>
<map name="xkcd_8drush_8inc_a9996ede595d6a353140c6b22ca2936dd_cgraph" id="xkcd_8drush_8inc_a9996ede595d6a353140c6b22ca2936dd_cgraph">
<area shape="rect" id="node3" href="context_8inc.html#afe91fb3e5219ecb2208c3b036b1f0cb8" title="drush_get_option" alt="" coords="1688,95,1808,124"/><area shape="rect" id="node11" href="group__errorhandling.html#ga23fe9e1e8c1e5ade39256106044b6da4" title="drush_set_error" alt="" coords="1475,913,1587,943"/><area shape="rect" id="node23" href="xkcd_8drush_8inc.html#a1639c8faf7d2d4cdc7563792b479cd69" title="drush_xkcd_display" alt="" coords="180,936,316,965"/><area shape="rect" id="node46" href="group__outputfunctions.html#ga1218abcb1e27dd3bb412113d1e344d96" title="dt" alt="" coords="1512,1795,1549,1824"/><area shape="rect" id="node5" href="context_8inc.html#aee5781894bf828bfa508d9052553f809" title="_drush_get_option" alt="" coords="1903,51,2031,80"/><area shape="rect" id="node7" href="context_8inc.html#ad25559f8d7d753f636fbeac347c29fc5" title="drush_get_context" alt="" coords="2127,660,2255,689"/><area shape="rect" id="node9" href="context_8inc.html#a9f6272c1a68141ce873c07aae3a316ac" title="drush_context_names" alt="" coords="1892,104,2041,133"/><area shape="rect" id="node14" href="includes_2command_8inc.html#a19eba9666aba673a64fbd78a2c5ef4f9" title="drush_command_invoke_all" alt="" coords="1657,811,1839,840"/><area shape="rect" id="node16" href="backend_8inc.html#a38490210d77373f3d8492caf4e9a3190" title="drush_backend_packet" alt="" coords="1889,712,2044,741"/><area shape="rect" id="node19" href="group__logging.html#gad820f489a93518301794ada4ff7816b6" title="drush_log" alt="" coords="1709,685,1787,715"/><area shape="rect" id="node25" href="drush_8inc.html#a9cce12bffedae74c4a45174c59c79311" title="drush_download_file" alt="" coords="367,936,505,965"/><area shape="rect" id="node57" href="group__filesystemfunctions.html#ga7557e035207db8d2dbe475e6a52c579c" title="drush_register_file\l_for_deletion" alt="" coords="1241,1294,1369,1341"/><area shape="rect" id="node70" href="group__commandwrappers.html#gafd358ceac1286dbdd141ff2b8eb7d556" title="drush_shell_exec" alt="" coords="797,349,920,379"/><area shape="rect" id="node114" href="group__outputfunctions.html#ga0305cbdc9e5419a9a3a93dad342eb499" title="drush_key_value_to\l_array_table" alt="" coords="367,1386,505,1433"/><area shape="rect" id="node143" href="group__outputfunctions.html#ga2dfb80176f98c67097334acfa98211cd" title="drush_print_table" alt="" coords="376,143,496,172"/><area shape="rect" id="node27" href="drush_8inc.html#a5d3c123a1d8fa15642f08ff635dbe2a1" title="_drush_is_url" alt="" coords="595,936,693,965"/><area shape="rect" id="node30" href="drush_8inc.html#a6b7589c9e3cd3f683c0ef137e1c30f49" title="drush_download_file_name" alt="" coords="555,1129,733,1159"/><area shape="rect" id="node68" href="drush_8inc.html#a5c2a88712f3905874900166f3b2c397c" title="_drush_download_file" alt="" coords="571,812,717,841"/><area shape="rect" id="node32" href="includes_2environment_8inc.html#a92afdf9afda25ac6d226ba45f6f1fbe0" title="drush_directory_cache" alt="" coords="783,1207,935,1236"/><area shape="rect" id="node34" href="group__errorhandling.html#ga7bc0a52d28467940b2bb9588a660ed8f" title="drush_clear_error" alt="" coords="1009,1480,1132,1509"/><area shape="rect" id="node39" href="group__filesystemfunctions.html#gad1036a8fb12d105b55de87b4f3fe8002" title="drush_find_tmp" alt="" coords="1016,1016,1125,1045"/><area shape="rect" id="node43" href="group__filesystemfunctions.html#ga6027285d97028ad3299d3aa262be8c2f" title="drush_mkdir" alt="" coords="1259,1168,1352,1197"/><area shape="rect" id="node59" href="includes_2environment_8inc.html#a25a1b7c8414b818e263d31ff06363772" title="drush_get_username" alt="" coords="1000,1171,1141,1200"/><area shape="rect" id="node62" href="includes_2environment_8inc.html#afae6d4a5a12623e5502ca262346c799b" title="drush_server_home" alt="" coords="1003,1224,1139,1253"/><area shape="rect" id="node36" href="context_8inc.html#af983acfe90e7d7bbdbd67c57f93708ba" title="drush_set_context" alt="" coords="1241,1584,1369,1613"/><area shape="rect" id="node41" href="includes_2environment_8inc.html#a88114295372bcb0ca8dbb5f10b36368e" title="drush_is_windows" alt="" coords="1467,455,1595,484"/><area shape="rect" id="node48" href="includes_2drupal_8inc.html#ad2ccab77d4bc8e7355186f26cd328ac0" title="drush_drupal_major\l_version" alt="" coords="1681,1555,1815,1602"/><area shape="rect" id="node50" href="includes_2drupal_8inc.html#a203e989fd043d054d774954e2b2dff21" title="drush_drupal_version" alt="" coords="1895,1445,2039,1475"/><area shape="rect" id="node52" href="includes_2drupal_8inc.html#aa7ac001ed15d678fa533b54d962eb5bc" title="drush_drupal_load_autoloader" alt="" coords="2093,1445,2288,1475"/><area shape="rect" id="node91" href="group__filesystemfunctions.html#ga01729c5c432a2f30974966d888146d09" title="drush_tempnam" alt="" coords="801,1016,916,1045"/><area shape="rect" id="node95" href="group__filesystemfunctions.html#ga0d795889ef507c45abb793b8685b36d0" title="drush_file_not_empty" alt="" coords="785,812,932,841"/><area shape="rect" id="node97" href="group__filesystemfunctions.html#gaac7379e8cfa2163a874542fc021bf521" title="drush_move_dir" alt="" coords="801,759,916,788"/><area shape="rect" id="node72" href="group__commandwrappers.html#ga0eed47c4d6d19d386936ad57f34b10b2" title="_drush_shell_exec" alt="" coords="1005,349,1136,379"/><area shape="rect" id="node74" href="group__commandwrappers.html#gafc52f7e769d935b4d2462467cdf8d5ee" title="drush_escapeshellarg" alt="" coords="1232,349,1379,379"/><area shape="rect" id="node82" href="group__outputfunctions.html#ga63acbb94925d6d2693e235e966bba740" title="drush_print" alt="" coords="1488,152,1573,181"/><area shape="rect" id="node85" href="group__commandwrappers.html#ga3a1bb3ae751f14749ce1dbe4ec9c3288" title="drush_shell_proc_open" alt="" coords="1228,245,1383,275"/><area shape="rect" id="node89" href="group__commandwrappers.html#gac21dc9409bff5197d255978c3cf6e761" title="_drush_shell_exec_output_set" alt="" coords="1207,403,1404,432"/><area shape="rect" id="node77" href="group__commandwrappers.html#gac60b4740ceccf95b8e60d1896d93d2ab" title="_drush_escapeshellarg\l_windows" alt="" coords="1453,315,1608,362"/><area shape="rect" id="node79" href="group__commandwrappers.html#ga561ce790cc15caa5e1f0bfebc2546529" title="_drush_escapeshellarg\l_linux" alt="" coords="1453,385,1608,431"/><area shape="rect" id="node99" href="drush_8inc.html#a903c36790dbe5525fe9369c8476780af" title="drush_op" alt="" coords="1268,659,1343,688"/><area shape="rect" id="node106" href="group__filesystemfunctions.html#ga1d86ac8e2e56a75acb0abcdc8e0dcf09" title="drush_copy_dir" alt="" coords="1016,760,1125,789"/><area shape="rect" id="node118" href="group__outputfunctions.html#ga9949217d2df2776bd355c4a3d50bba79" title="drush_format" alt="" coords="595,1437,693,1467"/><area shape="rect" id="node121" href="engines_8inc.html#af360562cce71af9828bbbb7326b1d7a8" title="drush_load_engine" alt="" coords="793,1661,924,1691"/><area shape="rect" id="node123" href="engines_8inc.html#ae94a82d80d5e90cb126de1f16a7f8fe4" title="drush_get_engines" alt="" coords="1240,1651,1371,1680"/><area shape="rect" id="node127" href="engines_8inc.html#ac18b04b38c84979a32603cd5cef78c69" title="drush_find_engine_to_use" alt="" coords="984,1688,1157,1717"/><area shape="rect" id="node131" href="commands_2core_2drupal_2environment_8inc.html#a643d851fd8dc63ea2ce8cf67aa33098c" title="drush_module_exists" alt="" coords="999,1741,1143,1771"/><area shape="rect" id="node133" href="engines_8inc.html#a91df31f18b0a1d05540ccaf85e6d9a88" title="drush_include_engine" alt="" coords="997,1795,1144,1824"/><area shape="rect" id="node138" href="engines_8inc.html#a1eb2ea4e50529f3c7953f419956ce51a" title="drush_set_engine" alt="" coords="1009,1584,1132,1613"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aba6645adb9f83a1d5de51cb941de8dc3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xkcd_drush_command </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Implements <a class="el" href="drush_8api_8php.html#ad8372d595205e79e81d7700f4f59b31c">hook_drush_command()</a>.</p>
<p>In this hook, you specify which commands your drush module makes available, what it does and description.</p>
<p>Notice how this structure closely resembles how you define menu hooks.</p>
<p>See <code>drush topic docs-commands</code> for a list of recognized keys. </p>

<p>Definition at line <a class="el" href="xkcd_8drush_8inc_source.html#l00030">30</a> of file <a class="el" href="xkcd_8drush_8inc_source.html">xkcd.drush.inc</a>.</p>

<p>References <a class="el" href="lib_2Drush_2Boot_2bootstrap_8inc_source.html#l00041">DRUSH_BOOTSTRAP_DRUSH</a>.</p>

</div>
</div>
<a class="anchor" id="aec232fd75d8969d5b94ac6f97b1a0ceb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">xkcd_drush_help </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$section</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Implements hook_drush_help().</p>
<p>This function is called whenever a drush user calls 'drush help &lt;name-of-your-command&gt;'. This hook is optional. If a command does not implement this hook, the command's description is used instead.</p>
<p>This hook is also used to look up help metadata, such as help category title and summary. See the comments below for a description. </p>

<p>Definition at line <a class="el" href="xkcd_8drush_8inc_source.html#l00067">67</a> of file <a class="el" href="xkcd_8drush_8inc_source.html">xkcd.drush.inc</a>.</p>

<p>References <a class="el" href="output_8inc_source.html#l00145">dt()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="xkcd_8drush_8inc_aec232fd75d8969d5b94ac6f97b1a0ceb_cgraph.png" border="0" usemap="#xkcd_8drush_8inc_aec232fd75d8969d5b94ac6f97b1a0ceb_cgraph" alt=""/></div>
<map name="xkcd_8drush_8inc_aec232fd75d8969d5b94ac6f97b1a0ceb_cgraph" id="xkcd_8drush_8inc_aec232fd75d8969d5b94ac6f97b1a0ceb_cgraph">
<area shape="rect" id="node3" href="group__outputfunctions.html#ga1218abcb1e27dd3bb412113d1e344d96" title="dt" alt="" coords="175,32,212,61"/><area shape="rect" id="node5" href="includes_2drupal_8inc.html#ad2ccab77d4bc8e7355186f26cd328ac0" title="drush_drupal_major\l_version" alt="" coords="263,23,396,70"/><area shape="rect" id="node7" href="includes_2drupal_8inc.html#a203e989fd043d054d774954e2b2dff21" title="drush_drupal_version" alt="" coords="447,32,591,61"/><area shape="rect" id="node9" href="includes_2drupal_8inc.html#aa7ac001ed15d678fa533b54d962eb5bc" title="drush_drupal_load_autoloader" alt="" coords="640,5,835,35"/><area shape="rect" id="node11" href="context_8inc.html#ad25559f8d7d753f636fbeac347c29fc5" title="drush_get_context" alt="" coords="673,59,801,88"/></map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 8 2014 09:04:59 for Drush by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.2
</small></address>
</body>
</html>