import configmanager import datetime import logging import MySQLdb import os import string import time configuration_values = configmanager.readconfig() destination_directory = configuration_values['follett_destination_directory'] file_name_base = 'follett_' building_codes = [['100', 'Model Media Center'], ['200', 'Redner Elem. Media Center'], ['300', 'Brick Media Center'], ['400', 'Lincoln Middle School Library'], ['500', 'Lincoln High Sch. Media Center'], ['600', 'Bishop Media Center'], ['700', 'Childs Elementary School']] class Patron: """Class to store patron data in a list""" def __init__(self, Barcode, AlternateID, LastName, FirstName, MiddleName, CardExpirationDate, GradYear, BirthDate, Gender, Type, Status, Location1, Location2, UserField1, UserField2, AddressLine1, AddressLine2, City, State, Zip, Address1Email, Address1Phone1, Address1Phone2): self.Barcode = Barcode self.AlternateID = AlternateID
import configmanager import datetime import MySQLdb import os import smtplib import string settings = configmanager.readconfig() db_user = settings['db_user'] db_passwd = settings['db_passwd'] db_db = settings['db_db'] destination_directory = r'/home/scott/etl' update_file_name = 'erc_update.sql' path_to_update_file = os.path.join(destination_directory, update_file_name) today = datetime.date.today() dateStamp = today.strftime("%A, %B %d %Y") # establish connection to be used throughout this script db = MySQLdb.connect(user=db_user, passwd=db_passwd, db=db_db) log_string = 'db set to {0}'.format(db) print log_string marking_periods = [ ['mp1', '2011-09-06', '2012-01-20'], ['mp2', '2012-01-21', '2012-03-30'], ['mp3', '2012-04-01', '2012-06-06'], #['mp4','2012-06-30','2012-07-30'], ['kmp1', '2011-09-06', '2012-01-20'], ['kmp2', '2012-01-21', '2012-03-30'],
import configmanager import datetime import MySQLdb import os import smtplib import string settings = configmanager.readconfig() db_user = settings['db_user'] db_passwd = settings['db_passwd'] db_db = settings ['db_db'] destination_directory = r'/home/scott/etl' update_file_name = 'erc_update.sql' path_to_update_file = os.path.join(destination_directory,update_file_name) today = datetime.date.today() dateStamp = today.strftime("%A, %B %d %Y") # establish connection to be used throughout this script db=MySQLdb.connect(user=db_user,passwd=db_passwd,db=db_db) log_string = 'db set to {0}'.format(db) print log_string marking_periods = [ ['mp1', '2011-09-06', '2012-01-20'], ['mp2','2012-01-21','2012-03-30'], ['mp3','2012-04-01','2012-06-06'], #['mp4','2012-06-30','2012-07-30'],
import configmanager import datetime import logging import MySQLdb import os import string import time configuration_values = configmanager.readconfig() destination_directory = configuration_values['follett_destination_directory'] file_name_base = 'follett_' building_codes = [ ['100','Model Media Center'], ['200','Redner Elem. Media Center'], ['300','Brick Media Center'], ['400','Lincoln Middle School Library'], ['500','Lincoln High Sch. Media Center'], ['600','Bishop Media Center'], ['700','Childs Elementary School'] ] class Patron: """Class to store patron data in a list""" def __init__(self, Barcode, AlternateID, LastName, FirstName, MiddleName, CardExpirationDate, GradYear, BirthDate, Gender, Type, Status, Location1, Location2, UserField1, UserField2, AddressLine1, AddressLine2, City, State, Zip, Address1Email, Address1Phone1, Address1Phone2): self.Barcode = Barcode self.AlternateID = AlternateID self.LastName = LastName self.FirstName = FirstName