def handle(self, batch_list_filename, *args, **options): if len(args)!=0: raise CommandError('Usage is process_coordinates %s' % self.args) loader = batch_loader.BatchLoader() batch_list = file(batch_list_filename) _logger.info("batch_list_filename: %s" % batch_list_filename) for line in batch_list: batch_name = line.strip() _logger.info("batch_name: %s" % batch_name) parts = batch_name.split("_") if len(parts)==4: loader.process_coordinates(batch_name, strict=False) else: _logger.warning("invalid batch name '%s'" % batch_name)
def handle(self, batch_list_filename, *args, **options): if len(args)!=0: raise CommandError('Usage is load_batch %s' % self.args) loader = batch_loader.BatchLoader( process_ocr=options['process_ocr'], process_coordinates=options['process_coordinates']) batch_list = open(batch_list_filename) _logger.info("batch_list_filename: %s" % batch_list_filename) for line in batch_list: batch_name = line.strip() _logger.info("batch_name: %s" % batch_name) parts = batch_name.split("_") if len(parts)==4 and parts[0]=="batch": loader.load_batch(batch_name, strict=False) else: _logger.warning("invalid batch name '%s'" % batch_name)