put-homepages

put-homepages is a short Perl script for automatically updating fines on a remote FTP server to match a local archive. In its current incarntion it's designed for Demon Internet users maintaining the Web pages served under Demon's "homepages" service, but it could probably be turned to some more general tasks.

In its current form, it is not suitable for use by people who want a packaged-and-ready solution; don't download it unless you hack Perl, since you'll almost certainly find yourself hacking the source to make it do what you want. However, if you do hack Perl, you might find it very useful for maintaining your Web pages just as I do, and if you submit your improvements to me we can make it more generally useful. I plan to release it under the GPL, but if you need a more liberal license let me know, I'm pretty likely to be amenable.

Since writing this, I've been informed of two packages that do similar jobs, mirror and sitecopy. Mirror has an irritating, barely-OSD "patch" license; sitecopy is GPL. I didn't know about sitecopy when I started writing this, and it may turn out to be an all-round better solution. I can now use rsync to update my website anyway, so I don't use this any more.

Unsurprisingly, documentation is weak to nonexistant; if some of the source is incomprehensible then feel free to ask. Some facts about the script in random order:

I strongly recommend using the PRCS functionality of this script even if you use PRCS for nothing else; it's very simple to learn and does all the right things for this job. Here's how I currently use this script: I've created a user "homepgs" especially to manage it, and the configuration directory is simply "/home/homepgs". My dialout scripts include the equivalent of "su -c /home/homepgs/scripts/put-homepages homepgs", so every time I dial out, the homepgs user checks out the latest version of the home pages from PRCS, and if necessary updates the remote FTP site. I have a local copy of the pages in my home directory which I can edit freely, and I check it in when it's ready for release and simply wait for the next dialout from cron. Of course, PRCS is designed to handle multiple users working on the same archive with grace.

Remember: read and understand this script before you try and use it. But if you do, please let me know!