|
|
@ -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(''' |
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
|
@ -310,8 +311,8 @@ def combine_a7(): |
|
|
|
# os.remove(combine_aux) |
|
|
|
# os.remove(combine_log) |
|
|
|
|
|
|
|
print (seq) |
|
|
|
print (seq * 4) |
|
|
|
print(seq) |
|
|
|
print(seq * 4) |
|
|
|
|
|
|
|
# now combine even aggain to get a6 |
|
|
|
|
|
|
@ -336,8 +337,8 @@ def combine_a7(): |
|
|
|
seq = int(seq) |
|
|
|
|
|
|
|
for i in range(1, seq + 1): |
|
|
|
fd.write(gen_page_include(i*4-3,i*4-1, combine_pdf, pdf_number, "1x2,landscape=false")) |
|
|
|
fd.write(gen_page_include(i*4-2, i*4, combine_pdf, pdf_number, "1x2,landscape=false")) |
|
|
|
fd.write(gen_page_include(i * 4 - 3, i * 4 - 1, combine_pdf, pdf_number, "1x2,landscape=false")) |
|
|
|
fd.write(gen_page_include(i * 4 - 2, i * 4, combine_pdf, pdf_number, "1x2,landscape=false")) |
|
|
|
|
|
|
|
fd.write(""" |
|
|
|
\\end{document} |
|
|
@ -350,8 +351,8 @@ def combine_a7(): |
|
|
|
# os.remove(combine2_aux) |
|
|
|
# os.remove(combine2_log) |
|
|
|
|
|
|
|
print (seq) |
|
|
|
print (seq * 4) |
|
|
|
print(seq) |
|
|
|
print(seq * 4) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|