yaz-url + man page installed and part of packages
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 11 Aug 2011 09:23:54 +0000 (11:23 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 11 Aug 2011 09:25:08 +0000 (11:25 +0200)
debian/yaz.install
debian/yaz.manpages
doc/Makefile.am
doc/yaz-url-man.xml [new file with mode: 0644]
util/Makefile.am
util/yaz-url.c
yaz.spec

index 33ca3d2..fed8769 100644 (file)
@@ -4,3 +4,4 @@ debian/tmp/usr/bin/zoomsh
 debian/tmp/usr/bin/yaz-marcdump
 debian/tmp/usr/bin/yaz-iconv
 debian/tmp/usr/bin/yaz-json-parse
+debian/tmp/usr/bin/yaz-url
index 45f5d32..bbb57e1 100644 (file)
@@ -6,3 +6,4 @@ debian/tmp/usr/share/man/man1/yaz-iconv.1
 debian/tmp/usr/share/man/man7/yaz-log.7
 debian/tmp/usr/share/man/man7/bib1-attr.7
 debian/tmp/usr/share/man/man1/yaz-json-parse.1
+debian/tmp/usr/share/man/man1/yaz-url.1
index 1eb7d9e..f7ead44 100644 (file)
@@ -15,13 +15,13 @@ HTMLFILES = index.html
 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
 
@@ -70,6 +70,9 @@ yaz-log.7: yaz-log-man.xml
 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
 
diff --git a/doc/yaz-url-man.xml b/doc/yaz-url-man.xml
new file mode 100644 (file)
index 0000000..8c9786c
--- /dev/null
@@ -0,0 +1,131 @@
+<!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:
+-->
index 30029b3..f1dd04f 100644 (file)
@@ -9,9 +9,10 @@ DISTCLEANFILES = yaz-config
 
 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(ICU_CPPFLAGS)
 
-bin_PROGRAMS = yaz-marcdump yaz-iconv yaz-illclient yaz-icu yaz-json-parse
+bin_PROGRAMS = yaz-marcdump yaz-iconv yaz-illclient yaz-icu yaz-json-parse \
+ yaz-url
 noinst_PROGRAMS = cclsh cql2pqf cql2xcql srwtst yaz-benchmark \
- yaz-xmlquery yaz-record-conv yaz-url
+ yaz-xmlquery yaz-record-conv
 
 # MARC dumper utility
 yaz_marcdump_SOURCES = marcdump.c
index 98bf594..5f9a9be 100644 (file)
 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);
 }
 
index ac59744..8d60a60 100644 (file)
--- a/yaz.spec
+++ b/yaz.spec
@@ -117,8 +117,10 @@ rm -fr ${RPM_BUILD_ROOT}
 %{_bindir}/yaz-marcdump
 %{_bindir}/yaz-iconv
 %{_bindir}/yaz-json-parse
+%{_bindir}/yaz-url
 %{_mandir}/man1/yaz-client.*
 %{_mandir}/man1/yaz-json-parse.*
+%{_mandir}/man1/yaz-url.*
 %{_mandir}/man8/yaz-ztest.*
 %{_mandir}/man1/zoomsh.*
 %{_mandir}/man1/yaz-marcdump.*