Skip to content

Commit

Permalink
added documentation project
Browse files Browse the repository at this point in the history
  • Loading branch information
warrieka committed Dec 26, 2018
1 parent b2f7c7c commit e0560b9
Show file tree
Hide file tree
Showing 14 changed files with 643 additions and 189 deletions.
45 changes: 28 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
LOCALES = nl

# CONFIGURATION
PROFILE=E:\work\devProfile

# translation
SOURCES = \
__init__.py \
inspireNL.py inspireNLabout.py dataCatalog.py
PROFILE=/home/kay/prj/devProfile

PLUGINNAME = inspireNL

Expand All @@ -50,9 +45,22 @@ default: compile
compile: $(UI_FILES) $(RESOURCE_FILES)

%_rc.py : %.qrc
pyrcc5 -o $*_rc.py $<
pyrcc4 -o $*_rc.py $<

%.py : %.ui
pyuic4 -o $@ $<

deploy: compile transcompile
# The deploy target only works on unix like operating system where
# the Python plugin directory is located at:
# $HOME/$(QGISDIR)/python/plugins
rm -r $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vfr $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
pyuic5 --import-from=. -o $@ $<

run: deploy
Expand All @@ -61,20 +69,20 @@ run: deploy
# The deploy target only works on unix like operating system where
# [KW]: use "make runplugin" instead on windows
deploy: derase compile
rm -rf $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
mkdir $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr $(PY_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vf $(UI_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr $(EXTRAS) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr i18n $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
rm -rf $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
mkdir $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
cp -vfr $(PY_FILES) $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
cp -vf $(UI_FILES) $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
cp -vfr $(EXTRAS) $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)
cp -vfr i18n $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME)


# The dclean target removes compiled python files from plugin directory
# also deletes any .git entry
dclean:
find $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME) -iname "*.pyc" -delete
find $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \;
find $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
find $(PROFILE)/profiles/default/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} /;


derase:
Expand All @@ -84,7 +92,7 @@ zip: deploy dclean
# The zip target deploys the plugin and creates a zip file with the deployed
# content. You can then upload the zip file on http://plugins.qgis.org
rm -f $(PLUGINNAME).zip
cd $(PROFILE)\profiles\default\python\plugins; zip -9r $(CURDIR)\$(PLUGINNAME).zip $(PLUGINNAME)
cd $(PROFILE)/profiles/default/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)

package: compile
# Create a zip package of the plugin named $(PLUGINNAME).zip.
Expand All @@ -96,6 +104,9 @@ package: compile
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
echo "Created package: $(PLUGINNAME).zip"

upload: zip
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip

transup:
@chmod +x scripts/update-strings.sh
@scripts/update-strings.sh $(LOCALES)
Expand Down
112 changes: 112 additions & 0 deletions Makefile_win
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#/***************************************************************************
# inspireNL
#
# Datasets van de het Nederlandse Dataportaal Nationaal Georegister bevragen
# -------------------
# begin : 2015-08-31
# copyright : (C) 2015 by KGIS
# email : [email protected]
# ***************************************************************************/
#
#/***************************************************************************
# * *
# * 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 *
# * the Free Software Foundation; either version 2 of the License, or *
# * (at your option) any later version. *
# * *
# ***************************************************************************/

# Add iso code for any locales you want to support here (space separated)
# default is no locales
LOCALES = nl

# CONFIGURATION
PROFILE=E:\work\devProfile

# translation
SOURCES = \
__init__.py \
inspireNL.py inspireNLabout.py dataCatalog.py

PLUGINNAME = inspireNL

PY_FILES = \
__init__.py settings.py \
inspireNL.py inspireNLabout.py dataCatalog.py geometryhelper.py metadataParser.py

UI_FILES = ui_inspireNL_dialog.py ui_dataCatalog_dialog.py

EXTRAS = metadata.txt images

RESOURCE_FILES = resources_rc.py

PLUGIN_UPLOAD = $(c)/scripts/plugin_upload.py

QGISDIR=.qgis2

default: compile

