Skip to content

Commit c540e77

Browse files
committed
release 1.0.0
1 parent 5d1fa41 commit c540e77

File tree

10 files changed

+29
-10
lines changed

10 files changed

+29
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A set of sample templates and test data can be found in the [test/templates dire
1212
## python dependencies
1313

1414
- [jinja2](https://jinja.palletsprojects.com/en/3.0.x/) usually bundled with QGIS distribution or `pip install jinja2` if not provided
15-
- [secretary](https://github.com/christopher-ramirez/secretary) bundled with plugin as external library
15+
- [secretary](https://github.com/christopher-ramirez/secretary) bundled with the plugin as external library
1616

1717
## jinja2 template syntax
1818

icon.png

-3.33 KB
Binary file not shown.

metadata.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33
# This file should be included when you package your plugin.# Mandatory items:
44

55
[general]
6-
name=Report wizard
6+
name=QGIS Report wizard
77
qgisMinimumVersion=3.16
8-
description=QGIS templating engine for odt and markdown documents
9-
version=0.1
8+
description=QGIS templating engine for odt and hypertext documents
9+
version=1.0.0
1010
author=Enrico Ferreguti
1111
1212

13-
about=Provide a brief description of the plugin and its purpose.
13+
about=The plugin makes use of python templating libraries (jinja2, secretary) for creating reports from data (variables, layers, features, layouts and other global settings) within the current QGIS project in ODT format or other text/hypertext format. More info on repository home page: https://github.com/enricofer/qgis_report_wizard
1414

1515
tracker=https://github.com/enricofer/qgis_report_wizard/issues
1616
repository=https://github.com/enricofer/qgis_report_wizard
1717
# End of mandatory metadata
1818

1919
# Recommended items:
2020

21-
hasProcessingProvider=no
21+
hasProcessingProvider=yes
2222
# Uncomment the following line and add your changelog:
2323
# changelog=
2424

2525
# Tags are comma separated with spaces allowed
26-
tags=reports markdown html
26+
tags=report, markdown, html, odt, jinja2, secretary, documents
2727

2828
homepage=https://github.com/enricofer/qgis_report_wizard
2929
category=Plugins
30-
icon=icon.png
30+
icon=support/icon.png
3131
# experimental flag
3232
experimental=False
3333

report_wizard.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def add_action(
181181
action.setWhatsThis(whats_this)
182182

183183
if toolbutton:
184-
self.defaultAction = QAction( QIcon(self.main_icon), "Report Wizard", parent)
184+
self.defaultAction = QAction( QIcon(self.main_icon), "Report wizard", parent)
185185
self.toolButton.setDefaultAction(self.defaultAction)
186186
self.toolButtonMenu.addAction(action)
187187

@@ -220,6 +220,20 @@ def initGui(self):
220220
alg_params = {}
221221

222222
sub_actions = [
223+
{
224+
"text":"Readme",
225+
"icon_path":os.path.join(self.plugin_dir, 'support', 'icon.png'),
226+
"callback": lambda x: QDesktopServices.openUrl(QUrl("https://github.com/enricofer/qgis_report_wizard/blob/master/README.md")),
227+
"parent": self.iface.mainWindow(),
228+
"toolbutton": self.toolButton,
229+
},
230+
{
231+
"text":"Sample templates",
232+
"icon_path":os.path.join(self.plugin_dir, 'support', 'icon.png'),
233+
"callback": self.open_templates_folder,
234+
"parent": self.iface.mainWindow(),
235+
"toolbutton": self.toolButton,
236+
},
223237
{
224238
"text":"Odt report generator",
225239
"icon_path":os.path.join(self.plugin_dir, 'support', 'icon_odt.png'),
@@ -252,14 +266,19 @@ def unload(self):
252266
else:
253267
for action in self.actions:
254268
self.iface.removePluginMenu(
255-
self.tr(u'&Report wizard'),
269+
self.menu,
256270
action)
257271
self.iface.removeToolBarIcon(action)
258272
try:
259273
QgsApplication.processingRegistry().removeProvider(self.provider)
260274
except:
261275
pass
262276

277+
278+
def open_templates_folder(self):
279+
templates_folder = os.path.join(self.plugin_dir,"test","templates")
280+
templates_folder_url = QUrl.fromLocalFile(templates_folder)
281+
QDesktopServices.openUrl(templates_folder_url)
263282

264283
def run_alg(self, triggeredAction, alg, alg_params):
265284
self.toolButton.setDefaultAction(triggeredAction)

support/icon.png

-1.65 KB
Loading

support/icon_hr.png

8.37 KB
Loading

support/icon_hr_md.png

2.92 KB
Loading

support/icon_hr_odt.png

-17.7 KB
Loading

support/icon_md.png

18 Bytes
Loading

support/icon_odt.png

-409 Bytes
Loading

0 commit comments

Comments
 (0)