created a main() function
created a main() function

added the folloing functions to make the main function tiduer

def set_datestamp():
	a = arrow.utcnow()
	date_stamp = str(a.datetime.year) + str(a.datetime.month).zfill(2) + str(a.datetime.day).zfill(2)
	return date_stamp

def set_xml_pdf_zip_name():
	date_stamp = set_datestamp()
	xml_pdf_zip = "elife_poa_" + date_stamp + ".zip"
	return xml_pdf_zip

def set_made_ftp_ready_dir():
	date_stamp = set_datestamp()
	made_ftp_ready = settings.MADE_FTP_READY
	made_ftp_ready_dir = made_ftp_ready + "/" + date_stamp
	if not os.path.exists(made_ftp_ready_dir):
		os.makedirs(made_ftp_ready_dir)
	return made_ftp_ready_dir

Added logging, both local and global, set logging to "INFO" during debug

gnott/elife-poa-xml-generation,gnott/elife-poa-xml-generation