NAME
website_upload.pl - upload a web site.
COPYRIGHT
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
DETAILS
MANIFEST: website_upload.pl
PROJECT: meta
VERSION: 0.10
SYNOPSIS
website_upload.pl [options]
DESCRIPTION
This script updates a web site from a list of files which need to be uploaded. The script uses the FTP protocol to achieve this. Since the tool is connected to the Source Management System it uses that information to derive which htmls or other files depend on the htmls that you want to transfer and trasfers them too. The benefit is that all you need to do is point this script to the root of the site. You can, ofcourse, not use this feature. Another features is that this script will only update files which are not up to date and remove files which no longer need to be at the remote site (by comparing what's on the remote site with the inventory list that he constructed on this side). Many options are supported.
Note: because of bugs in some ftp servers which do not calculate the avilable space correctly the default value for relog here is 1 and therefore the transfer will open a new ftp session for each file. This causes the remote server to recalc the available space. This causes some lag but gives the assurance that a single run of this script will do what it's supposed to do. When saner FTP server arrive on the scene this variable (and indeed the entire code which supports this behavior) should be removed.
OPTIONS
- help (type: bool, default: 0)
-
display help message
- pod (type: bool, default: 0)
-
display pod options snipplet
- man (type: bool, default: 0)
-
display manual page
- quit (type: bool, default: 0)
-
quit without doing anything
- gtk (type: bool, default: 0)
-
run a gtk ui to get the parameters
- license (type: bool, default: 0)
-
show license and exit
- copyright (type: bool, default: 0)
-
show copyright and exit
- history (type: bool, default: 0)
-
show history and exit
- debug (type: bool, default: 0)
-
debug the connection ?
- verbose (type: bool, default: 1)
-
should I be noisy ?
- doit (type: bool, default: 1)
-
should I really transfer the files ?
- mod (type: bool, default: 1)
-
should I only upload modified files ?
- upload (type: bool, default: 1)
-
should I upload files ?
- remove (type: bool, default: 1)
-
should I remove old files ?
- empty_dir (type: bool, default: 1)
-
should I remove empty directories ?
- mode (type: stri, default: binary)
-
what type of transfer should I use ?
- site_name (type: stri, default: )
-
name of site
- file (type: stri, default: html/temp/html/projects/Website/main.html)
-
file name to transfer
no free arguments are allowed
BUGS
None.
AUTHOR
Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER
HISTORY
0.00 MV some chess work
0.01 MV md5 project
0.02 MV database
0.03 MV perl module versions in files
0.04 MV thumbnail user interface
0.05 MV more thumbnail issues
0.06 MV website construction
0.07 MV improve the movie db xml
0.08 MV web site development
0.09 MV web site automation
0.10 MV SEE ALSO section fix
SEE ALSO
Meta::Baseline::Aegis(3), Meta::Baseline::Cook(3), Meta::Utils::File::Time(3), Meta::Utils::Hash(3), Meta::Utils::Net::Ftp(3), Meta::Utils::Opts::Opts(3), Meta::Utils::Output(3), Meta::Utils::System(3), Time::localtime(3), strict(3)
TODO
-remove old empty directories too.
-all the code here should go into some library.
-put all the site list getting code into a library for ftp.
-try to use the mdel command instead of the del command to remove all the junk files in one round.
-try to use the mput command instead of the put command to put all the files in one round.
-when updating new files which were not there working with file modification times does not do the job.
-work with a filesystem encapsulating object.