I have created this little tool to synchronize my german translations from PyMOTW with my own homepage.
This command line tool is intended to upload only updated local files to your website.
Therefore it keeps a database file and remembers all the local files it has seen during
its last execution. The timestamp of the database file will be taken to compare the local
files timestamp with. Each file with a more current timestamp will be uploaded. Removed local
files will also be cleaned up on your ftp site.
The programm uses as default configuration file websync.cfg but of course you can pass any other name
for the configuration file with the param -c
Your configuration file must contain the following lines:
websync.cfg
[Settings] host = your.provider.net user = itsMe password = mySecretPasswortd local_dir = /home/ralf/web remote_dir = . #remote_dir = /public_html/test
You can get the following help by calling websync.py -h or websync.py --help:
Usage: websync.py [options] Options: -h, --help show this help message and exit -c CFG, --cfg=CFG Define an alternative configuration file -a, --all Upload all local files to the remote site
The param -a is really important if you want to upload your site the very first time. If you omit the param nothing will happen until you have updated a file.