Example #1
0
 def __init__(self, gateway, wrkdate):
     if getgatelist()[gateway]:
         self.gate = getgatelist()[gateway]
         self.gatename = gateway
         self.date = wrkdate
         self.rcmdout = None
     else:
         raise Exception('wrong names.Dates object')
     msg = 'current gate: %s' %(gateway)
     message(msg)
     message('.' * len(msg))
Example #2
0
def main():
    '''the main'''
    message('main called')

    args = arg_parser()
    wrkday = parse_wrkday(args)

    if wrkday:
        for gate in getgatelist().keys():
            gtn = Names(gate, wrkday)

            if not args.nonet:

                if wrkday.date() == Dates(date.today()).date():
                    message('this is today, say cheese', shout=True)
                    message(gtn.snapshot(), shout=True)
                    message(gtn.remotecommands(), shout=True)
                message('trying to load graph', shout=True)
                message(gtn.getsnapshot(), shout=True)

            message('writing article', shout=True)
            gtn.mkpost()

        message('feeding the pelican', shout=True)
        mkpelican()

        message('all done', shout=True)