moul :: file :: chatlog :: ChatlogMover :: Class ChatlogMover
[hide private]
[frames] | no frames]

Class ChatlogMover



object --+
         |
        ChatlogMover



Instance Methods [hide private]
  __init__(self, srcdir, destdir)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  findLogs(self)
Find log files in self._path
  _findCreated(self, fpath)
Parse chatlog to find "started" date
  _makeFilename(self, created, stopped)
Build a filename from created and stopped information
  moveChatlog(self, details)
Move a chatlogs from old to new location
  moveChatlogs(self)
Move all chatlogs
  __len__(self)
len() suppor
  __iter__(self)
Iterate over the files to move

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
  _pat = 'chat*.log'
  _filename = 'chatlog_%(sY)02i%(sM)02i%(sD)02i_%(ch)02i%(cm)02i_%...

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, srcdir, destdir)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

findLogs(self)

 

Find log files in self._path

Also calls and stores _findCreated(), modtime() and _makeFile() for the file.

_findCreated(self, fpath)

 
Parse chatlog to find "started" date

_makeFilename(self, created, stopped)

 
Build a filename from created and stopped information

moveChatlog(self, details)

 
Move a chatlogs from old to new location

moveChatlogs(self)

 
Move all chatlogs

__len__(self)
(Length operator)

 
len() suppor

__iter__(self)

 

Iterate over the files to move

Calls moveChatlog() for each element. This method is used to update a progress bar in the UI.

Class Variable Details [hide private]

_pat

None
Value:
'chat*.log'                                                            
      

_filename

None
Value:
'chatlog_%(sY)02i%(sM)02i%(sD)02i_%(ch)02i%(cm)02i_%(sh)02i%(sm)02i.tx
t'