|
| 1 | +.TH NIP4-BATCH 1 "Oct 4 2025" |
| 2 | + |
| 3 | +.SH NAME |
| 4 | +.PP |
| 5 | +nip4-batch - command-line interface to the nip4 image processing spreadsheet |
| 6 | + |
| 7 | +.SH SYNOPSIS |
| 8 | +.B nip4-batch |
| 9 | +.I filename |
| 10 | +.RI [ arg1.. ] |
| 11 | +.br |
| 12 | +.B nip4-batch -e |
| 13 | +.I expression |
| 14 | +.RI [ arg1.. ] |
| 15 | +.br |
| 16 | +.B nip4-batch -w |
| 17 | +.RI [ filename1.. ] |
| 18 | + |
| 19 | +.SH DESCRIPTION |
| 20 | +.B nip4-batch |
| 21 | +is a command-line interface to the |
| 22 | +.B nip4(1) |
| 23 | +image processing spreadsheet. |
| 24 | + |
| 25 | +There are three principal modes: |
| 26 | + |
| 27 | +.TP |
| 28 | +.B nip4-batch filename [ arg1.. ] |
| 29 | +Load filename as a set of definitions and pass in any other arguments as |
| 30 | +argc and argv. This is the default mode and is suitable for writing scripts |
| 31 | +in nip4's programming language. |
| 32 | + |
| 33 | +.TP |
| 34 | +.B nip4-batch -e expression [ arg1.. ] |
| 35 | +Set main = expression, set argc and argc to any remaining arguments, and |
| 36 | +print the value of symbol "main" to stdout. |
| 37 | + |
| 38 | +.TP |
| 39 | +.B nip4-batch -w [ filename1.. ] |
| 40 | +Load the named files as workspaces or images. You can use the options below |
| 41 | +to pass the workspace parameters and control what workspace results are |
| 42 | +saved or printed. |
| 43 | + |
| 44 | +.SS "Command Line Options" |
| 45 | +.PP |
| 46 | +These options give more precise control over nip4-batch's behaviour. |
| 47 | + |
| 48 | +.TP |
| 49 | +.B --workspace |
| 50 | +Load arguments as workspaces. |
| 51 | + |
| 52 | +.TP |
| 53 | +.BI --expression= expression |
| 54 | +Evaluate |
| 55 | +.I expression |
| 56 | +and print the result to stdout. Any other arguments are loaded as argc and |
| 57 | +argv. |
| 58 | + |
| 59 | +.TP |
| 60 | +.BI --output= filename |
| 61 | +The value of main is written to |
| 62 | +.I filename. |
| 63 | +If main is a |
| 64 | +list, the filename is incremented between objects. You can use |
| 65 | +the suffix to specify the format and options to write in. |
| 66 | + |
| 67 | +.TP |
| 68 | +.B --print-main |
| 69 | +Print the value of main on exit. nip4-batch will check for a top-level |
| 70 | +symbol called main, and also check each workspace for a main. |
| 71 | + |
| 72 | +.SS "Debugging Options" |
| 73 | +.PP |
| 74 | +Some other options are useful for debugging, benchmarking, and for generating |
| 75 | +strings for internationalisation. |
| 76 | + |
| 77 | +.TP |
| 78 | +.B --verbose |
| 79 | +Produce verbose error messages: handy for debugging in batch mode. |
| 80 | + |
| 81 | +.TP |
| 82 | +.B --i18n |
| 83 | +Output strings from .def files for internationalisation. |
| 84 | + |
| 85 | +.TP |
| 86 | +.B --version |
| 87 | +Print version information. |
| 88 | + |
| 89 | +.TP |
| 90 | +.B --test |
| 91 | +Start up (including any arg processing), test for any errors, |
| 92 | +and exit with an error code if any occurred. Useful for running |
| 93 | +automated tests. |
| 94 | + |
| 95 | +.TP |
| 96 | +.BI --prefix= PREFIX |
| 97 | +Set install prefix. Start up as if nip4-batch had been installed to PREFIX. |
| 98 | +Useful for running automated tests without installing the thing. |
| 99 | + |
| 100 | +.SH EXAMPLES |
| 101 | + |
| 102 | +.TP |
| 103 | +.B nip4-batch -e "2 + 2" |
| 104 | +Prints 4 to stdout. |
| 105 | + |
| 106 | +.TP |
| 107 | +.B nip4-batch -e "99 + Image_file argv?1" -o result.png fred.jpg |
| 108 | +Load argv1 (fred.jpg), add 99, output to result.png. |
| 109 | + |
| 110 | +.TP |
| 111 | +.B nip4-batch -e "Matrix [[1,2],[4,5]] ** -1" -o poop.mat |
| 112 | +Invert the 2x2 matrix and write the result to poop.mat. |
| 113 | + |
| 114 | +.SH COPYRIGHT |
| 115 | +2025 (c) libvips.org |
0 commit comments