aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-08-28 09:05:15 +0000
committerChristian Grothoff <christian@grothoff.org>2009-08-28 09:05:15 +0000
commit3b7b7b388b7968c11556ba92060a17a964c46451 (patch)
treebd37d3a7deb01c3c3a05326f7893f81732afc8f9 /doc
parent57df0fbf8398720fbd4a9cf34934c212ea00ee54 (diff)
downloadgnunet-3b7b7b388b7968c11556ba92060a17a964c46451.tar.gz
gnunet-3b7b7b388b7968c11556ba92060a17a964c46451.zip
stuff
Diffstat (limited to 'doc')
-rw-r--r--doc/man/Makefile.am1
-rw-r--r--doc/man/gnunet-publish.1166
2 files changed, 167 insertions, 0 deletions
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 734fc9c85..b5af700e0 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -1,6 +1,7 @@
1man_MANS = \ 1man_MANS = \
2 gnunet-arm.1 \ 2 gnunet-arm.1 \
3 gnunet-peerinfo.1 \ 3 gnunet-peerinfo.1 \
4 gnunet-publish.1 \
4 gnunet-statistics.1 \ 5 gnunet-statistics.1 \
5 gnunet-transport.c 6 gnunet-transport.c
6 7
diff --git a/doc/man/gnunet-publish.1 b/doc/man/gnunet-publish.1
new file mode 100644
index 000000000..4926295cf
--- /dev/null
+++ b/doc/man/gnunet-publish.1
@@ -0,0 +1,166 @@
1.TH GNUNET-PUBLISH "1" "27 Aug 2009" "GNUnet"
2.SH NAME
3gnunet\-publish \- a command line interface for publishing new content into GNUnet
4.SH SYNOPSIS
5.B gnunet\-publish
6[\fIOPTIONS\fR] FILENAME
7.SH DESCRIPTION
8.PP
9In order to share files with other GNUnet users, the files must first be made available to GNUnet. GNUnet does not automatically share all files from a certain directory. In fact, even files that are downloaded are not automatically shared.
10.PP
11In order to start sharing files, the files must be added either using gnunet\-publish or a graphical interface such as gnunet\-gtk. The command line tool gnunet\-publish is more useful if many files are supposed to be added. gnunet\-publish can automatically publish batches of files, recursively publish directories, create directories that can be browsed within GNUnet and publish file lists in a namespace. When run on a directory, gnunet\-publish will always recursively publish all of the files in the directory.
12.PP
13gnunet\-publish can automatically extract keywords from the files that are shared. Users that want to download files from GNUnet use keywords to search for the appropriate content. You can disable keyword extraction with the \-D option. You can manually add keywords using the \-k option. The keywords are case\-sensitive. (However, keyword normalization can also be used.)
14.PP
15You can use automatic meta\-data extraction (based on libextractor) or the command\-line option \-m to specify meta-data. For the \-m option you need to use the form keyword\-type:value. For example, use "\-m os:Linux" to specify that the operating system is Linux. Common meta\-data types are "author", "title" , "mimetype", "filename", "language", "subject" and "keywords". A full list can be obtained from the extract tool using the option \-\-list. The meta\-data is used to help users in searching for files on the network.
16.PP
17In addition to searching for files by keyword, GNUnet allows organizing files into directories. With directories, the user only needs to find the directory in order to be able to download any of the files listed in the directory. Directories can contain pointers to other directories.
18.PP
19With gnunet\-publish, it is easy to create new directories simultaneously when adding the files. Simply pass the name of a directory instead of a file.
20.PP
21Since keywords can be spammed (any user can add any content under any keyword), GNUnet supports namespaces. A namespace is a subset of the searchspace into which only the holder of a certain pseudonym can add content. Any GNUnet user can create any number of pseudonyms using \fBgnunet\-pseudonym\fR. Pseudonyms are stored in the user's GNUnet directory. While pseudonyms are locally identified with an arbitrary string that the user selects when the pseudonym is created, the namespace is globally known only under the hash of the public key of the pseudonym. Since only the owner of the pseudonym can add content to the namespace, it is impossible for other users to pollute the namespace. gnunet\-publish automatically publishs the top\-directory (or the only file if only one file is specified) into the namespace if a pseudonym is specified.
22.PP
23It is possible to update content in GNUnet if that content was placed and obtained from a particular namespace. Updates are only possible for content in namespaces since this is the only way to assure that a malicious party can not supply counterfeited updates. Note that an update with GNUnet does not make the old content unavailable, GNUnet merely allows the publisher to point users to more recent versions. You can use the \-N option to specify the future identifier of an update. When using this option, a GNUnet client that finds the current (\-t) identifier will automatically begin a search for the update (\-N) identifier. If you later publish an update under the (\-N) identifier, both results will be given to the user.
24.PP
25You can use automatic meta\-data extraction (based on libextractor) or the command\-line option \-m to specify meta-data. For the \-m option you need to use the form keyword\-type:value. For example, use "\-m os:Linux" to specify that the operating system is Linux. Common meta\-data types are "author", "title" , "mimetype", "filename", "language", "subject" and "keywords". A full list can be obtained from the extract tool using the option \-\-list. The meta\-data is used to help users in searching for files on the network. The keywords are case\-sensitive.
26.PP
27GNUnet supports two styles of publishing files on the network. Publishing a file means that a copy of the file is made in the local (!) database of the node. Indexing a file means that an index is added to the local (!) database with symbolic links to the file itself. The links will use the SHA-512 hash of the entire file as the filename. Indexing is generally significantly more efficient and the default choice. However, indexing only works if the indexed file can be read (using the same absolute path) by gnunetd. If this is not the case, indexing will fail (and gnunet\-publish will automatically revert to publishing instead). Regardless of which method is used to publish the file, the file will be slowly (depending on how often it is requested and on how much bandwidth is available) dispersed into the network. If you publish or index a file and then leave the network, it will almost always NOT be available anymore.
28
29\fB\-c \fIFILENAME\fR, \fB\-\-config=FILENAME\fR
30Use alternate config file (if this option is not specified, the default is ~/.gnunet/gnunet.conf).
31
32.TP
33\fB\-D\fR, \fB\-\-disable\-extractor\fR
34Disable use of GNU libextractor for finding additional keywords and metadata.
35
36.TP
37\fB\-e\fR, \fB\-\-extract\fR
38Print the list of keywords that will be used for each file given the current options. Do not perform any indexing or publishing.
39
40.TP
41\fB\-h\fR, \fB\-\-help\fR
42Print a brief help page with all the options.
43
44.TP
45\fB\-H \fIHOSTNAME\fR, \fB\-\-host=\fIHOSTNAME\fR
46on which host is gnunetd running (default: localhost). You can also specify a port using the syntax HOSTNAME:PORT. The default port is 2087.
47.TP
48\fB\-k \fIKEYWORD\fR, \fB\-\-key=KEYWORD\fR
49additional key to index the content with (to add multiple keys, specify multiple times). Each additional key is case\-sensitive. Can be specified multiple times. The keyword is only applied to the top\-level file or directory.
50
51.TP
52\fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=\fILOGLEVEL\fR
53Change the loglevel. Possible values for LOGLEVEL are NOTHING, FATAL,
54ERROR, WARNING, INFO, STATUS and DEBUG. Note that options in the
55configuration file take precedence over this option (the argument
56will be ignored in that case).
57
58.TP
59\fB\-m \fITYPE:VALUE\fR, \fB\-\-meta=\fITYPE:VALUE\fR
60For the main file (or directory), set the metadata of the given TYPE to the given VALUE. Note that this will not add the respective VALUE to the set of keywords under which the file can be found.
61
62.TP
63\fB\-n\fR, \fB\-\-noindex\fR
64Executive summary: You probably don't need it.
65
66Do not index, full publishion. Note that directories, RBlocks, SBlocks and IBlocks are always published (even without this option). With this option, every block of the actual files is stored in encrypted form in the block database of the local peer. While this adds security if the local node is compromised (the adversary snags your machine), it is significantly less efficient compared to on\-demand encryption and is definitely not recommended for large files.
67
68.TP
69\fB\-N \fIID\fR, \fB\-\-next=\fIID\fR
70Specifies the next ID of a future version of the SBlock. This option is only valid together with the \-P option. This option can be used to specify what the identifier of an updated version will look like. Note that specifying \-i and \-N without \-t is not allowed.
71
72.TP
73\fB\-p \fIPRIORITY\fR, \fB\-\-prio=\fIPRIORITY\fR
74Executive summary: You probably don't need it.
75
76Set the priority of the published content (default: 365). If the local database is full, GNUnet will discard the content with the lowest ranking. Note that ranks change over time depending on popularity. The default should be high enough to preserve the locally published content in favor of content that migrates from other peers.
77
78.TP
79\fB\-P \fINAME\fR, \fB\-\-pseudonym=\fINAME\fR
80For the top\-level directory or file, create an SBlock that places the file into the namespace specified by the pseudonym NAME.
81
82.TP
83\fB\-s\fR, \fB\-\-simulate-only\fR
84When this option is used, gnunet\-publish will not actually publish the file but just simulate what would be done. This can be used to compute the GNUnet URI for a file without actually sharing it.
85
86.TP
87\fB\-t \fIID\fR, \fB\-\-this=\fIID\fR
88Specifies the ID of the SBlock. This option is only valid together with the\ \-s option.
89
90.TP
91\fB\-u \fIURI\fR, \fB\-\-uri=\fIURI\fR
92This option can be used to specify the URI of a file instead of a filename (this is the only case where the otherwise mandatory filename argument must be omitted). Instead of publishing a file or directory and using the corresponding URI, gnunet\-publish will use this URI and perform the selected namespace or keyword operations. This can be used to add additional keywords to a file that has already been shared or to add files to a namespace for which the URI is known but the content is not locally available.
93
94.TP
95\fB\-v\fR, \fB\-\-version\fR
96Print the version number.
97
98.TP
99\fB\-V\fR, \fB\-\-verbose\fR
100Be verbose. Using this option causes gnunet\-publish to print progress information and at the end the file identification that can be used to download the file from GNUnet.
101
102
103.SH EXAMPLES
104.PP
105
106\fBBasic examples\fR
107
108Index a file COPYING:
109
110 # gnunet\-publish COPYING
111
112Publish a file COPYING:
113
114 # gnunet\-publish \-n COPYING
115
116Index a file COPYING with the keywords \fBgpl\fR and \fBtest\fR:
117
118 # gnunet\-publish \-k gpl \-k test COPYING
119
120Index a file COPYING with description "GNU License", mime-type "text/plain" and keywords \fBgpl\fR and \fBtest\fR:
121
122 # gnunet\-publish \-m "description:GNU License" \-k gpl \-k test -m "mimetype:text/plain" COPYING
123
124\fBUsing directories\fR
125
126Index the files COPYING and AUTHORS with keyword \fBtest\fR and build a directory containing the two files. Make the directory itself available under keyword \fBgnu\fR and disable keyword extraction using libextractor:
127
128 # mkdir gnu
129 # mv COPYING AUTHORS gnu/
130 # gnunet\-publish \-K test \-k gnu \-D gnu/
131
132Neatly publish an image gallery in \fBkittendir/\fR and its subdirs with keyword \fBkittens\fR for the directory but no keywords for the individual files or subdirs (\-n). Force description for all files:
133
134 # gnunet\-publish \-n \-m "description:Kitten collection" \-k kittens kittendir/
135
136\fBSecure publishing with namespaces\fR
137
138Publish file COPYING with pseudonym RIAA-2 (\-P) and with identifier \fBgpl\fR (\-t) and no updates:
139
140 # gnunet\-publish \-P RIAA-2 \-t gpl COPYING
141
142Recursively index /home/ogg and build a matching directory structure. Publish the top\-level directory into the namespace under the pseudonym RIAA-2 (\-P) under identifier 'MUSIC' (\-t) and promise to provide an update with identifier 'VIDEOS' (\-N):
143
144 # gnunet\-publish \-P RIAA-2 \-t MUSIC \-N VIDEOS /home/ogg
145
146Recursively publish (\-n) /var/lib/mysql and build a matching directory structure, but disable the use of libextractor to extract keywords (\-n). Print the file identifiers (\-V) that can be used to retrieve the files. This will store a copy of the MySQL database in GNUnet but without adding any keywords to search for it. Thus only people that have been told the secret file identifiers printed with the \-V option can retrieve the (secret?) files:
147
148 # gnunet\-publish \-nV /var/lib/mysql
149
150Create a namespace entry 'root' in namespace MPAA-1 and announce that the next update will be called 'next':
151
152 # gnunet\-publish \-P MPAA-1 -t root \-N next noise.mp3
153
154Update the previous entry, do not allow any future updates:
155
156 # gnunet\-publish \-P MPAA-1 \-t next noise_updated.mp3
157
158
159.SH FILES
160.TP
161~/.gnunet/gnunet.conf
162GNUnet configuration file
163.SH "REPORTING BUGS"
164Report bugs by using mantis <https://gnunet.org/mantis/> or by sending electronic mail to <gnunet\-developers@gnu.org>
165.SH "SEE ALSO"
166\fBgnunet\-auto\-share\fP(1), \fBgnunet\-gtk\fP(1), \fBgnunet\-pseudonym\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5), \fBgnunetd\fP(1), \fBextract\fP(1)