qgis_process allows us to run scripts already installed in QGIS from the command line. But is there a way to run qgis scripts not yet installed?
e.g. if I have a file script.py
from qgis.core import QgsProcessing
# (...etc...)
class Foo(QgsProcessingAlgorithm):
# defines my algorithm, which works fine in qgis
Can qgis_process or some other tool run this from the command line without me having to add script.py
to the toolbox in qgis first?
The command-line help to qgis_process is encouraging in that it says
(...) run runs an algorithm. The algorithm id or a path to a model file and parameter values must be specified. Parameter values are specified via the --PARAMETER=VALUE syntax
But if I provide a path to script.py
(with or without the .py
) it says not found.