[Dirssync-opendisc] Improvements update
Status: Pre-Alpha
Brought to you by:
vincent_delft
|
From: Mark C. <xs...@uk...> - 2003-12-04 13:04:03
|
CVS comment: Refactored to make it scriptable
I have finished the improvements to dirssync, and will make them available to Vincent shortly in a separate email.
I have included a test script called dstest.py [Vincent: can you add it to CVS in the same directory as dirssync.py] - which automates some testing of dirssync. To run it, simply go to the command line and type
python dstest.py
It should report that it ran 4 tests, and that they were OK (Actually, one of the tests needs tweaking by me - but it's no biggy). Before further changes are made to the repository, dstest.py should be run to ensure that nothing has been broken. You are encouraged to add tests as time goes on - that way we can ensure that there are no regression errors.
dirssync is now scriptable from python. If you run pydoc on dirssync, you will find that useful comments have been added to module documentation (I hope you all know what I mean when I refer to the 'module docs'). Just in case you haven't, I've reproduced the main module documentation:
----------------------------------------------------------------------
USING THE GUI
By default, Dirssync starts as a GUI application. So at the command line,
simply typing:
dirssync.py
or maybe:
python dirssync.py
should be enough to start the application.
---
USING DIRSSYNC FROM PYTHON
Dirssync can also be used without a GUI - making it extensible(!). Here's an
example simple session, which you can type straight in to python, or store as a script:
import dirssync
from dirssync import *
listdirs = {}
listdirs[0] = ('local', 'remote')
t = transfer()
actions = t.analyse(listdirs)
SyncList(actions, t.log)
You can synchronise more than one directory at a time by, for example,
replacing:
listdirs[0] = ('local', 'remote')
with something like:
listdirs[0] = ('local1', 'remote1')
listdirs[1] = ('local2', 'remote2')
... etc.
---
WINDOWS ISSUES
Microsoft Windows XP and 2000 cause the following problems when files are
transferred to a non-NTFS file system:
* the modification times are incremented by 1 second
* older Windows versions mess up the capitalisation of the files
This confounds dirssync, which relies on both information to determine which
files to transfer. It is recommended that only NTFS file systems be used in
conjunction with Win XP and 2K.
----------------------------------------------------------------------
You can see that it contains a scripting example.
Enjoy!
_____________________________________________________________
Sign up for your very own email address from UKmail.com To-day !!
|