Esempio n. 1
0
def beauty(path, days,ignore_list):
	files = listdir(path)
	html_files = [page for page in files if page.find('.html') != -1]
	table_array = []
	final_table = []
	
	for i in range(len(html_files)):
		input_file = html_files[i]
		table_array += decode_html(path + input_file)

	for i in list(days):
		final_table += [i] + clean_stuff(table_array, 0, i, ignore_list)

	output_file = path + 'courses.csv'
	write_stuff(final_table, output_file)
	return final_table
Esempio n. 2
0
def write_schd_info(path, days,ignore_list):
	#find all html files in the current path
	files = listdir(path)
	html_files = [page for page in files if page.find('.html') != -1]

	table_array = []
	final_table = []
	
	#add as arrays all html files in current path
	for i in range(len(html_files)):
		input_file = html_files[i]
		table_array += decode_html(path + input_file)

	#clean this array, add the day [i] which we are saving
	for i in list(days):
		final_table += [i] + clean_stuff(table_array, 0, i, ignore_list)

	output_file = path + 'courses.csv'
	write_help(final_table, output_file)
	return final_table