コード例 #1
0
ファイル: downloadPayments.py プロジェクト: robertbetts/Kew
 def __init__(self, path, filename, props, start_date, working_path, replace_file=False, retry=3, 
              java_path="", lib_path="Lib",
              email_to="*****@*****.**", smtp_server="192.168.62.35:1025"):
     
     self.path = os.path.abspath(path)
     self.filename = filename
     self.date = datetime.datetime.now()
     self.flt_outfile =  os.path.abspath(get_archive_filename(self.path, filename, self.date, 'recon_extract'))
     #self.flt_outfile = os.path.abspath(get_unique_filename(os.path.join(self.path, filename)))
     
     lib_path = lib_path and lib_path or "Lib"
     
     if smtp_server:
         global _smtpServer
         _smtpServer = smtp_server
         
     if email_to:
         global _emailTo
         _emailTo = email_to.split(',')
             
     self.ios = DownloadPayments(props = props, 
                                 start_date = start_date, 
                                 output_file = self.flt_outfile, 
                                 working_path=working_path,
                                 replace_file=replace_file,
                                 retry=retry,
                                 java_path=java_path,
                                 lib_path=lib_path)
コード例 #2
0
ファイル: downloadIMSCash.py プロジェクト: robertbetts/Kew
 def __init__(self, path, filename, props, working_path, asofdate=None, replace_file=False, retry=3, 
              java_path="", lib_path="Lib",
              email_to="*****@*****.**", smtp_server="192.168.62.35:1025"):
     
     self.path = os.path.abspath(path)
     self.filename = filename
     
     datetoday = datetime.date.today()
     if asofdate is not None:
         if isinstance(asofdate, str) or isinstance(asofdate, unicode):
             asofdate = datetime.datetime.strptime(asofdate, '%Y%m%d').date()
     else:
         asofdate = datetime.date.today() + datetime.timedelta(days=-1)  
                             
     self.flt_outfile =  os.path.abspath(get_archive_filename(self.path, filename, datetoday, 'ims_extract'))
     
     lib_path = lib_path and lib_path or "Lib"
     
     if smtp_server:
         global _smtpServer
         _smtpServer = smtp_server
         
     if email_to:
         global _emailTo
         _emailTo = email_to.split(',')
             
     self.ios = DownloadIMSCash(props = props, 
                                 output_file = self.flt_outfile, 
                                 working_path=working_path,
                                 asofdate=asofdate,
                                 replace_file=replace_file,
                                 retry=retry,
                                 java_path=java_path,
                                 lib_path=lib_path)
コード例 #3
0
ファイル: downloadVAR.py プロジェクト: robertbetts/Kew
 def __init__(self, path, foldername, portfolio, vartype, filename, props, working_path, replace_file=False, retry=3, 
              java_path="", lib_path="Lib",
              email_to=_emailTo, 
              email_from=_emailFrom,
              smtp_server=_smtpServer):
     
     self.path = os.path.abspath(path)
     self.filename = filename
     self.date = datetime.datetime.now()
     self.flt_outfile =  os.path.abspath(get_archive_filename(self.path, filename, self.date, foldername))
     
     lib_path = lib_path and lib_path or "Lib"
     
     if smtp_server:
         global _smtpServer
         _smtpServer = smtp_server
         
     if email_to:
         global _emailTo
         _emailTo = email_to.split(',')
             
     if email_from:
         global _emailFrom
         _emailFrom = email_from.split(',')
         
     self.ios = DownloadVAR(portfolio=portfolio,
                            vartype=vartype,
                            props = props, 
                                 output_file = self.flt_outfile, 
                                 working_path=working_path,
                                 replace_file=replace_file,
                                 retry=retry,
                                 java_path=java_path,
                                 lib_path=lib_path)
コード例 #4
0
ファイル: dailyArchive.py プロジェクト: robertbetts/Kew
 def __init__(self, path, filename, props, working_path, asofdate=None, retry=1, java_path="C:\Program Files\Imagine Software\its\jre\bin",
              lib_path="C:\Program Files\Imagine Software\its\Lib", email_to="*****@*****.**", smtp_server="KC-LN-VS35-PROD1:1025"):
     
     self.path = os.path.abspath(path)
     
     datetoday = datetime.date.today()
     if asofdate and isinstance(asofdate, basestring):
         asofdate = datetime.datetime.strptime(asofdate, '%Y%m%d').date()
     else:
         asofdate = datetoday
         
     self.filename =  os.path.abspath(get_archive_filename(self.path, filename, datetoday, 'imagine_maintenance'))
             
     self.ios = DailyArchive(props = props,
                             working_path=working_path,
                             asofdate=asofdate,
                             java_path=java_path,
                             lib_path=lib_path)
     
     try:
         self.retry = int(retry)
     except:
         self.retry = 0
     self.smtp_server = smtp_server
     self.email_from = '*****@*****.**'
     self.email_to = email_to.split(',')
コード例 #5
0
ファイル: downloadPortfolio.py プロジェクト: robertbetts/Kew
 def __init__(self, filter, filtertype,
              path, filename, props, working_path, replace_file=False, retry=3, 
              java_path="", lib_path="Lib",
              email_to="", smtp_server="",
              
              asofdate=None):
     
     self.path = os.path.abspath(path)
     self.filename = filename
     if asofdate in (None, ''):
         self.date = datetime.datetime.now().date()
     else:
         if isinstance(asofdate, str):
             self.date = datetime.datetime.strptime(asofdate, '%Y%m%d').date()
         else:
             self.date = asofdate
     
     self.flt_outfile =  os.path.abspath(get_archive_filename(self.path, filename, self.date, 'imagine_extract'))
     self.filter =  filter
     self.filtertype = filtertype
     
     lib_path = lib_path and lib_path or "Lib"
     
     if smtp_server:
         global _smtpServer
         _smtpServer = smtp_server
         
     if email_to:
         global _emailTo
         _emailTo = email_to.split(',')
             
     self.ios = PrintPortfolio(asofdate=self.date,
                               filter = self.filter,
                               filtertype = self.filtertype,
                               props = props, 
                               output_file = self.flt_outfile, 
                               working_path=working_path,
                               replace_file=replace_file,
                               retry=retry,
                               java_path=java_path,
                               lib_path=lib_path)
コード例 #6
0
 def _get_local_file_name(self, rfilename):
     date = datetime.date.today()
     return os.path.abspath(get_archive_filename(self.lpath, rfilename, date=date, source=self.name))