From 4c2a1989cfcdeba0338fce5fe9152a37837ef28a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 11 Aug 2011 11:23:54 +0200 Subject: [PATCH] yaz-url + man page installed and part of packages --- debian/yaz.install | 1 + debian/yaz.manpages | 1 + doc/Makefile.am | 9 ++-- doc/yaz-url-man.xml | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++ util/Makefile.am | 5 +- util/yaz-url.c | 12 ++--- yaz.spec | 2 + 7 files changed, 150 insertions(+), 11 deletions(-) create mode 100644 doc/yaz-url-man.xml diff --git a/debian/yaz.install b/debian/yaz.install index 33ca3d2..fed8769 100644 --- a/debian/yaz.install +++ b/debian/yaz.install @@ -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 diff --git a/debian/yaz.manpages b/debian/yaz.manpages index 45f5d32..bbb57e1 100644 --- a/debian/yaz.manpages +++ b/debian/yaz.manpages @@ -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 diff --git a/doc/Makefile.am b/doc/Makefile.am index 1eb7d9e..f7ead44 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 index 0000000..8c9786c --- /dev/null +++ b/doc/yaz-url-man.xml @@ -0,0 +1,131 @@ + + %local; + + %entities; + + %idcommon; +]> + + + YAZ + &version; + Index Data + + + + yaz-url + 1 + Commands + + + + yaz-url + YAZ URL fetch utility + + + + + yaz-url + -H name:value + -m method + -O fname + -p fname + -u user/password + -x proxy + url + + + + DESCRIPTION + + yaz-url is utility to get web content. It is very + limited in functionality compared to programs such as curl, wget. + + + The options must be precede the URL given on the command line to take + effect. + + + Fetched HTTP content is written to stdout, unless option -O is given. + + + + OPTIONS + + + -H name:value + + Specifies HTTP header content with name and value. This + option can be given multiple times (for different names, + of course). + + + + + -m method + + Specifies the HTTP method to be used for the next URL. + Default is method "GET". However, option -p sets it to "POST". + + + + + -O fname + + Sets output filename for HTTP content. + + + + + -p fname + + Sets a file to be POSTed in the folloing URL. + + + + + -u user/password + + 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). + + + + + -x proxy + + Specifies a proxy to be used for URL fetch. + + + + + + SEE ALSO + + + yaz + 7 + + + + + + diff --git a/util/Makefile.am b/util/Makefile.am index 30029b3..f1dd04f 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -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 diff --git a/util/yaz-url.c b/util/yaz-url.c index 98bf594..5f9a9be 100644 --- a/util/yaz-url.c +++ b/util/yaz-url.c @@ -17,12 +17,12 @@ 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); } diff --git a/yaz.spec b/yaz.spec index ac59744..8d60a60 100644 --- 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.* -- 1.7.10.4