Package helpers :: Module UpdateJpegs :: Class UpdateJpegs
[hide private]

Class UpdateJpegs

source code


Update JPEG names in the database given a file list.

Instance Methods [hide private]
 
__init__(self, archive=None, database='ramses1.WSA', userName='ldservro', fromJpegList=False, multiDBs=False, isTrialRun=False, updateFileName=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
run(self) source code
int:[(int,str)]
createMasterDict(self)
Create a master dict of compressed file info per multiframe IDs.
source code
list(str)
getAvailDBs(self)
Get all or selected DBs from given server list.
source code
dict(str:list(str)), list(str)
readFile(self)
Read databases and lists from a file.
source code
 
updateCompressedImageNames(self, archive, jpgList, updateFile)
Update quick-look compressed image filenames for given list.
source code

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

Static Methods [hide private]
dict(int:list(str))
getMultiframeIDs(archive, dateList)
Get a list of all MultiframeIDs, extension numbers and jpgnames from the given DB.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, archive=None, database='ramses1.WSA', userName='ldservro', fromJpegList=False, multiDBs=False, isTrialRun=False, updateFileName=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • database (str) - Name of the database to connect to.
  • fromJpegList (bool) - Input file lists multiframeIDs and JPG filenames.
  • isTrialRun (bool) - If True, do not perform database modifications.
  • multiDBs (str) - Update multiple DBs on 'dbload' or 'dbpub'.
  • updateFileName (str) - File containing a list of DBs and JPGlist files.
Overrides: object.__init__

createMasterDict(self)

source code 

Create a master dict of compressed file info per multiframe IDs.

Returns: int:[(int,str)]
Dictionary holding the extNum and jpg name tuple for each mfID.

getMultiframeIDs(archive, dateList)
Static Method

source code 

Get a list of all MultiframeIDs, extension numbers and jpgnames from the given DB.

Parameters:
  • archive (DbSession) - Connection to database to query.
Returns: dict(int:list(str))
Dictionary giving extNum,compFileName tuples for every MfID.

getAvailDBs(self)

source code 

Get all or selected DBs from given server list.

Returns: list(str)
List of full paths to databases on selected server.

readFile(self)

source code 

Read databases and lists from a file.

Returns: dict(str:list(str)), list(str)
Dictionary holding the db info and a list of files.

updateCompressedImageNames(self, archive, jpgList, updateFile)

source code 

Update quick-look compressed image filenames for given list. This is used to update the relevant column after quick-look (JPEG) images have been made.

Parameters:
  • archive (DbSession) - Connection to database to query.
  • jpgList (list) - List of modification data.
  • updateFile (File obj) - Write to this file for read only DBs.