Commit c548b2e3 authored by Luc Grosheintz's avatar Luc Grosheintz

Whitespace.

parent d92d607c
......@@ -350,7 +350,7 @@ def create_tex(dirname, original_files=[], template_dir="", verbose=False):
return texstr, allfiles
def main(dirname, ip, identifier, original_files=[], lecture_title='', template_dir='', verbose=True,
def main(dirname, ip, identifier, original_files=[], lecture_title='', template_dir='', verbose=True,
header = [ "fname", "ftype", "timestamp" ]):
"""
Keyword Arguments:
......@@ -380,10 +380,10 @@ def main(dirname, ip, identifier, original_files=[], lecture_title='', template_
my_header = my_header.replace('LECTURETITLE', lecture_title)
out = [r'\begin{table}[h!] \centering']
out.append(r'\renewcommand{\arraystretch}{1.2}')
# Create a header for type of file (given category identifier)
def get_category_string(category, header):
cat = {
cat = {
"unmodified" : "Unmodified",
"modified" : "Modified",
"duplicate" : "Modified (Duplicates)",
......@@ -392,8 +392,8 @@ def main(dirname, ip, identifier, original_files=[], lecture_title='', template_
ncols = len(header);
# Escape nightmare
return r'\hline\multicolumn{{{}}}{{|l|}}{{\textbf{{{}}}}}\\\hline'.format(ncols, cat[category])
def get_formatted_string(item, head):
"""
Given column name, return appropriated formatted text.
......@@ -406,7 +406,7 @@ def main(dirname, ip, identifier, original_files=[], lecture_title='', template_
return str(item['timestamp'])
elif head == "md5":
return r'\verb`{' + item['md5s'] + r'}`'
# Given item, returns row of table representing item
def get_formatted_item_string(item, header):
template_str = ''
......@@ -417,7 +417,7 @@ def main(dirname, ip, identifier, original_files=[], lecture_title='', template_
else:
template_str += "&"
return template_str
ncols = len(header);
out.append(r'\begin{tabular}{' + '|l'*ncols + '|}')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment