pygacity.generate.config module

Configuration class for pygacity

class pygacity.generate.config.Config(args: Namespace = None)[source]

Bases: object

Configuration class for pygacity

format_serial(serial: int) str[source]

Formats a serial number as a string for display and filenames.

Parameters:

serial (int) – the integer serial number

Returns:

zero-padded hexadecimal string of width build.serial-hex-digits if build.serial-hex is true, otherwise the plain decimal string

Return type:

str

resource_root = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/pygacity/envs/latest/lib/python3.12/site-packages/pygacity/resources')

Path to pygacity resources directory

retrieve_serials()[source]

Retrieves or generates serial numbers for multiple copies

Returns:

list of serial numbers for document copies

Return type:

list of int

pygacity.generate.config.is_executable(cmd: str) bool[source]

Checks if cmd is an executable in PATH

Parameters:

cmd (str) – command name

Returns:

True if cmd is found in PATH, False otherwise

Return type:

bool