Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 9e41a94a3e659caa5b91706d5c415d34 > files > 910

bugzilla-4.4.11-1.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>B.1.&#160;Command-line Search Interface</title><link rel="stylesheet" type="text/css" href="../../style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><meta name="keywords" content="Bugzilla, Guide, installation, FAQ, administration, integration, MySQL, Mozilla, webtools"><link rel="home" href="index.html" title="The Bugzilla Guide - 4.4.11 Release"><link rel="up" href="patches.html" title="Appendix&#160;B.&#160;Contrib"><link rel="prev" href="patches.html" title="Appendix&#160;B.&#160;Contrib"><link rel="next" href="cmdline-bugmail.html" title="B.2.&#160;Command-line 'Send Unsent Bug-mail' tool"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">B.1.&#160;Command-line Search Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="patches.html">Prev</a>&#160;</td><th width="60%" align="center">Appendix&#160;B.&#160;Contrib</th><td width="20%" align="right">&#160;<a accesskey="n" href="cmdline-bugmail.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmdline"></a>B.1.&#160;Command-line Search Interface</h2></div></div></div><p>
      There are a suite of Unix utilities for searching Bugzilla from the 
      command line. They live in the 
      <code class="filename">contrib/cmdline</code> directory.
      There are three files - <code class="filename">query.conf</code>,
      <code class="filename">buglist</code> and <code class="filename">bugs</code>.
    </p><div class="warning" style="margin-left: 1em; margin-right: 1em"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.gif"></td><th align="left"></th></tr><tr><td align="left" valign="top"><p>
        These files pre-date the templatization work done as part of the
        2.16 release, and have not been updated.
      </p></td></tr></table></div><p>
      <code class="filename">query.conf</code> contains the mapping from
      options to field names and comparison types. Quoted option names
      are <span class="quote">&#8220;<span class="quote">grepped</span>&#8221;</span> for, so it should be easy to edit this
      file. Comments (#) have no effect; you must make sure these lines
      do not contain any quoted <span class="quote">&#8220;<span class="quote">option</span>&#8221;</span>.
    </p><p>
      <code class="filename">buglist</code> is a shell script that submits a
      Bugzilla query and writes the resulting HTML page to stdout.
      It supports both short options, (such as <span class="quote">&#8220;<span class="quote">-Afoo</span>&#8221;</span>
      or <span class="quote">&#8220;<span class="quote">-Rbar</span>&#8221;</span>) and long options (such
      as <span class="quote">&#8220;<span class="quote">--assignedto=foo</span>&#8221;</span> or <span class="quote">&#8220;<span class="quote">--reporter=bar</span>&#8221;</span>).
      If the first character of an option is not <span class="quote">&#8220;<span class="quote">-</span>&#8221;</span>, it is
      treated as if it were prefixed with <span class="quote">&#8220;<span class="quote">--default=</span>&#8221;</span>.
    </p><p>
      The column list is taken from the COLUMNLIST environment variable.
      This is equivalent to the <span class="quote">&#8220;<span class="quote">Change Columns</span>&#8221;</span> option
      that is available when you list bugs in buglist.cgi. If you have
      already used Bugzilla, grep for COLUMNLIST in your cookies file
      to see your current COLUMNLIST setting.
    </p><p>
      <code class="filename">bugs</code> is a simple shell script which calls
      <code class="filename">buglist</code> and extracts the
      bug numbers from the output. Adding the prefix
      <span class="quote">&#8220;<span class="quote">http://bugzilla.mozilla.org/buglist.cgi?bug_id=</span>&#8221;</span>
      turns the bug list into a working link if any bugs are found.
      Counting bugs is easy. Pipe the results through 
      <span class="command"><strong>sed -e 's/,/ /g' | wc | awk '{printf $2 "\n"}'</strong></span>
    </p><p>
      Akkana Peck says she has good results piping 
      <code class="filename">buglist</code> output through 
      <span class="command"><strong>w3m -T text/html -dump</strong></span>
    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="patches.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="patches.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="cmdline-bugmail.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&#160;B.&#160;Contrib&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;B.2.&#160;Command-line 'Send Unsent Bug-mail' tool</td></tr></table></div></body></html>