MANFILES=yaz-client.1 yaz-ztest.8 \
yaz-config.1 yaz.7 zoomsh.1 yaz-asncomp.1 \
yaz-marcdump.1 yaz-iconv.1 yaz-log.7 \
- yaz-illclient.1 yaz-icu.1 bib1-attr.7 \
+ yaz-illclient.1 yaz-icu.1 yaz-url.1 bib1-attr.7 \
yaz-json-parse.1
REFFILES=yaz-client-man.xml yaz-ztest-man.xml yaz-config-man.xml \
yaz-man.xml zoomsh-man.xml yaz-asncomp-man.xml \
yaz-marcdump-man.xml yaz-iconv-man.xml yaz-log-man.xml \
- yaz-illclient-man.xml yaz-icu-man.xml bib1-attr-man.xml \
- yaz-json-parse-man.xml
+ yaz-illclient-man.xml yaz-icu-man.xml yaz-url-man.xml \
+ bib1-attr-man.xml yaz-json-parse-man.xml
SUPPORTFILES=entities.ent apilayer.obj local.ent.in
yaz-icu.1: yaz-icu-man.xml
$(MAN_COMPILE) $(srcdir)/yaz-icu-man.xml
+yaz-url.1: yaz-url-man.xml
+ $(MAN_COMPILE) $(srcdir)/yaz-url-man.xml
+
yaz-json-parse.1: yaz-json-parse-man.xml
$(MAN_COMPILE) $(srcdir)/yaz-json-parse-man.xml
--- /dev/null
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
+[
+ <!ENTITY % local SYSTEM "local.ent">
+ %local;
+ <!ENTITY % entities SYSTEM "entities.ent">
+ %entities;
+ <!ENTITY % idcommon SYSTEM "common/common.ent">
+ %idcommon;
+]>
+<refentry id="yaz-url">
+ <refentryinfo>
+ <productname>YAZ</productname>
+ <productnumber>&version;</productnumber>
+ <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>yaz-url</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Commands</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>yaz-url</refname>
+ <refpurpose>YAZ URL fetch utility</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>yaz-url</command>
+ <arg>-H <replaceable>name:value</replaceable></arg>
+ <arg>-m <replaceable>method</replaceable></arg>
+ <arg>-O <replaceable>fname</replaceable></arg>
+ <arg>-p <replaceable>fname</replaceable></arg>
+ <arg>-u <replaceable>user/password</replaceable></arg>
+ <arg>-x <replaceable>proxy</replaceable></arg>
+ <arg rep="repeat">url</arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1><title>DESCRIPTION</title>
+ <para>
+ <command>yaz-url</command> is utility to get web content. It is very
+ limited in functionality compared to programs such as curl, wget.
+ </para>
+ <para>
+ The options must be precede the URL given on the command line to take
+ effect.
+ </para>
+ <para>
+ Fetched HTTP content is written to stdout, unless option -O is given.
+ </para>
+ </refsect1>
+
+ <refsect1><title>OPTIONS</title>
+ <variablelist>
+ <varlistentry>
+ <term>-H <replaceable>name:value</replaceable></term>
+ <listitem><para>
+ Specifies HTTP header content with name and value. This
+ option can be given multiple times (for different names,
+ of course).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-m <replaceable>method</replaceable></term>
+ <listitem><para>
+ Specifies the HTTP method to be used for the next URL.
+ Default is method "GET". However, option -p sets it to "POST".
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-O <replaceable>fname</replaceable></term>
+ <listitem><para>
+ Sets output filename for HTTP content.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-p <replaceable>fname</replaceable></term>
+ <listitem><para>
+ Sets a file to be POSTed in the folloing URL.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-u <replaceable>user/password</replaceable></term>
+ <listitem><para>
+ Specifies a user and a password to be uesd in HTTP
+ basic authentication in the following URL fetch. The user
+ and password must be separated by a slash (this it is not
+ possible to specify a user with a slash in it).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>-x <replaceable>proxy</replaceable></term>
+ <listitem><para>
+ Specifies a proxy to be used for URL fetch.
+ </para></listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+ <refsect1><title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>yaz</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-local-catalogs: nil
+sgml-namecase-general:t
+End:
+-->
static void usage(void)
{
printf("yaz-icu [options] url ..\n");
- printf(" -H name:value Set HTTP header (repeat if necessary)\n");
- printf(" -m method HTTP method\n");
- printf(" -O file Write to file, instead of stdout\n");
- printf(" -p file POSTs file at following url\n");
- printf(" -u user/password Basic HTTP auth\n");
- printf(" -x proxy HTTP proxy\n");
+ printf(" -H name:value Sets HTTP header (repeat if necessary)\n");
+ printf(" -m method Sets HTTP method\n");
+ printf(" -O fname Writes HTTP content to file\n");
+ printf(" -p fname POSTs file at following url\n");
+ printf(" -u user/password Sets Basic HTTP auth\n");
+ printf(" -x proxy Sets HTTP proxy\n");
exit(1);
}