From 991ded8d059e5b05f112a2b783e3d8263b7c14f6 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 24 Sep 2023 00:00:01 +0200
Subject: [PATCH] To Bookmaker, add margin definition.

---
 bookmaker.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bookmaker.py b/bookmaker.py
index 0e35820..2e5085f 100755
--- a/bookmaker.py
+++ b/bookmaker.py
@@ -15,6 +15,7 @@ parser.add_argument("-a", "--analyze", dest="analyze", action="store_true", help
 parser.add_argument("-t", "--symmetry", dest="symmetry", action="store_true", help="alternate horizontal crops between odd and even pages")
 parser.add_argument("-s", "--second", dest="second", help="append second file as input to append")
 parser.add_argument("-r", "--rotate", dest="rotate", help="rotate page of number by 90°")
+parser.add_argument("-m", "--margin", type=float, default=4.3, help="print margin (default 4.3)")
 args = parser.parse_args()
 
 with open(args.input_file, 'rb') as file:
@@ -96,7 +97,7 @@ with open(args.input_file, 'rb') as file:
     else:
         n_pages_per_axis = 2
         points_per_mm = 2.83465
-        printable_margin = 4.3 * points_per_mm
+        printable_margin = args.margin * points_per_mm
         printable_scale = (a4_width - 2*printable_margin)/a4_width
         spine_limit = 10 * points_per_mm
         half_width = a4_width / n_pages_per_axis 
-- 
2.30.2