NAME
weex - fast WEb EXchanger non-interactive FTP client
SYNOPSIS
weex [ Options ] HOSTID [HOSTID...]
DESCRIPTION
weex is a utility designed to automate the task of
remotely maintaining a web page or other FTP archive. With
weex the maintainer of a web site or archive that must be
administered through FTP interaction can largely ignore
that process. The archive administrator simply creates a
local directory that serves as an exact model for the offsite
data. All modifications and direct interaction is
done locally to this directory structure. When the administrator
wishes to coordinate the data on the remote site
with that of the local model directory, simply executing
weex accomplishes this in the most bandwidth-efficient
fashion by only transferring files that need updating. The
program will create or remove (!) files or directories as
necessary to accurately establish the local model on the
remote server.
The mandatory HOSTID argument is the user-defined name
that represents a particular FTP account or configuration
specified in the ~/.weexrc file. This file, the contents
of which are described below, can alternatively be named
~/.weex/weexrc. Multiple HOSTID arguments to a single
weex command are supported to affect multiple archives or
configurations in immediate succession. In addition, the
actual HOSTID can be substituted with the number
representing its relative sequential position in the ~/.weexrc
file (the first HOSTID definition is 1, and so on).
OPTIONS
Options at the command line take precedence over any specified
in the configuration file.
- -f, --force
-
If the caching mechanism is inhibiting the uploading
of files that should be transferred, this
option will force the actual transfer to always
occur.
- -h, --help
-
Outputs a usage summary to stdout.
based on the operation being performed. This option
suppresses that.
- -s, --silent
-
The default mode outputs a helpful status message
for each action taken, including file transfer
progress meters. This mode suppresses output.
- -V, --version
-
Prints the version of the weex program.
CONFIGURATION FILE
Because this program is meant to be non-interactive, a
properly set up configuration file is essential. weex
looks for this file either in ~/.weexrc or ~/.weex/weexrc.
The general format of the configuration file is a bracketed
section heading followed by parameters that define
that section's configuration. This section name is what is
provided to weex at run time to indicate the FTP arrangement
you wish to update. A parameter is only valid for the
most recent section heading that preceeded it. The exception
to this is the [default] section which creates settings
for unspecified parameters in every section. In the
case of parameters that accept multiple values, the
default section augments any specifically designated values.
Lines that begin with the "#" character are safely ignored
as comments. Neither section names nor parameter variables
are case sensitive in any way. Section names can not
begin with numbers. Some parameters can be assigned multiple
values. Where this is not possible, the last value is
used. To quote special characters, use single quotes (')
or double quotes ("). To quote a particular quote symbol,
use the other quote. The general syntax format for the
configuration file is:
[hostid1]
Parameter1 = Value
# Frist method for multiple values
Parameter2 = Value
Parameter2 = Value
...
[hostid2]
Parameter1 = Value
# Second method for multiple values
Parameter2 = {
}
...
[default]
Parameter = Value
...
PARAMETER LIST
These parameters are used to define the properties of a
particular host configuration named in brackets. When
specifying directory names, the trailing "/" is optional.
Also, both files and directories can be specified with
either shell wildcards or POSIX extended regular expressions.
When specifying binary states, you may use any of
the following: True/False, Yes/No, T/F, 1/0. None are case
sensitive.
- AsciiFile
-
Filename patterns that will be transferred using
ASCII mode. The default mode for files not specified
in this way is IMAGE(BINARY) mode.
- ChangePermission
-
The access permissions of the files in the directories
specified with ChangePermissionDir are changed
to this parameter. The format is a three digit
octal number.
- ChangePermissionDir
-
Files in directories assigned to this parameter
will have their access permissions changed after
sending.
- ConvToLower
-
If set to true, the filenames are converted to
lower case before sending. This feature allows
interaction with FTP servers that do not support
case sensitive filenames. If a naming conflict
arises due to a lower case name already existing,
an error occurs. Furthermore, the cache is totally
unaware of original uppercase filenames.
- DestDir
-
Destination directory on the remote FTP server
where the mirrored information will be sent. This
setting corresponds to the "pwd" command on tradi-
tional FTP clients.
- Force
- If the caching mechanism is inhibiting the uploading
of files that should be transferred, this
option will force the actual transfer to always
occur if set to true.
- HostName
-
Hostname to connect to. The "ftp://" protocol specifier
is implied and shouldn't be used. An IP
address is also valid and may save lookup time.
- IgnoreLocalDir
-
This parameter contains one or more protected local
directories that are completely ignored during the
transfer process. This is useful if you want to
have subdirectories that are part of a project but
don't need to be in the final, online version
(i.e., old versions).
- IgnoreLocalFile
-
This parameter contains one or more protected local
file specifiers that will be completely ignored
during the transfer process. If a file or file pattern
is given without a path, it is assumed to be
protected when encountered in any directory. An
explicitly specified path/file combination only
protects files in that directory.
- IgnoreRemoteDir
-
This parameter contains one or more protected
remote directories that are completely ignored during
the transfer process. This is useful if you
want to have other material on the remote FTP site
that is not related to the specific project that
weex is dealing with. This could include, for example
, data administered through a different FTP
client or process.
- IgnoreRemoteFile
-
This parameter contains one or more protected
remote file specifiers that will be completely
ignored during the transfer process. If a file or
file pattern is given without a path, it is assumed
to be protected when encountered in any directory.
An explicitly specified path/file combination only
protects files in that directory.
- Monochrome
-
The default mode generates a helpful color coding
based on the operation being performed. A true setting
suppresses that.
- NestSpaces
-
An integer that controls the indent spacing of the
output. The default is 4.
- OverwriteImpossible
-
If the FTP server has trouble overwriting files,
set this parameter to true.
- Password
-
Plaintext password granting access to the account.
Note that this file uses no special facilities to
safeguard passwords. Make sure that the file permissions
of a configuration file containing passwords
are set conservatively. If they are not, a
warning will be issued at execution.
- Silent
- The default mode outputs a helpful status message
for each action taken, including file transfer
progress meters. A true setting suppresses output.
- SrcDir
- Top of the source directory tree containing the
local copy of the information to be mirrored. This
setting corresponds to the "lcd" command on traditional
FTP clients.
EXAMPLES
Here is an example of what a typical .weexrc file might
look like:
#-=-=-=-=-=Sample Configuration file=-=-=-=-=-
# My favorite FTP account...
[Ninja]
HostName = ftp.ninja-rights.org
LoginName = chrisxed
Password = '"mYsEcReT!"'
SrcDir = /home/chrisxed/project/weex
DestDir = /
ASCIIfile = *.c
IgnoreLocalFile = notes2myself.txt
IgnoreRemoteDir = /offsitearchive/
# Another FTP account...
[Veggie]
HostName = ftp.vegetable-advocacy.com
LoginNAME = waxedbean
Password = "X'sBean"
SrcDir = /home/chrisxed/project/legumes
DestDir = /souppot/
# Global configuration settings
[default]
AsciiFile = {
*.htm
*.html
*.txt
*.asc
}
IgnoreLocalFile = {
.bak
.tmp
.swp
}
With a configuration like this, executing:
$ weex Ninja
would cause the file system assigned to SrcDir to be completely
mirrored on the remote server. Executing:
$ weex ninja veggie
would cause the FTP update to occur for the "Ninja" configuration
and then for the "Veggie" configuration. This
could also be specified like this:
$ weex 1 2
NOTES
Timestamp Cache Facility
weex implements a cache of file timestamps. This makes
updating much faster when you have a lot of files. If,
however, you administer the remote files with another FTP
client, the cache file will (most likely) not be correct.
The simple solution to this problem is to remove the cache
file completely, forcing weex to formulate a new, correct
one the next time it runs. This cache file is located in
~/.weex/weex.cache.HOSTID.
Tested Operating Systems
Debian GNU/Linux 2.1
Red Hat Linux 5.1
AUTHOR
This very handy program was written by:
Yuuki NINOMIYA
<gm@smn.enjoy.ne.jp>
The original man page was written by:
Chris X Edwards
<chrisxed@usa.net>
The copyright of this software and documentation belongs
to Yuuki NINOMIYA. It is released under the terms of the
GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any
later version. You can redistribute it and/or modify it
under the GPL.
This software uses shhopt for parsing command line
options. Shhopt is released under the Artistic License.
You may use it separately under the Artistic License.
YN-cxe ~ 1999.11.02