import csv
import pdb


write_path = 'temp.html'

with open(write_path, 'w') as html_f:
    for project_type in ['custom', 'default']:
        read_path = '{}.tsv'.format(project_type)
        with open(read_path, 'r', encoding='utf-8-sig') as f:
            reader = csv.reader(f, delimiter='\t', quotechar=None) 
            for i, line in enumerate(reader):
                if i == 0:
                    continue
                html_f.write("<tr><td><a href=\"reports/{}/{}.pdf\">{}</a> </td><td>{}</td></tr>\n".format(project_type, line[2], line[1], line[0]))
        html_f.write('\n\n')

