Command Line Interface
None of these command line options are mandatory, all of them can be left out and the script will ask for all the details that it needs.
Options
-i / --input
Specifies the path to the input PDF. If omitted, the path is prompted.
Example:
--input "./here/is/my/document.pdf"
-o / --output
Specifies the path to the outupt PDF. If omitted, the path is prompted.
Example:
--output "./put/it/here/document-sined.pdf"
-t / --template
This option specifies the Typst template which is used to generate the visual part of the signature.
The template should be given as a directory containing a valid Typst package. This directory may either be a local path or a nix-flake-input-style GitHub reference.
If omitted, the template's location is loaded from the config or prompted.
INFO
When using a GitHub reference it is necessary to specify the exact path to the Typst package directory as ?dir=<path>
Examples:
--template ./some/directory/--template="~/here/"-t "github:maxkurze1/resignation?dir=templates/logo"
For additional information about the template process refer to templates.
--offline
Try to do everything offline, and emit an error if a resource is not available.
--refresh
Try to refresh resources that are fetched from the network (e.g. templates). In case the network is unavailable, fall back to the cached version instead.
-p / --param / --params
Template specific parameters, refer to the documentation of your template. These parameters are given as key-value pairs (in the form <key>=<value>). The provided values need to be valid Typst objects, see templates
This flag accepts multiple parameters at once, but it can also be invoked multiple times.
Examples:
--params info=[Hello] name=[#{cert_name}] inset=3pt--param date=[Today] --param info=[Date: #{date}]
--cert / --certificate
The path to the PKCS 12 certificate.
If omitted, the path is either loaded from the config or prompted.
Example:
--cert "~/Certificate.p12"
--pass / --password
Via this flag the certificate's password may be specified.
If not present the password is loaded from the config, keyring or prompted.
WARNING
The usage of this flag is discouraged, please use --ask instead, to prevent that the password is captured in your shell's history.
Example:
--password "tHis!sMyPa22w0rd"
-a / --ask
This flag disables the keyring lookup and instead always prompts the user for the certificate's password. It is a boolean flag and does not need an argument.
Example:
--ask
-c / --config
Specifies the path to the signature config.
If not present, the config is searched at $XDG_CACHE_HOME/resignation/config.toml and ~/.config/resignation/config.toml.
This configuration file may provide default for various command line option. For more information refer to config.
Example:
--config "~/.config/resignation/config.toml"
-s / --sig
Specifies the name of the signature type that should be used (only necessary if the config contains multiple signature types). If left unspecified, the config's default will be used or the user will be prompted.
Example:
--sig "Sig1"
Environment Variables
Additionally, resignation also can be configured through environment variables.
RESIGNATION_PARAMS
The RESIGNATION_PARAMS variable can be used to provide additional template parameters for the Typst invocation. It should contain these parameters separated by colons : in the form of key-value pairs <key>=<value>.
RESIGNATION_PARAMS="name=[My Name]:info=[Hello\ Date: #{date}]"
Note that the given <value>s still need to be valid Typst objects. Thus, they are wrapped into content blocks [ ... ] here.
The precedence of parameters given through this environment variable is right above the ones from the configuration file and below the parameters given on the command line.