diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2025-01-12 20:50:42 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2025-01-12 20:50:42 +0100 |
commit | 08a786961541bd320895178fec7e403069093927 (patch) | |
tree | f29630a23e183504811a5151c5e72c7ce5f163d2 /page_manipulation | |
parent | 9ecb286460fb1b0b9bd93ef96fcc448fa2788442 (diff) |
signature of 64 pages in the A6 booklet
Diffstat (limited to 'page_manipulation')
-rwxr-xr-x | page_manipulation/a6_book.py | 21 |
1 files changed, 20 insertions, 1 deletions
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,10 +44,16 @@ 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 '<start>-<end>' 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) |