From 08a786961541bd320895178fec7e403069093927 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sun, 12 Jan 2025 20:50:42 +0100 Subject: signature of 64 pages in the A6 booklet --- page_manipulation/a6_book.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'page_manipulation/a6_book.py') diff --git a/page_manipulation/a6_book.py b/page_manipulation/a6_book.py index 059a717..550cb5d 100755 --- a/page_manipulation/a6_book.py +++ b/page_manipulation/a6_book.py @@ -23,6 +23,17 @@ SIGNATURE_32 = ( 7, 8, 23, 24, ) +SIGNATURE_64 = ( + 63, 0, 61, 2, 1, 62, 3, 60, + 59, 4, 57, 6, 5, 58, 7, 56, + 55, 8, 53, 10, 9, 54, 11, 52, + 51, 12, 49, 14, 13, 50, 15, 48, + 47, 16, 45, 18, 17, 46, 19, 44, + 43, 20, 41, 22, 21, 42, 23, 40, + 39, 24, 37, 26, 25, 38, 27, 36, + 35, 28, 33, 30, 29, 34, 31, 32, +) + def get_parser(): parser = argparse.ArgumentParser() @@ -33,9 +44,15 @@ def get_parser(): parser.add_argument( "--double", "-d", action="store_true", - help="Put two signatures on 4 A4 sheet. Pages should be a " + help="Put two signatures on 4 A4 sheet. Pages will be a " "multiple of 32", ) + parser.add_argument( + "--quadruple", "-q", + action="store_true", + help="Put four signatures on 8 A4 sheet. Pages will be a " + "multiple of 64", + ) parser.add_argument( "pagespec", help="Page selection. At the moment only '-' is supported" @@ -57,6 +74,8 @@ def main(): if args.double: signature = SIGNATURE_32 + elif args.quadruple: + signature = SIGNATURE_64 else: signature = SIGNATURE sig_len = len(signature) -- cgit v1.2.3