From: Christian Heller Date: Sun, 24 Sep 2023 18:07:15 +0000 (+0200) Subject: Minor variable renaming. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/test?a=commitdiff_plain;h=25a026d5a558d9ae256cab7a27d525ec18b48f1a;p=misc Minor variable renaming. --- diff --git a/bookmaker.py b/bookmaker.py index 25e8599..20d9c4d 100755 --- a/bookmaker.py +++ b/bookmaker.py @@ -422,34 +422,34 @@ def main(): printable_offset_y = printable_margin * A4_HEIGHT / A4_WIDTH new_page.add_transformation(pypdf.Transformation().scale(printable_scale, printable_scale)) new_page.add_transformation(pypdf.Transformation().translate(tx=printable_offset_x, ty=printable_offset_y)) - x_left_SPINE_LIMIT = half_width * bonus_shrink_factor - x_right_SPINE_LIMIT = A4_WIDTH - x_left_SPINE_LIMIT + x_left_spine_limit = half_width * bonus_shrink_factor + x_right_spine_limit = A4_WIDTH - x_left_spine_limit if args.analyze or front_page: packet = io.BytesIO() c = reportlab.pdfgen.canvas.Canvas(packet, pagesize=A4) if args.analyze: # spine lines c.setLineWidth(0.1) - c.line(x_left_SPINE_LIMIT, A4_HEIGHT, x_left_SPINE_LIMIT, 0) - c.line(x_right_SPINE_LIMIT, A4_HEIGHT, x_right_SPINE_LIMIT, 0) + c.line(x_left_spine_limit, A4_HEIGHT, x_left_spine_limit, 0) + c.line(x_right_spine_limit, A4_HEIGHT, x_right_spine_limit, 0) if front_page: c.setLineWidth(0.2) # cut upper left - start_up_left_left_x = x_left_SPINE_LIMIT - 0.5 * CUT_WIDTH - start_up_left_right_x = x_left_SPINE_LIMIT + 0.5 * CUT_WIDTH + start_up_left_left_x = x_left_spine_limit - 0.5 * CUT_WIDTH + start_up_left_right_x = x_left_spine_limit + 0.5 * CUT_WIDTH middle_point_up_left_y = half_height + MIDDLE_POINT_DEPTH end_point_up_left_y = half_height + CUT_DEPTH - c.line(start_up_left_right_x, half_height, x_left_SPINE_LIMIT, end_point_up_left_y) - c.line(x_left_SPINE_LIMIT, end_point_up_left_y, x_left_SPINE_LIMIT, middle_point_up_left_y) - c.line(x_left_SPINE_LIMIT, middle_point_up_left_y, start_up_left_left_x, half_height) + c.line(start_up_left_right_x, half_height, x_left_spine_limit, end_point_up_left_y) + c.line(x_left_spine_limit, end_point_up_left_y, x_left_spine_limit, middle_point_up_left_y) + c.line(x_left_spine_limit, middle_point_up_left_y, start_up_left_left_x, half_height) # cut lower right - start_down_right_left_x = x_right_SPINE_LIMIT - 0.5 * CUT_WIDTH - start_down_right_right_x = x_right_SPINE_LIMIT + 0.5 * CUT_WIDTH + start_down_right_left_x = x_right_spine_limit - 0.5 * CUT_WIDTH + start_down_right_right_x = x_right_spine_limit + 0.5 * CUT_WIDTH middle_point_down_right_y = half_height - MIDDLE_POINT_DEPTH end_point_down_right_y = half_height - CUT_DEPTH - c.line(start_down_right_left_x, half_height, x_right_SPINE_LIMIT, end_point_down_right_y) - c.line(x_right_SPINE_LIMIT, end_point_down_right_y, x_right_SPINE_LIMIT, middle_point_down_right_y) - c.line(x_right_SPINE_LIMIT, middle_point_down_right_y, start_down_right_right_x, half_height) + c.line(start_down_right_left_x, half_height, x_right_spine_limit, end_point_down_right_y) + c.line(x_right_spine_limit, end_point_down_right_y, x_right_spine_limit, middle_point_down_right_y) + c.line(x_right_spine_limit, middle_point_down_right_y, start_down_right_right_x, half_height) if args.analyze or front_page: c.save() new_pdf = pypdf.PdfReader(packet)