Skip to content
Snippets Groups Projects
Commit e43e9bde authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

make.py updateMetadataTxt() correctly encodes file as UTF-8

parent e11c3019
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,10 @@ def classFactory(iface): # pylint: disable=invalid-name
:param iface: A QGIS interface instance.
:type iface: QgsInterface
"""
#
from timeseriesviewerplugin import TimeSeriesViewerPlugin
import os, sys
d = os.path.dirname(__file__)
if not d in sys.path:
sys.path.append(d)
from timeseriesviewer.timeseriesviewerplugin import TimeSeriesViewerPlugin
return TimeSeriesViewerPlugin(iface)
......@@ -126,18 +126,5 @@ if __name__ == "__main__":
#os.chdir(dirPlugin)
#shutil.make_archive(pathZip, 'zip', '..', dirPlugin)
# 6. copy to local QGIS user DIR
if True:
import shutil
from os.path import expanduser
pathQGIS = os.path.join(expanduser("~"), *['.qgis2', 'python', 'plugins'])
assert os.path.isdir(pathQGIS)
pathDst = os.path.join(pathQGIS, os.path.basename(dirPlugin))
rm(pathDst)
shutil.copytree(dirPlugin, pathDst)
s = ""
print('Finished')
......@@ -480,9 +480,9 @@ def updateMetadataTxt():
#for required metatags
pathDst = jp(DIR_REPO, 'metadata.txt')
assert os.path.exists(pathDst)
import timeseriesviewer.sandbox
import timeseriesviewer.utils
#required to use QIcons
qgis = timeseriesviewer.sandbox.initQgisEnvironment()
qgis = timeseriesviewer.utils.initQgisApplication()
import timeseriesviewer, collections
md = collections.OrderedDict()
......@@ -493,7 +493,7 @@ def updateMetadataTxt():
#update/set new metadata
md['name'] = timeseriesviewer.TITLE
md['qgisMinimumVersion'] = "2.18"
md['qgisMinimumVersion'] = "3.0"
#md['qgisMaximumVersion'] =
md['description'] = timeseriesviewer.DESCRIPTION.strip()
md['about'] = timeseriesviewer.ABOUT.strip()
......@@ -513,9 +513,10 @@ def updateMetadataTxt():
lines = ['[general]']
for k, line in md.items():
lines.append('{}={}'.format(k, line))
open(pathDst, 'w').writelines('\n'.join(lines))
s = ""
f = open(pathDst, 'w', encoding='utf-8')
f.writelines('\n'.join(lines))
f.flush()
f.close()
def make_pb_tool_cfg():
......@@ -577,7 +578,7 @@ if __name__ == '__main__':
if False:
updateInfoHTML()
if False:
if True:
updateMetadataTxt()
if False:
......
[general]
name=HUB TimeSeriesViewer
description=A QGIS Plugin to visualize multi-sensor remote sensing time-series data.
version=0.2
qgisMinimumVersion=2.18
description=A QGIS Plugin to visualize multi-sensor remote-sensing time-series data.
version=0.4
qgisMinimumVersion=3.0
author=Benjamin Jakimow, Geomatics Lab, Humboldt-Universität zu Berlin
about=The HUB TimeSeriesViewer is developed at Humboldt-Universität zu Berlin. Born in the SenseCarbon project, it was funded by the German Aerospace Centre (DLR) and granted by the Federal Ministry of Education and Research (BMBF, grant no. 50EE1254). Since 2017 it is developed under contract by the German Research Centre for Geosciences (GFZ) as part of the EnMAP Core Science Team activities (www.enmap.org), funded by DLR and granted by the Federal Ministry of Economic Affairs and Energy (BMWi, grant no. 50EE1529).
email=benjamin.jakimow@geo.hu-berlin.de
icon=timeseriesviewer/ui/icons/icon.png
homepage=bitbucket.org/jakimowb/hub-timeseriesviewer
tracker=bitbucket.org/jakimowb/hub-timeseriesviewer/issues
repository=bitbucket.org/jakimowb/hub-timeseriesviewer
experimental=False
deprecated=False
# Tags are comma separated with spaces allowed
tags=analysis, raster, remote sensing, time, labeling
category=Raster
tags=remote sensing, raster, time series
category=Raster
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment