You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request: An easy way of repeating the report generation process with the same parameters as the last time. This could be in the form of an item in the "qgis report wizard" menu called "Generate report with previous settings".
More context below.
Im in the process of writing a Jinja HTML template. For every small change I make, I need to run the "hypertext report generator" and inspect the result. I imagine that other users will also need to do this.
There are three obvious ways of generating the report:
If I leave the wizard open it requires two clicks, which is acceptable. However the window is always on top of the other QGIS windows, so if I need to work in QGIS with only one monitor, this is annoying.
If I don't leave the wizard open, then when I open the wizard I need to either type or paste the settings (input template, vector layer, output file), which is very tedious.
I can click "Advanced" -> "Copy as Python Command", and I get a line of Python code. I open the Python Console and paste this line and excecute. From now on, when I need to render another time, I can put the cursor in the Python Console, press Up-key, press Enter.
The best solution for me, which I am currently using, is described below. However it is not suitable for users in general and it is more tedious to set up than what one would have hoped for.
Paste the code below into the Python Console, it is now possible to generate the report by pressing Ctrl + Shift + 1.
def qgis_wizard_predefined():
#from qgis import processing
print('qgis_wizard_predefined')
processing.run("report_wizard:hypertext_report", {'TEMPLATE':'/home/jdoe/myproj/report/html/main.html','VECTOR_LAYER':'/home/jdoe/myproj/lamps.shp','LIMIT':100,'EMBED_IMAGES':False,'OUTPUT':'/home/jdoe/myproj/report/htmloutp/main.html'})
# Assign "Ctrl + Shift + 1" to openAlgorithm()
from qgis.PyQt.QtGui import QKeySequence
from qgis.PyQt.QtWidgets import QShortcut
from qgis.PyQt.QtCore import Qt
shortcut = QShortcut(QKeySequence(Qt.ControlModifier + Qt.ShiftModifier + Qt.Key_2), iface.mainWindow())
shortcut.setContext(Qt.ApplicationShortcut)
shortcut.activated.connect(qgis_wizard_predefined)
The text was updated successfully, but these errors were encountered:
Feature request: An easy way of repeating the report generation process with the same parameters as the last time. This could be in the form of an item in the "qgis report wizard" menu called "Generate report with previous settings".
More context below.
Im in the process of writing a Jinja HTML template. For every small change I make, I need to run the "hypertext report generator" and inspect the result. I imagine that other users will also need to do this.
There are three obvious ways of generating the report:
The best solution for me, which I am currently using, is described below. However it is not suitable for users in general and it is more tedious to set up than what one would have hoped for.
Paste the code below into the Python Console, it is now possible to generate the report by pressing Ctrl + Shift + 1.
The text was updated successfully, but these errors were encountered: