MIDDLE_POINT_DEPTH = 0.4 * POINTS_PER_CM
SPINE_LIMIT = 1 * POINTS_PER_CM
QUARTER_SCALE_FACTOR = 0.5
+PAGE_ORDER = (3,0,7,4,1,2,5,6)
# some helpers
class HandledException(Exception):
print(f"built page number {i+1} (of {len(pages_to_add)})")
else:
+ # --nup4 output
print("-n: building 4-input-pages-per-output-page book")
print(f"-m: applying printable-area margin of {args.print_margin}cm")
if args.analyze:
i += 1
if i == 8:
i = 0
- new_i_order += [8 * n_eights + 3,
- 8 * n_eights + 0,
- 8 * n_eights + 7,
- 8 * n_eights + 4,
- 8 * n_eights + 1,
- 8 * n_eights + 2,
- 8 * n_eights + 5,
- 8 * n_eights + 6]
+ for n in PAGE_ORDER:
+ new_i_order += [8 * n_eights + n]
+ new_page_order += [eight_pack[n]]
n_eights += 1
- new_page_order += [eight_pack[3]] # page front, upper left
- new_page_order += [eight_pack[0]] # page front, upper right
- new_page_order += [eight_pack[7]] # page front, lower left
- new_page_order += [eight_pack[4]] # page front, lower right
- new_page_order += [eight_pack[1]] # page back, upper left
- new_page_order += [eight_pack[2]] # page back, upper right
- new_page_order += [eight_pack[5]] # page back, lower left
- new_page_order += [eight_pack[6]] # page back, lower right
i = 0
page_count = 0
front_page = True