Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-07-27 10:21:41


The HTML files have been added to the CVS repository.

Most of the binary (.gif, .jpg, etc.) files have also been added.

My personal machine now automatically runs a daily script to download and
save a dated copy of boost-cvsroot.tar.gz from SourceForge. My machine
isn't left on all the time, so the script isn't run if I'm out-of-town or
take the week-end off.

If anyone is compulsive enough to want to run the script themselves, the
Python source code follows below. It is invoked like this (remove spurious
LF's inserted by email program):

pushd c:\boost\backup
python c:\boost\download_from_url.py
http://cvs.sourceforge.net/cvstarballs/boost-cvsroot.tar.gz
boost-cvsroot.tar.gz
popd

--Beman

# program to do a daily download of a file accessed by URL

# usage: arg 1 = URL to download
# arg 2 = target filename. Will automatically prefix the filename
# with current date (YYMMDD).
#
# The URL will not be downloaded if a file with the date-prefixed filename
# already exists in the current directory.

import urllib
import os
import sys
import time

if len(sys.argv)<3:
   print "Missing arguments; arg 1 = URL to download, arg 2 = target
filename. Will

automatically prefix the filename with current date (YYMMDD)"
   sys.exit(2)

filename=time.strftime("%y%m%d", time.localtime(time.time())) + sys.argv[2]

print

if os.access( filename, os.F_OK ):
   print "file", filename, "already exists; not downloaded"
else:
   print "downloading URL", sys.argv[1], "to file", filename
   urllib.urlretrieve(sys.argv[1], filename)

# end


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk