diff --git a/DataPlotly/core/core_utils.py b/DataPlotly/core/core_utils.py index 371b1afd..475aa9b7 100644 --- a/DataPlotly/core/core_utils.py +++ b/DataPlotly/core/core_utils.py @@ -1,4 +1,4 @@ -"""COre Utilities +"""Core Utilities .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -8,6 +8,7 @@ import uuid from qgis.PyQt.QtCore import QByteArray +DOC_URL = "https://dataplotly-docs.readthedocs.io" def safe_str_xml(s): """ replaces spaces by . diff --git a/DataPlotly/data_plotly.py b/DataPlotly/data_plotly.py index 7ee0384e..08f45f60 100644 --- a/DataPlotly/data_plotly.py +++ b/DataPlotly/data_plotly.py @@ -28,6 +28,9 @@ from qgis.core import QgsApplication, QgsExpression, QgsProject from qgis.gui import QgsGui +# Help +from DataPlotly.core.core_utils import DOC_URL + # Import the code for the dialog from DataPlotly.gui.dock import DataPlotlyDockManager from DataPlotly.gui.gui_utils import GuiUtils @@ -281,8 +284,7 @@ def unload(self): @staticmethod def open_help(): """ Open the online help. """ - QDesktopServices.openUrl( - QUrl('https://github.com/ghtmtt/DataPlotly/blob/master/README.md')) + QDesktopServices.openUrl(QUrl(DOC_URL)) def loadPlotFromDic(self, plot_dic, dock_id='DataPlotly'): """ diff --git a/DataPlotly/gui/plot_settings_widget.py b/DataPlotly/gui/plot_settings_widget.py index 3548ccc0..9ec9ec20 100644 --- a/DataPlotly/gui/plot_settings_widget.py +++ b/DataPlotly/gui/plot_settings_widget.py @@ -71,6 +71,7 @@ ) from qgis.utils import iface +from DataPlotly.core.core_utils import DOC_URL from DataPlotly.core.plot_factory import PlotFactory from DataPlotly.core.plot_settings import PlotSettings from DataPlotly.gui.gui_utils import GuiUtils @@ -586,8 +587,7 @@ def helpPage(self): self.help_view.load(QUrl('')) self.layouth.addWidget(self.help_view) - help_url = QUrl( - f'https://dataplotly-docs.readthedocs.io/en/latest/{self.ptype}.html') + help_url = QUrl(f'{DOC_URL}/en/latest/{self.ptype}.html') self.help_view.load(help_url) def resizeEvent(self, event): diff --git a/DataPlotly/metadata.txt b/DataPlotly/metadata.txt index 248171a5..a504114a 100644 --- a/DataPlotly/metadata.txt +++ b/DataPlotly/metadata.txt @@ -8,7 +8,7 @@ email=matteo.ghetta@gmail.com about=Draw D3 plots in QGIS -homepage=https://github.com/ghtmtt/DataPlotly/blob/master/README.md +homepage=https://dataplotly-docs.readthedocs.io tracker=https://github.com/ghtmtt/DataPlotly/issues repository=https://github.com/ghtmtt/DataPlotly # End of mandatory metadata