[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8453 - in GNUnet: doc/man src/applications/fs/tools
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8453 - in GNUnet: doc/man src/applications/fs/tools |
Date: |
Wed, 6 May 2009 08:14:41 -0600 |
Author: grothoff
Date: 2009-05-06 08:14:41 -0600 (Wed, 06 May 2009)
New Revision: 8453
Modified:
GNUnet/doc/man/gnunet-search.1
GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
Log:
Hi,
attached you find a patch (against head) that fixes the gnunet-search
manual page and the --help output of gnunet-pseudonym.
BTW I somewhat dislike the current implementation of keyword parsing in
gnunet-search: if there is only one argument, the argument is broken at
spaces, if there is more than one arguments, each argument is taken
(almost) literally as a keyword.
$ gnunet-search "Das Kapital"
searches for ("Das" OR "Kapital")
while
$ gnunet-search "Marx" "Das Kapital"
searches for ("Marx" OR "Das Kapital")
I'd suggest to not change argument treatment based on the number of
arguments, and never break arguments at spaces. However, for shell
scripts etc it might be nice to have an option to specify a single
keyword string to be broken. Why not support that via specific option?
e.g.
$ gnunet-search --search-string="Das Kapital"
to search for ("Das" OR "Kapital")
If you're ok with it, I could submit a patch that implements such a fix
and updates the man-page once again.
cheers,
David
Modified: GNUnet/doc/man/gnunet-search.1
===================================================================
--- GNUnet/doc/man/gnunet-search.1 2009-05-06 06:15:23 UTC (rev 8452)
+++ GNUnet/doc/man/gnunet-search.1 2009-05-06 14:14:41 UTC (rev 8453)
@@ -3,7 +3,7 @@
gnunet\-search \- a command line interface to search for content on GNUnet
.SH SYNOPSIS
.B gnunet\-search
-[\fIOPTIONS\fR] KEYWORD [AND KEYWORD]*
+[\fIOPTIONS\fR] [+]KEYWORD [[+]KEYWORD]*
.SH DESCRIPTION
.PP
Search for content on GNUnet. The keywords are case-sensitive. gnunet\-search
can be used both for a search in the global namespace as well as for searching
a private subspace.
@@ -40,17 +40,21 @@
print the version number
.SH NOTES
-You can run gnunet\-search with an URI instead of a keyword. The URI can have
the format for a namespace search or for a keyword search. For a namespace
search, the format is gnunet://ecrs/sks/NAMESPACE/IDENTIFIER. For a keyword
search, use gnunet://ecrs/ksk/KEYWORD[+KEYWORD]*. If the format does not
correspond to a GNUnet URI, GNUnet will automatically assume that keywords are
supplied directly. If multiple words are passed as keywords that are not
separated by an AND, gnunet-search will concatenate them to one bigger keyword.
Thus
+You can run gnunet\-search with an URI instead of a keyword. The URI can have
the format for a namespace search or for a keyword search. For a namespace
search, the format is gnunet://ecrs/sks/NAMESPACE/IDENTIFIER. For a keyword
search, use gnunet://ecrs/ksk/KEYWORD[+KEYWORD]*. If the format does not
correspond to a GNUnet URI, GNUnet will automatically assume that keywords are
supplied directly. If only one keyword argument is supplied, gnunet\-search
will split the argument at any spaces to yield more keywords:
-# gnunet\-search Das Kapital
+# gnunet\-search +Das +Kapital
and
-# gnunet\-search "Das Kapital"
+# gnunet\-search "+Das +Kapital"
-are identical. You can use AND to separate keywords. In that case,
gnunet\-search will only display results that match all the keywords.
gnunet\-search cannot do multiple independent queries ("OR"), you must use
multiple processes for that.
+are identical. Both search for any content matching keywords "Das" and
"Kapital". In general, if multiple keywords are passed, gnunet-search will
look for content matching any of the keywords. The prefix "+" makes a keyword
mandatory. Quotes "..." can be used to form keywords that contain spaces. But
be carefull to protect these quotes from the shell:
+
+# gnunet\-search "\\"Das Kapital\\""
+
+searches for content matching the keyword "Das Kapital".
+
Search results are printed by gnunet\-search like this:
-
.P
gnunet\-download \-o "COPYING" gnunet://ecrs/chk/HASH1.HASH2.SIZE
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-05-06 06:15:23 UTC
(rev 8452)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-05-06 14:14:41 UTC
(rev 8453)
@@ -88,7 +88,7 @@
gettext_noop
("use the given keyword to advertise the namespace (use when creating a new
pseudonym)"),
1, &GNUNET_ECRS_getopt_configure_set_keywords, &advertisement},
- {'m', "meta", "TYPE=VALUE",
+ {'m', "meta", "TYPE:VALUE",
gettext_noop ("specify metadata describing the namespace or collection"),
1, &GNUNET_ECRS_getopt_configure_set_metadata, &meta},
{'n', "no-advertisement", NULL,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8453 - in GNUnet: doc/man src/applications/fs/tools,
gnunet <=