diff --git a/call.cgi b/call.cgi index e429e7c..e3956b3 100755 --- a/call.cgi +++ b/call.cgi @@ -15,7 +15,7 @@ logdir = "/var/log/httpd/" logdir="./" -datefmt = "%Y/%m/%d %H:%M" +datefmt = "%H:%M" form = cgi.FieldStorage() @@ -94,6 +94,7 @@ elif active and id_ == candidate[-1][4]: active = False candidate[-1][2] = date.strftime(datefmt) + candidate[-1][1] += "〜"+date.strftime(datefmt) lines.extend(candidate) if not "excel" in form: @@ -163,6 +164,8 @@ ws['C'+row].alignment = align; ws['D'+row].alignment = align ws['E'+row].alignment = align; ws['F'+row].alignment = align ws['G'+row].alignment = align # TODO need refactor: maybe it can be integrated + if ws.max_row == staff_start: + ws.append(["-","-","-","-","-","-","-"]) tab = Table(displayName="StaffTable"+room, ref="A"+str(staff_start)+":G"+str(ws.max_row)) style = TableStyleInfo(name="TableStyleLight2", showFirstColumn=False, showLastColumn=False, showRowStripes=True, showColumnStripes=False) @@ -180,5 +183,5 @@ print 'Content-Disposition: attachment; filename="'+filename+'"' print 'Content-Length: '+str(finfo.st_size) print "" - print f.read() + sys.stdout.write(f.read())