compile: $(UI_FILES) $(RESOURCE_FILES)

%_rc.py : %.qrc
pyrcc5 -o $*_rc.py $<

%.py : %.ui
pyuic5 --import-from=. -o $@ $<

run: deploy
qgis --profiles-path $(PROFILE)

# The deploy target only works on unix like operating system where
# [KW]: use "make runplugin" instead on windows
deploy: derase compile
rm -rf $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
mkdir $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr $(PY_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vf $(UI_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr $(EXTRAS) $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)
cp -vfr i18n $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME)


# The dclean target removes compiled python files from plugin directory
# also deletes any .git entry
dclean:
find $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME) -iname "*.pyc" -delete
find $(PROFILE)\profiles\default\python\plugins\$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \;


derase:
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)

zip: deploy dclean
# The zip target deploys the plugin and creates a zip file with the deployed
# content. You can then upload the zip file on http://plugins.qgis.org
rm -f $(PLUGINNAME).zip
cd $(PROFILE)\profiles\default\python\plugins; zip -9r $(CURDIR)\$(PLUGINNAME).zip $(PLUGINNAME)

package: compile
# Create a zip package of the plugin named $(PLUGINNAME).zip.
# This requires use of git (your plugin development directory must be a
# git repository).
# To use, pass a valid commit or tag as follows:
# make package VERSION=Version_0.3.2
rm -f $(PLUGINNAME).zip
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
echo "Created package: $(PLUGINNAME).zip"

transup:
@chmod +x scripts/update-strings.sh
@scripts/update-strings.sh $(LOCALES)

transcompile:
@chmod +x scripts/compile-strings.sh
@scripts/compile-strings.sh lrelease $(LOCALES)

transclean:
rm -f i18n/*.qm

clean:
rm $(UI_FILES) $(RESOURCE_FILES)

41 changes: 13 additions & 28 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
# -*- coding: utf-8 -*-
"""
/***************************************************************************
inspireNL
A QGIS plugin
Dataset van de het Nederlandse Dataportaal Nationaal Georegister bevragen en toevoegen aan QGIS.
-------------------
begin : 2015-08-31
copyright : (C) 2015 by KGIS
email : [email protected]
git sha : $Format:%H$
***************************************************************************/
# -*- coding: utf-8 -*--
"""
*An QGIS plugin to search and add Datasets of the Dutch Dataportal 'Nationaal Georegister' to QGIS.*
/***************************************************************************
* *
* 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 *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
This script initializes the plugin, making it known to QGIS.
"""
**About the Dutch INSPIRE QGIS plugin**
In the context of INSPIRE, the European member states are realizing a digital network for the exchange of data on the living environment. INSPIRE ensures that this geo-information is of good quality and that its content, even across national borders, is coordinated. In the Netherlands, descriptions of more than 200 INSPIRE datasets and approximately 265 associated services are now available in the National Georegister (http://www.nationaalgeoregister.nl/).
To facilitate the use of INSPIRE data for the professional GIS users in the Netherlands, a plugin has been developed for QGIS. This plugin makes it easy to find, consult and download the INSPIRE datasets and services directly via the National Georegister. Through the plugin, a user can search INSPIRE data by keyword, INSPIRE theme, organization or type of service and add the result directly to QGIS.
The INSPIRE QGIS plugin was created under the responsibility of Geonovum. Geonovum supports the Ministry of the Interior and Kingdom Relations and data providers with the introduction of INSPIRE in the Netherlands. The plugin has been developed by KGIS (http://kgis.be/).
If you have any questions about INSPIRE or the plugin, please visit https://www.geonovum.nl/geo-standaarden/inspire-europese-leefomgeving or submit them to the INSPIRE helpdesk ([email protected]).
"""

# noinspection PyPep8Naming
def classFactory(iface): # pylint: disable=invalid-name
"""Load inspireNL class from file inspireNL.
:param iface: A QGIS interface instance.
:type iface: QgsInterface
"""
#
from .inspireNL import inspireNL
return inspireNL(iface)
Loading

0 comments on commit e0560b9

Please sign in to comment.