|
|
@ -1,4 +1,5 @@ |
|
|
|
#!/usr/bin/python |
|
|
|
#!/usr/bin/python3 |
|
|
|
|
|
|
|
import math |
|
|
|
|
|
|
|
from datetime import timedelta |
|
|
@ -7,7 +8,7 @@ import locale |
|
|
|
import os |
|
|
|
|
|
|
|
start_year = 2019 |
|
|
|
start_date = date(start_year, 01, 01) |
|
|
|
start_date = date(start_year, 1, 1) |
|
|
|
end_date = date(start_year, 12, 31) |
|
|
|
|
|
|
|
main_filename = "calender" |
|
|
@ -121,7 +122,7 @@ def tex_write_calender_overview(fd): |
|
|
|
\\setlength{\\tabcolsep}{0.9mm} |
|
|
|
''') |
|
|
|
for month in range(1, 12 + 1): |
|
|
|
m = date(start_year, month, 01) |
|
|
|
m = date(start_year, month, 1) |
|
|
|
|
|
|
|
if (month - 1) % 2 == 0: |
|
|
|
fd.write('\\ \\newline\n\r') |
|
|
@ -138,7 +139,7 @@ def tex_write_calender_overview(fd): |
|
|
|
|
|
|
|
# print weeknames |
|
|
|
for i in range(0, 6 + 1): |
|
|
|
curr_date = date(start_year, month, 01) |
|
|
|
curr_date = date(start_year, month, 1) |
|
|
|
curr_date = curr_date + timedelta(days=i - curr_date.weekday()) |
|
|
|
|
|
|
|
fd.write('\\textbf{' + curr_date.strftime('%a') + '} ') |
|
|
@ -149,7 +150,7 @@ def tex_write_calender_overview(fd): |
|
|
|
|
|
|
|
fd.write('\\hline') |
|
|
|
|
|
|
|
curr_date = date(start_year, month, 01) |
|
|
|
curr_date = date(start_year, month, 1) |
|
|
|
weekline = " " + " &" * curr_date.weekday() |
|
|
|
next_date = curr_date |
|
|
|
while curr_date.month == next_date.month: |
|
|
@ -182,8 +183,8 @@ def tex_write_weekly(fd): |
|
|
|
print_start_date = start_date - timedelta(days=start_date.weekday()) |
|
|
|
print_end_date = end_date + timedelta(days=6 - end_date.weekday()) |
|
|
|
|
|
|
|
print print_start_date.isoformat() |
|
|
|
print print_end_date.isoformat() |
|
|
|
print(print_start_date.isoformat()) |
|
|
|
print(print_end_date.isoformat()) |
|
|
|
|
|
|
|
fd.write(''' |
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
|
|