Browse code

* format-manpage.pl: new manpage auto-formatter * s3cmd.1: Updated using the above helper script * setup.py: Warn if manpage is too old.

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@451 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2010/11/12 16:05:04
Showing 4 changed files
... ...
@@ -1,3 +1,9 @@
1
+2010-11-12  Michal Ludvig  <mludvig@logix.net.nz>
2
+
3
+	* format-manpage.pl: new manpage auto-formatter
4
+	* s3cmd.1: Updated using the above helper script
5
+	* setup.py: Warn if manpage is too old.
6
+
1 7
 2010-10-27  Michal Ludvig  <mludvig@logix.net.nz>
2 8
 
3 9
 	* run-tests.py, testsuite.tar.gz: Keep the testsuite in
4 10
new file mode 100755
... ...
@@ -0,0 +1,185 @@
0
+#!/usr/bin/perl
1
+
2
+# Format s3cmd.1 manpage
3
+# Usage:
4
+#   s3cmd --help | format-manpage.pl > s3cmd.1
5
+
6
+use strict;
7
+
8
+my $commands = "";
9
+my $cfcommands = "";
10
+my $options = "";
11
+
12
+while (<>) {
13
+	if (/^Commands:/) {
14
+		while (<>) {
15
+			last if (/^\s*$/);
16
+			my ($desc, $cmd, $cmdline);
17
+			($desc = $_) =~ s/^\s*(.*?)\s*$/$1/;
18
+			($cmdline = <>) =~ s/^\s*s3cmd (.*?) (.*?)\s*$/s3cmd \\fB$1\\fR \\fI$2\\fR/;
19
+			$cmd = $1;
20
+			if ($cmd =~ /^cf/) {
21
+				$cfcommands .= ".TP\n$cmdline\n$desc\n";
22
+			} else {
23
+				$commands .= ".TP\n$cmdline\n$desc\n";
24
+			}
25
+		}
26
+	}
27
+	if (/^Options:/) {
28
+		my ($opt, $desc);
29
+		while (<>) {
30
+			last if (/^\s*$/);
31
+			$_ =~ s/\s*(.*?)\s*$/$1/;
32
+			$desc = "";
33
+			$opt = "";
34
+			if (/^(-.*)/) {
35
+				$opt = $1;
36
+				if ($opt =~ /  /) {
37
+					($opt, $desc) = split(/\s\s+/, $opt, 2);
38
+				}
39
+				$opt =~ s/(-[^ ,=]+)/\\fB$1\\fR/g;
40
+				$opt =~ s/-/\\-/g;
41
+				$options .= ".TP\n$opt\n";
42
+			} else {
43
+				$desc .= $_;
44
+			}
45
+			if ($desc) {
46
+				$options .= "$desc\n";
47
+			}
48
+		}
49
+	}
50
+}
51
+print "
52
+.TH s3cmd 1
53
+.SH NAME
54
+s3cmd \\- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
55
+.SH SYNOPSIS
56
+.B s3cmd
57
+[\\fIOPTIONS\\fR] \\fICOMMAND\\fR [\\fIPARAMETERS\\fR]
58
+.SH DESCRIPTION
59
+.PP
60
+.B s3cmd
61
+is a command line client for copying files to/from 
62
+Amazon S3 (Simple Storage Service) and performing other
63
+related tasks, for instance creating and removing buckets,
64
+listing objects, etc.
65
+
66
+.SH COMMANDS
67
+.PP
68
+.B s3cmd
69
+can do several \\fIactions\\fR specified by the following \\fIcommands\\fR.
70
+$commands
71
+
72
+.PP
73
+Commands for CloudFront management
74
+$cfcommands
75
+
76
+.SH OPTIONS
77
+.PP
78
+Some of the below specified options can have their default 
79
+values set in 
80
+.B s3cmd
81
+config file (by default \$HOME/.s3cmd). As it's a simple text file 
82
+feel free to open it with your favorite text editor and do any
83
+changes you like. 
84
+$options
85
+
86
+.SH EXAMPLES
87
+One of the most powerful commands of \\fIs3cmd\\fR is \\fBs3cmd sync\\fR used for 
88
+synchronising complete directory trees to or from remote S3 storage. To some extent 
89
+\\fBs3cmd put\\fR and \\fBs3cmd get\\fR share a similar behaviour with \\fBsync\\fR.
90
+.PP
91
+Basic usage common in backup scenarios is as simple as:
92
+.nf
93
+	s3cmd sync /local/path/ s3://test-bucket/backup/
94
+.fi
95
+.PP
96
+This command will find all files under /local/path directory and copy them 
97
+to corresponding paths under s3://test-bucket/backup on the remote side.
98
+For example:
99
+.nf
100
+	/local/path/\\fBfile1.ext\\fR         \\->  s3://bucket/backup/\\fBfile1.ext\\fR
101
+	/local/path/\\fBdir123/file2.bin\\fR  \\->  s3://bucket/backup/\\fBdir123/file2.bin\\fR
102
+.fi
103
+.PP
104
+However if the local path doesn't end with a slash the last directory's name
105
+is used on the remote side as well. Compare these with the previous example:
106
+.nf
107
+	s3cmd sync /local/path s3://test-bucket/backup/
108
+.fi
109
+will sync:
110
+.nf
111
+	/local/\\fBpath/file1.ext\\fR         \\->  s3://bucket/backup/\\fBpath/file1.ext\\fR
112
+	/local/\\fBpath/dir123/file2.bin\\fR  \\->  s3://bucket/backup/\\fBpath/dir123/file2.bin\\fR
113
+.fi
114
+.PP
115
+To retrieve the files back from S3 use inverted syntax:
116
+.nf
117
+	s3cmd sync s3://test-bucket/backup/ /tmp/restore/
118
+.fi
119
+that will download files:
120
+.nf
121
+	s3://bucket/backup/\\fBfile1.ext\\fR         \\->  /tmp/restore/\\fBfile1.ext\\fR       
122
+	s3://bucket/backup/\\fBdir123/file2.bin\\fR  \\->  /tmp/restore/\\fBdir123/file2.bin\\fR
123
+.fi
124
+.PP
125
+Without the trailing slash on source the behaviour is similar to 
126
+what has been demonstrated with upload:
127
+.nf
128
+	s3cmd sync s3://test-bucket/backup /tmp/restore/
129
+.fi
130
+will download the files as:
131
+.nf
132
+	s3://bucket/\\fBbackup/file1.ext\\fR         \\->  /tmp/restore/\\fBbackup/file1.ext\\fR       
133
+	s3://bucket/\\fBbackup/dir123/file2.bin\\fR  \\->  /tmp/restore/\\fBbackup/dir123/file2.bin\\fR
134
+.fi
135
+.PP
136
+All source file names, the bold ones above, are matched against \\fBexclude\\fR 
137
+rules and those that match are then re\\-checked against \\fBinclude\\fR rules to see
138
+whether they should be excluded or kept in the source list.
139
+.PP
140
+For the purpose of \\fB\\-\\-exclude\\fR and \\fB\\-\\-include\\fR matching only the 
141
+bold file names above are used. For instance only \\fBpath/file1.ext\\fR is tested
142
+against the patterns, not \\fI/local/\\fBpath/file1.ext\\fR
143
+.PP
144
+Both \\fB\\-\\-exclude\\fR and \\fB\\-\\-include\\fR work with shell-style wildcards (a.k.a. GLOB).
145
+For a greater flexibility s3cmd provides Regular-expression versions of the two exclude options 
146
+named \\fB\\-\\-rexclude\\fR and \\fB\\-\\-rinclude\\fR. 
147
+The options with ...\\fB\\-from\\fR suffix (eg \\-\\-rinclude\\-from) expect a filename as
148
+an argument. Each line of such a file is treated as one pattern.
149
+.PP
150
+There is only one set of patterns built from all \\fB\\-\\-(r)exclude(\\-from)\\fR options
151
+and similarly for include variant. Any file excluded with eg \\-\\-exclude can 
152
+be put back with a pattern found in \\-\\-rinclude\\-from list.
153
+.PP
154
+Run s3cmd with \\fB\\-\\-dry\\-run\\fR to verify that your rules work as expected. 
155
+Use together with \\fB\\-\\-debug\\fR get detailed information
156
+about matching file names against exclude and include rules.
157
+.PP
158
+For example to exclude all files with \".jpg\" extension except those beginning with a number use:
159
+.PP
160
+	\\-\\-exclude '*.jpg' \\-\\-rinclude '[0-9].*\\.jpg'
161
+
162
+.SH SEE ALSO
163
+For the most up to date list of options run 
164
+.B s3cmd \\-\\-help
165
+.br
166
+For more info about usage, examples and other related info visit project homepage at
167
+.br
168
+.B http://s3tools.org
169
+
170
+.SH AUTHOR
171
+Written by Michal Ludvig <mludvig\@logix.net.nz>
172
+.SH CONTACT, SUPPORT
173
+Prefered way to get support is our mailing list:
174
+.I s3tools\\-general\@lists.sourceforge.net
175
+.SH REPORTING BUGS
176
+Report bugs to 
177
+.I s3tools\\-bugs\@lists.sourceforge.net
178
+.SH COPYRIGHT
179
+Copyright \\(co 2007,2008,2009,2010 Michal Ludvig <http://www.logix.cz/michal>
180
+.br
181
+This is free software.  You may redistribute copies of it under the terms of
182
+the GNU General Public License version 2 <http://www.gnu.org/licenses/gpl.html>.
183
+There is NO WARRANTY, to the extent permitted by law.
184
+";
... ...
@@ -1,3 +1,4 @@
1
+
1 2
 .TH s3cmd 1
2 3
 .SH NAME
3 4
 s3cmd \- tool for managing Amazon S3 storage space and Amazon CloudFront content delivery network
... ...
@@ -11,72 +12,80 @@ is a command line client for copying files to/from
11 11
 Amazon S3 (Simple Storage Service) and performing other
12 12
 related tasks, for instance creating and removing buckets,
13 13
 listing objects, etc.
14
+
15
+.SH COMMANDS
14 16
 .PP
15 17
 .B s3cmd
16 18
 can do several \fIactions\fR specified by the following \fIcommands\fR.
17 19
 .TP
18
-\fBmb\fR \fIs3://BUCKET\fR
20
+s3cmd \fBmb\fR \fIs3://BUCKET\fR
19 21
 Make bucket
20 22
 .TP
21
-\fBrb\fR \fIs3://BUCKET\fR
23
+s3cmd \fBrb\fR \fIs3://BUCKET\fR
22 24
 Remove bucket
23 25
 .TP
24
-\fBls\fR \fI[s3://BUCKET[/PREFIX]]\fR
26
+s3cmd \fBls\fR \fI[s3://BUCKET[/PREFIX]]\fR
25 27
 List objects or buckets
26 28
 .TP
27
-\fBla\fR
29
+s3cmd \fBla\fR \fI\fR
28 30
 List all object in all buckets
29 31
 .TP
30
-\fBput\fR \fIFILE [FILE...] s3://BUCKET[/PREFIX]\fR
31
-Put file into bucket (i.e. upload to S3)
32
+s3cmd \fBput\fR \fIFILE [FILE...] s3://BUCKET[/PREFIX]\fR
33
+Put file into bucket
32 34
 .TP
33
-\fBget\fR \fIs3://BUCKET/OBJECT LOCAL_FILE\fR
34
-Get file from bucket (i.e. download from S3)
35
+s3cmd \fBget\fR \fIs3://BUCKET/OBJECT LOCAL_FILE\fR
36
+Get file from bucket
35 37
 .TP
36
-\fBdel\fR \fIs3://BUCKET/OBJECT\fR
38
+s3cmd \fBdel\fR \fIs3://BUCKET/OBJECT\fR
37 39
 Delete file from bucket
38 40
 .TP
39
-\fBsync\fR \fILOCAL_DIR s3://BUCKET[/PREFIX]\fR
40
-Backup a directory tree to S3
41
+s3cmd \fBsync\fR \fILOCAL_DIR s3://BUCKET[/PREFIX] or s3://BUCKET[/PREFIX] LOCAL_DIR\fR
42
+Synchronize a directory tree to S3
43
+.TP
44
+s3cmd \fBdu\fR \fI[s3://BUCKET[/PREFIX]]\fR
45
+Disk usage by buckets
46
+.TP
47
+s3cmd \fBinfo\fR \fIs3://BUCKET[/OBJECT]\fR
48
+Get various information about Buckets or Files
49
+.TP
50
+s3cmd \fBcp\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
51
+Copy object
41 52
 .TP
42
-\fBsync\fR \fIs3://BUCKET[/PREFIX] LOCAL_DIR\fR
43
-Restore a tree from S3 to local directory
53
+s3cmd \fBmv\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR
54
+Move object
44 55
 .TP
45
-\fBcp\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR, \fBmv\fR \fIs3://BUCKET1/OBJECT1 s3://BUCKET2[/OBJECT2]\fR 
46
-Make a copy of a file (\fIcp\fR) or move a file (\fImv\fR). 
47
-Destination can be in the same bucket with a different name
48
-or in another bucket with the same or different name.
49
-Adding \fI\-\-acl\-public\fR will make the destination object 
50
-publicly accessible (see below).
56
+s3cmd \fBsetacl\fR \fIs3://BUCKET[/OBJECT]\fR
57
+Modify Access control list for Bucket or Files
51 58
 .TP
52
-\fBsetacl\fR \fIs3://BUCKET[/OBJECT]\fR
53
-Modify \fIAccess control list\fI for Bucket or Files. Use with 
54
-\fI\-\-acl\-public\fR or \fI\-\-acl\-private\fR
55
-.TP 
56
-\fBinfo\fR \fIs3://BUCKET[/OBJECT]\fR
57
-Get various information about a Bucket or Object
59
+s3cmd \fBaccesslog\fR \fIs3://BUCKET\fR
60
+Enable/disable bucket access logging
58 61
 .TP
59
-\fBdu\fR \fI[s3://BUCKET[/PREFIX]]\fR
60
-Disk usage \- amount of data stored in S3
62
+s3cmd \fBsign\fR \fISTRING-TO-SIGN\fR
63
+Sign arbitrary string using the secret key
64
+.TP
65
+s3cmd \fBfixbucket\fR \fIs3://BUCKET[/PREFIX]\fR
66
+Fix invalid file names in a bucket
67
+
61 68
 
62 69
 .PP
63 70
 Commands for CloudFront management
64 71
 .TP
65
-\fBcflist\fR
72
+s3cmd \fBcflist\fR \fI\fR
66 73
 List CloudFront distribution points
67 74
 .TP
68
-\fBcfinfo\fR [\fIcf://DIST_ID\fR]
75
+s3cmd \fBcfinfo\fR \fI[cf://DIST_ID]\fR
69 76
 Display CloudFront distribution point parameters
70 77
 .TP
71
-\fBcfcreate\fR \fIs3://BUCKET\fR
78
+s3cmd \fBcfcreate\fR \fIs3://BUCKET\fR
72 79
 Create CloudFront distribution point
73 80
 .TP
74
-\fBcfdelete\fR \fIcf://DIST_ID\fR
81
+s3cmd \fBcfdelete\fR \fIcf://DIST_ID\fR
75 82
 Delete CloudFront distribution point
76 83
 .TP
77
-\fBcfmodify\fR \fIcf://DIST_ID\fR
84
+s3cmd \fBcfmodify\fR \fIcf://DIST_ID\fR
78 85
 Change CloudFront distribution point parameters
79 86
 
87
+
80 88
 .SH OPTIONS
81 89
 .PP
82 90
 Some of the below specified options can have their default 
... ...
@@ -85,129 +94,186 @@ values set in
85 85
 config file (by default $HOME/.s3cmd). As it's a simple text file 
86 86
 feel free to open it with your favorite text editor and do any
87 87
 changes you like. 
88
-.PP
89
-\fIConfig file related options.\fR
88
+.TP
89
+\fB\-h\fR, \fB\-\-help\fR
90
+show this help message and exit
90 91
 .TP
91 92
 \fB\-\-configure\fR
92
-Invoke interactive (re)configuration tool. Don't worry, you won't 
93
-lose your settings on subsequent runs.
93
+Invoke interactive (re)configuration tool.
94 94
 .TP
95 95
 \fB\-c\fR FILE, \fB\-\-config\fR=FILE
96
-Config file name. Defaults to $HOME/.s3cfg
96
+Config file name. Defaults to /home/mludvig/.s3cfg
97 97
 .TP
98 98
 \fB\-\-dump\-config\fR
99 99
 Dump current configuration after parsing config files
100 100
 and command line options and exit.
101
-.PP
102
-\fIOptions specific for \fIfile transfer commands\fR (\fBsync\fR, \fBput\fR and \fBget\fR):
103 101
 .TP
104 102
 \fB\-n\fR, \fB\-\-dry\-run\fR
105
-Only show what should be uploaded or downloaded but don't actually do it. May still perform S3 requests to get bucket listings and other in
106
-formation though.
103
+Only show what should be uploaded or downloaded but
104
+don't actually do it. May still perform S3 requests to
105
+get bucket listings and other information though (only
106
+for file transfer commands)
107
+.TP
108
+\fB\-e\fR, \fB\-\-encrypt\fR
109
+Encrypt files before uploading to S3.
110
+.TP
111
+\fB\-\-no\-encrypt\fR
112
+Don't encrypt files.
113
+.TP
114
+\fB\-f\fR, \fB\-\-force\fR
115
+Force overwrite and other dangerous operations.
116
+.TP
117
+\fB\-\-continue\fR
118
+Continue getting a partially downloaded file (only for
119
+[get] command).
120
+.TP
121
+\fB\-\-skip\-existing\fR
122
+Skip over files that exist at the destination (only
123
+for [get] and [sync] commands).
124
+.TP
125
+\fB\-r\fR, \fB\-\-recursive\fR
126
+Recursive upload, download or removal.
127
+.TP
128
+\fB\-P\fR, \fB\-\-acl\-public\fR
129
+Store objects with ACL allowing read for anyone.
130
+.TP
131
+\fB\-\-acl\-private\fR
132
+Store objects with default ACL allowing access for you
133
+only.
134
+.TP
135
+\fB\-\-acl\-grant\fR=PERMISSION:EMAIL or USER_CANONICAL_ID
136
+Grant stated permission to a given amazon user.
137
+Permission is one of: read, write, read_acp,
138
+write_acp, full_control, all
139
+.TP
140
+\fB\-\-acl\-revoke\fR=PERMISSION:USER_CANONICAL_ID
141
+Revoke stated permission for a given amazon user.
142
+Permission is one of: read, write, read_acp, wr
143
+ite_acp, full_control, all
107 144
 .TP
108 145
 \fB\-\-delete\-removed\fR
109
-Delete remote objects with no corresponding local file when \fIsync\fRing \fBto\fR S3 or delete local files with no corresponding object in S3 when \fIsync\fRing \fBfrom\fR S3.
146
+Delete remote objects with no corresponding local file
147
+[sync]
110 148
 .TP
111 149
 \fB\-\-no\-delete\-removed\fR
112
-Don't delete remote objects. Default for \fIsync\fR command.
150
+Don't delete remote objects.
113 151
 .TP
114 152
 \fB\-p\fR, \fB\-\-preserve\fR
115
-Preserve filesystem attributes (mode, ownership, timestamps). Default for \fIsync\fR command.
153
+Preserve filesystem attributes (mode, ownership,
154
+timestamps). Default for [sync] command.
116 155
 .TP
117 156
 \fB\-\-no\-preserve\fR
118
-Don't store filesystem attributes with uploaded files.
157
+Don't store FS attributes
119 158
 .TP
120
-\fB\-\-exclude GLOB\fR
121
-Exclude files matching GLOB (a.k.a. shell-style wildcard) from \fIsync\fI. See FILE TRANSFERS section and \fIhttp://s3tools.org/s3cmd-sync\fR for more information.
159
+\fB\-\-exclude\fR=GLOB
160
+Filenames and paths matching GLOB will be excluded
161
+from sync
122 162
 .TP
123
-\fB\-\-exclude\-from FILE\fR
124
-Same as \-\-exclude but reads GLOBs from the given FILE instead of expecting them on the command line.
163
+\fB\-\-exclude\-from\fR=FILE
164
+Read --exclude GLOBs from FILE
125 165
 .TP
126
-\fB\-\-rexclude REGEXP\fR
127
-Same as \-\-exclude but works with REGEXPs (Regular expressions).
166
+\fB\-\-rexclude\fR=REGEXP
167
+Filenames and paths matching REGEXP (regular
168
+expression) will be excluded from sync
128 169
 .TP
129
-\fB\-\-rexclude\-from FILE\fR
130
-Same as \-\-exclude\-from but works with REGEXPs.
170
+\fB\-\-rexclude\-from\fR=FILE
171
+Read --rexclude REGEXPs from FILE
131 172
 .TP
132
-\fB\-\-include=GLOB\fR, \fB\-\-include\-from=FILE\fR, \fB\-\-rinclude=REGEXP\fR, \fB\-\-rinclude\-from=FILE\fR
133
-Filenames and paths matching GLOB or REGEXP will be included even if previously excluded by one of \-\-(r)exclude(\-from) patterns
173
+\fB\-\-include\fR=GLOB
174
+Filenames and paths matching GLOB will be included
175
+even if previously excluded by one of
134 176
 .TP
135
-\fB\-\-continue\fR
136
-Continue getting a partially downloaded file (only for \fIget\fR command). This comes handy once download of a large file, say an ISO image, from a S3 bucket fails and a partially downloaded file is left on the disk. Unfortunately \fIput\fR command doesn't support restarting of failed upload due to Amazon S3 limitations.
177
+\fB\-\-(r)exclude(\-from)\fR patterns
137 178
 .TP
138
-\fB\-\-skip\-existing\fR
139
-Skip over files that exist at the destination (only for \fIget\fR and \fIsync\fR commands).
179
+\fB\-\-include\-from\fR=FILE
180
+Read --include GLOBs from FILE
140 181
 .TP
141
-\fB\-\-follow\-symlinks\fR
142
-Treat local symbolic links as if they are regular files,
143
-copying their targets to the remote. (Only for \fIput\fR and \fIsync\fR commands).
182
+\fB\-\-rinclude\fR=REGEXP
183
+Same as --include but uses REGEXP (regular expression)
184
+instead of GLOB
144 185
 .TP
145
-\fB\-m\fR MIME/TYPE, \fB\-\-mime\-type\fR=MIME/TYPE
146
-Default MIME\-type to be set for objects stored.
186
+\fB\-\-rinclude\-from\fR=FILE
187
+Read --rinclude REGEXPs from FILE
147 188
 .TP
148
-\fB\-M\fR, \fB\-\-guess\-mime\-type\fR
149
-Guess MIME\(hytype of files by their extension. Falls
150
-back to default MIME\(hyType as specified by \fB\-\-mime\-type\fR
151
-option
189
+\fB\-\-bucket\-location\fR=BUCKET_LOCATION
190
+Datacentre to create bucket in. As of now the
191
+datacenters are: US (default), EU, us-west-1, and ap-
192
+southeast-1
152 193
 .TP
153
-\fB\-\-add\-header=NAME:VALUE\fR
154
-Add a given HTTP header to the upload request. Can be used multiple times with different header names. For instance set 'Expires' or 'Cache-Control' headers (or both) using this options if you like.
194
+\fB\-\-reduced\-redundancy\fR, \fB\-\-rr\fR
195
+Store object with 'Reduced redundancy'. Lower per-GB
196
+price. [put, cp, mv]
155 197
 .TP
156
-\fB\-P\fR, \fB\-\-acl\-public\fR
157
-Store objects with permissions allowing read for anyone. See \fIhttp://s3tools.org/s3cmd-public\fR for details and hints for storing publicly accessible files.
198
+\fB\-\-access\-logging\-target\-prefix\fR=LOG_TARGET_PREFIX
199
+Target prefix for access logs (S3 URI) (for [cfmodify]
200
+and [accesslog] commands)
158 201
 .TP
159
-\fB\-\-acl\-private\fR
160
-Store objects with default ACL allowing access for you only.
202
+\fB\-\-no\-access\-logging\fR
203
+Disable access logging (for [cfmodify] and [accesslog]
204
+commands)
161 205
 .TP
162
-\fB\-e\fR, \fB\-\-encrypt\fR
163
-Use GPG encryption to protect stored objects from unauthorized access. See \fIhttp://s3tools.org/s3cmd-public\fR for details about encryption.
206
+\fB\-m\fR MIME/TYPE, \fB\-\-mime\-type\fR=MIME/TYPE
207
+Default MIME-type to be set for objects stored.
164 208
 .TP
165
-\fB\-\-no\-encrypt\fR
166
-Don't encrypt files.
167
-.PP
168
-\fIOptions for CloudFront commands\fR:
169
-.PP
170
-See \fIhttp://s3tools.org/s3cmd-cloudfront\fR for more details.
209
+\fB\-M\fR, \fB\-\-guess\-mime\-type\fR
210
+Guess MIME-type of files by their extension. Falls
211
+back to default MIME-Type as specified by --mime-type
212
+option
171 213
 .TP
172
-\fB\-\-enable\fR
173
-Enable given CloudFront distribution (only for \fIcfmodify\fR command)
214
+\fB\-\-add\-header\fR=NAME:VALUE
215
+Add a given HTTP header to the upload request. Can be
216
+used multiple times. For instance set 'Expires' or
217
+'Cache-Control' headers (or both) using this options
218
+if you like.
174 219
 .TP
175
-\fB\-\-disable\fR
176
-Enable given CloudFront distribution (only for \fIcfmodify\fR command)
220
+\fB\-\-encoding\fR=ENCODING
221
+Override autodetected terminal and filesystem encoding
222
+(character set). Autodetected: UTF-8
177 223
 .TP
178
-\fB\-\-cf\-add\-cname=CNAME\fR
179
-Add given CNAME to a CloudFront distribution (only for \fIcfcreate\fR and \fIcfmodify\fR commands)
224
+\fB\-\-verbatim\fR
225
+Use the S3 name as given on the command line. No pre-
226
+processing, encoding, etc. Use with caution!
180 227
 .TP
181
-\fB\-\-cf\-remove\-cname=CNAME\fR
182
-Remove given CNAME from a CloudFront distribution (only for \fIcfmodify\fR command)
228
+\fB\-\-list\-md5\fR
229
+Include MD5 sums in bucket listings (only for 'ls'
230
+command).
183 231
 .TP
184
-\fB\-\-cf\-comment=COMMENT\fR
185
-Set COMMENT for a given CloudFront distribution (only for \fIcfcreate\fR and \fIcfmodify\fR commands)
186
-.PP
187
-\fIOptions common for all commands\fR (where it makes sense indeed):
232
+\fB\-H\fR, \fB\-\-human\-readable\-sizes\fR
233
+Print sizes in human readable form (eg 1kB instead of
234
+1234).
188 235
 .TP
189
-\fB\-r\fR, \fB\-\-recursive\fR
190
-Recursive upload, download or removal. When used with \fIdel\fR it can
191
-remove all the files in a bucket.
236
+\fB\-\-progress\fR
237
+Display progress meter (default on TTY).
192 238
 .TP
193
-\fB\-f\fR, \fB\-\-force\fR
194
-Force overwrite and other dangerous operations. Can be used to remove 
195
-a non\-empty buckets with \fIs3cmd rb \-\-force s3://bkt\fR
239
+\fB\-\-no\-progress\fR
240
+Don't display progress meter (default on non-TTY).
196 241
 .TP
197
-\fB\-\-bucket\-location\fR=BUCKET_LOCATION
198
-Specify datacentre where to create the bucket. Possible values are \fIUS\fR (default) or \fIEU\fR.
242
+\fB\-\-enable\fR
243
+Enable given CloudFront distribution (only for
244
+[cfmodify] command)
199 245
 .TP
200
-\fB\-H\fR, \fB\-\-human\-readable\-sizes\fR
201
-Print sizes in human readable form.
246
+\fB\-\-disable\fR
247
+Enable given CloudFront distribution (only for
248
+[cfmodify] command)
202 249
 .TP
203
-\fB\-\-list\-md5\fR
204
-Include MD5 sums in bucket listings (only for \fIls\fR command).
250
+\fB\-\-cf\-add\-cname\fR=CNAME
251
+Add given CNAME to a CloudFront distribution (only for
252
+[cfcreate] and [cfmodify] commands)
205 253
 .TP
206
-\fB\-\-progress\fR, \fB\-\-no\-progress\fR
207
-Display or don't display progress meter. When running on TTY (e.g. console or xterm) the default is to display progress meter. If not on TTY (e.g. output is redirected somewhere or running from cron) the default is to not display progress meter.
254
+\fB\-\-cf\-remove\-cname\fR=CNAME
255
+Remove given CNAME from a CloudFront distribution
256
+(only for [cfmodify] command)
208 257
 .TP
209
-\fB\-\-encoding=ENCODING\fR
210
-Override autodetected terminal and filesystem encoding (character set).
258
+\fB\-\-cf\-comment\fR=COMMENT
259
+Set COMMENT for a given CloudFront distribution (only
260
+for [cfcreate] and [cfmodify] commands)
261
+.TP
262
+\fB\-\-cf\-default\-root\-object\fR=DEFAULT_ROOT_OBJECT
263
+Set the default root object to return when no object
264
+is specified in the URL. Use a relative path, i.e.
265
+default/index.html instead of /default/index.html or
266
+s3://bucket/default/index.html (only for [cfcreate]
267
+and [cfmodify] commands)
211 268
 .TP
212 269
 \fB\-v\fR, \fB\-\-verbose\fR
213 270
 Enable verbose output.
... ...
@@ -215,15 +281,14 @@ Enable verbose output.
215 215
 \fB\-d\fR, \fB\-\-debug\fR
216 216
 Enable debug output.
217 217
 .TP
218
-\fB\-h\fR, \fB\-\-help\fR
219
-Show the help message and exit
220
-.TP
221 218
 \fB\-\-version\fR
222
-Show
223
-.B s3cmd
224
-version and exit.
219
+Show s3cmd version (1.0.0-rc1) and exit.
220
+.TP
221
+\fB\-F\fR, \fB\-\-follow\-symlinks\fR
222
+Follow symbolic links as if they are regular files
223
+
225 224
 
226
-.SH FILE TRANSFERS
225
+.SH EXAMPLES
227 226
 One of the most powerful commands of \fIs3cmd\fR is \fBs3cmd sync\fR used for 
228 227
 synchronising complete directory trees to or from remote S3 storage. To some extent 
229 228
 \fBs3cmd put\fR and \fBs3cmd get\fR share a similar behaviour with \fBsync\fR.
... ...
@@ -308,7 +373,7 @@ For more info about usage, examples and other related info visit project homepag
308 308
 .B http://s3tools.org
309 309
 
310 310
 .SH AUTHOR
311
-Written by Michal Ludvig <michal@logix.cz>
311
+Written by Michal Ludvig <mludvig@logix.net.nz>
312 312
 .SH CONTACT, SUPPORT
313 313
 Prefered way to get support is our mailing list:
314 314
 .I s3tools\-general@lists.sourceforge.net
... ...
@@ -316,7 +381,7 @@ Prefered way to get support is our mailing list:
316 316
 Report bugs to 
317 317
 .I s3tools\-bugs@lists.sourceforge.net
318 318
 .SH COPYRIGHT
319
-Copyright \(co 2007,2008,2009 Michal Ludvig <http://www.logix.cz/michal>
319
+Copyright \(co 2007,2008,2009,2010 Michal Ludvig <http://www.logix.cz/michal>
320 320
 .br
321 321
 This is free software.  You may redistribute copies of it under the terms of
322 322
 the GNU General Public License version 2 <http://www.gnu.org/licenses/gpl.html>.
... ...
@@ -33,6 +33,14 @@ try:
33 33
 except:
34 34
 	pass
35 35
 
36
+## Re-create the manpage
37
+## (Beware! Perl script on the loose!!)
38
+if sys.argv[1] == "sdist":
39
+	if os.stat_result(os.stat("s3cmd.1")).st_mtime < os.stat_result(os.stat("s3cmd")).st_mtime:
40
+		sys.stderr.write("Re-create man page first!\n")
41
+		sys.stderr.write("Run: ./s3cmd --help | ./format-manpage.pl > s3cmd.1\n")
42
+		sys.exit(1)
43
+
36 44
 ## Don't install manpages and docs when $S3CMD_PACKAGING is set
37 45
 ## This was a requirement of Debian package maintainer. 
38 46
 if not os.getenv("S3CMD_PACKAGING"):