adsfolio.gui.jobs
Qt subprocess helpers for running the existing adsfolio CLI.
- class adsfolio.gui.jobs.CommandJob(argv, parent=None, *, working_directory=None, root=None, follow_up_argv=())[source]
Bases:
PySide6.QtCore.QObjectRun an adsfolio CLI subcommand and stream complete output lines.
- Parameters:
argv (list[str]) – Full argv, including the executable at index zero.
parent (QObject, optional) – Qt parent object.
working_directory (Path or str, optional) – Directory in which to run the command. The GUI passes the selected library root so relative CLI paths have the same semantics as the CLI.
follow_up_argv (sequence of sequences of str, optional) – Commands to run in order after successful completion. A failed or cancelled command stops the sequence.
root (Path or str, optional) – Backward-compatible alias for working_directory used by the dialogs.
- failed
- finished
- output
- staticMetaObject = PySide6.QtCore.QMetaObject("CommandJob" inherits "QObject": Methods: #4 type=Signal, signature=output(QString), parameters=QString #5 type=Signal, signature=finished(int), parameters=int #6 type=Signal, signature=failed(QString), parameters=QString )
- class adsfolio.gui.jobs.JsonWorkerJob(parent=None)[source]
Bases:
PySide6.QtCore.QObjectRun a hidden
adsfolio pdfworker command in a child process.The job writes
request.jsonto a private temporary directory, startsadsfolio pdf COMMAND REQUEST, and readsresult.jsonafter the child exits. A child process keeps Python work off the window’s interpreter lock, so the window stays responsive. finished carries(payload, error).Subclasses set command and fill request after this initializer.
- Parameters:
parent (QObject | None)
- cancel()[source]
Ask the child to stop at its next check by creating the cancel file.
- Return type:
None
- command = ''
- finished
- staticMetaObject = PySide6.QtCore.QMetaObject("JsonWorkerJob" inherits "QObject": Methods: #4 type=Signal, signature=finished(PyObject,PyObject), parameters=PyObject, PyObject )
- adsfolio.gui.jobs.cli_argv(*args)[source]
Build CLI arguments for an installed package or a desktop bundle.
- Parameters:
*args (str) – CLI arguments, passed unchanged without shell interpretation.
- Returns:
Command using the bundled console helper when frozen, otherwise the current Python interpreter. The helper shares the GUI’s dependencies and provides output pipes even when the GUI has no console on Windows.
- Return type: