Update doc/common
[yaz-moved-to-github.git] / doc / zoomsh-man.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
3 [
4      <!ENTITY % local SYSTEM "local.ent">
5      %local;
6      <!ENTITY % entities SYSTEM "entities.ent">
7      %entities;
8      <!ENTITY % idcommon SYSTEM "common/common.ent">
9      %idcommon;
10 ]>
11 <refentry id="zoomsh">
12  <refentryinfo>
13   <productname>YAZ</productname>
14   <productnumber>&version;</productnumber>
15   <info><orgname>Index Data</orgname></info>
16  </refentryinfo>
17
18  <refmeta>
19   <refentrytitle>zoomsh</refentrytitle>
20   <manvolnum>1</manvolnum>
21   <refmiscinfo class="manual">Commands</refmiscinfo>
22  </refmeta>
23
24  <refnamediv>
25   <refname>zoomsh</refname>
26   <refpurpose>ZOOM shell</refpurpose>
27  </refnamediv>
28
29  <refsynopsisdiv>
30   <cmdsynopsis>
31    <command>zoomsh</command>
32    <arg choice="opt"><option>-e</option></arg>
33    <arg choice="opt"><option>-v <replaceable>loglevel</replaceable></option></arg>
34    <arg choice="opt" rep="repeat">commands</arg>
35   </cmdsynopsis>
36  </refsynopsisdiv>
37
38   <refsect1><title>DESCRIPTION</title>
39    <para>
40     <command>zoomsh</command> is a ZOOM client with a simple
41     command line interface. The client demonstrates the ZOOM
42     API and is useful for testing targets.
43    </para>
44    <para>
45     You may pass one or more commands to <command>zoomsh</command>.
46     These commands are invoked first.
47    </para>
48   </refsect1>
49
50   <refsect1>
51    <title>OPTIONS</title>
52    <variablelist>
53     <varlistentry>
54      <term>-e</term>
55      <listitem><para>
56       Makes zoomsh stop processing commands as soon as an error occur.
57       The exit code of zoomsh is 1 if error occurs; 0 otherwise.
58       </para></listitem>
59     </varlistentry>
60     <varlistentry>
61      <term>-v <replaceable>loglevel</replaceable></term>
62      <listitem><para>
63        Sets YAZ log level.
64       </para></listitem>
65     </varlistentry>
66    </variablelist>
67   </refsect1>
68   <refsect1><title>EXAMPLES</title>
69    <para>
70     If you start the <command>yaz-ztest</command> in one console you
71     can use the ZOOM shell as follows:
72     <screen><![CDATA[
73 $ zoomsh
74 ZOOM>connect localhost:9999
75 ZOOM>search computer
76 localhost:9999: 7 hits
77 ZOOM>show 0 1
78 1 Default USmarc
79 001    11224466
80 003 DLC
81 005 00000000000000.0
82 008 910710c19910701nju           00010 eng
83 010    $a    11224466
84 040    $a DLC $c DLC
85 050 00 $a 123-xyz
86 100 10 $a Jack Collins
87 245 10 $a How to program a computer
88 260 1  $a Penguin
89 263    $a 8710
90 300    $a p. cm.
91 ZOOM>quit
92 ]]>
93     </screen>
94    </para>
95    <para>
96     You can also achieve the same result by passing the commands
97     as arguments on a single command line:
98    </para>
99    <para>
100     <literal>$ zoomsh "connect localhost:9999" "search computer"</literal>
101     <literal>"show 0 1" quit</literal>
102    </para>
103   </refsect1>
104   <refsect1><title>COMMANDS</title>
105    <variablelist>
106
107     <varlistentry><term><literal>connect</literal>
108       <replaceable>zurl</replaceable></term>
109      <listitem><para>
110        Connects to the target given by <replaceable>zurl</replaceable>.
111       </para></listitem></varlistentry>
112
113     <varlistentry><term><literal>close</literal>
114       [<replaceable>zurl</replaceable>]</term>
115      <listitem><para>
116        Closes connection to target given by
117        <replaceable>zurl</replaceable> or all targets if
118        <replaceable>zurl</replaceable> was omitted.
119       </para></listitem></varlistentry>
120
121     <varlistentry><term><literal>show</literal>
122       [<replaceable>start</replaceable>
123       [<replaceable>count</replaceable>]]
124      </term>
125      <listitem><para>
126        Displays <literal>count</literal> records starting at offset given
127        by <replaceable>start</replaceable>. First records has offset 0
128        (unlike the Z39.50 protocol).
129       </para></listitem></varlistentry>
130
131     <varlistentry><term><literal>quit</literal>
132      </term>
133      <listitem><para>
134        Quits <command>zoomsh</command>.
135       </para></listitem></varlistentry>
136
137     <varlistentry><term><literal>set</literal>
138       <replaceable>name</replaceable>
139       [<replaceable>value</replaceable>]
140      </term>
141      <listitem><para>
142        Sets option <replaceable>name</replaceable> to
143        <replaceable>value</replaceable>.
144       </para></listitem></varlistentry>
145
146     <varlistentry><term><literal>get</literal>
147       <replaceable>name</replaceable>
148      </term>
149      <listitem><para>
150        Prints value of option <replaceable>name</replaceable>.
151       </para></listitem></varlistentry>
152
153     <varlistentry><term><literal>help</literal>
154      </term>
155      <listitem><para>
156        Prints list of available commands.
157       </para></listitem></varlistentry>
158
159    </variablelist>
160
161   </refsect1>
162   <refsect1><title>SEE ALSO</title>
163    <para>
164     <citerefentry>
165      <refentrytitle>yaz</refentrytitle>
166      <manvolnum>7</manvolnum>
167     </citerefentry>,
168     <citerefentry>
169      <refentrytitle>yaz-ztest</refentrytitle>
170      <manvolnum>8</manvolnum>
171     </citerefentry>,
172    </para>
173    <para>
174     Section "Building clients with ZOOM" in the YAZ manual.
175    </para>
176    <para>
177     <ulink url="http://zoom.z3950.org/">ZOOM home page</ulink>.
178    </para>
179   </refsect1>
180 </refentry>
181
182 <!-- Keep this comment at the end of the file
183 Local variables:
184 mode: sgml
185 sgml-omittag:t
186 sgml-shorttag:t
187 sgml-minimize-attributes:nil
188 sgml-always-quote-attributes:t
189 sgml-indent-step:1
190 sgml-indent-data:t
191 sgml-parent-document:nil
192 sgml-local-catalogs: nil
193 sgml-namecase-general:t
194 End:
195 -->