-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1e2ed57
Showing
140 changed files
with
29,304 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
.idea | ||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# PyDev and Eclipse Settings | ||
.settings/ | ||
.pydevproject | ||
.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"Open Data Kärnten": "http://ckan.data.ktn.gv.at/api/3/", | ||
"Open Government Data Graz": "http://ckan.data.graz.gv.at/api/3/", | ||
"data.gv.at": "https://www.data.gv.at/katalog/api/3/", | ||
"European Data Portal": "http://www.europeandataportal.eu/data/en/api/3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
#/*************************************************************************** | ||
# CKAN-Browser | ||
# | ||
# Download and display CKAN enabled Open Data Portals | ||
# ------------------- | ||
# begin : 2014-10-24 | ||
# git sha : $Format:%H$ | ||
# copyright : (C) 2014 by BergWerk GIS | ||
# 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. * | ||
# * * | ||
# ***************************************************************************/ | ||
|
||
################################################# | ||
# Edit the following to match your sources lists | ||
################################################# | ||
|
||
|
||
#Add iso code for any locales you want to support here (space separated) | ||
LOCALES = CKANBrowser_en CKANBrowser_de | ||
|
||
# translation | ||
SOURCES = \ | ||
__init__.py \ | ||
ckan_browser.py \ | ||
ckan_browser_dialog.py | ||
|
||
PLUGINNAME = CKANBrowser | ||
|
||
PY_FILES = \ | ||
__init__.py \ | ||
ckanconnector.py \ | ||
ckan_browser.py \ | ||
ckan_browser_dialog.py \ | ||
ckan_browser_dialog_settings.py \ | ||
ckan_browser_dialog_disclaimer.py \ | ||
settings.py \ | ||
util.py | ||
|
||
UI_FILES = \ | ||
ckan_browser_dialog_base.ui \ | ||
ckan_browser_dialog_settings.ui \ | ||
ckan_browser_dialog_disclaimer.ui | ||
|
||
EXTRAS = \ | ||
icon.png \ | ||
icon-settings.png \ | ||
icon-copy.png \ | ||
ckan_logo_big.png \ | ||
metadata.txt \ | ||
CKAN_APIs.json | ||
|
||
COMPILED_RESOURCE_FILES = resources_rc.py | ||
|
||
|
||
################################################# | ||
# Normally you would not need to edit below here | ||
################################################# | ||
|
||
HELP = help/build/html | ||
|
||
PLUGIN_UPLOAD = $(c)/plugin_upload.py | ||
|
||
QGISDIR=.qgis2 | ||
|
||
default: compile | ||
|
||
compile: $(COMPILED_RESOURCE_FILES) | ||
|
||
%_rc.py : %.qrc | ||
pyrcc4 -o $*_rc.py $< | ||
|
||
%.qm : %.ts | ||
lrelease $< | ||
|
||
test: compile transcompile | ||
@echo | ||
@echo "----------------------" | ||
@echo "Regression Test Suite" | ||
@echo "----------------------" | ||
|
||
@# Preceding dash means that make will continue in case of errors | ||
@-export PYTHONPATH=`pwd`:$(PYTHONPATH); \ | ||
export QGIS_DEBUG=0; \ | ||
export QGIS_LOG_FILE=/dev/null; \ | ||
nosetests -v --with-id --with-coverage --cover-package=. \ | ||
3>&1 1>&2 2>&3 3>&- || true | ||
@echo "----------------------" | ||
@echo "If you get a 'no module named qgis.core error, try sourcing" | ||
@echo "the helper script we have provided first then run make test." | ||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make test" | ||
@echo "----------------------" | ||
|
||
deploy: compile doc transcompile | ||
@echo | ||
@echo "------------------------------------------" | ||
@echo "Deploying plugin to your .qgis2 directory." | ||
@echo "------------------------------------------" | ||
# The deploy target only works on unix like operating system where | ||
# the Python plugin directory is located at: | ||
# $HOME/$(QGISDIR)/python/plugins | ||
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 $(COMPILED_UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
cp -vfr request $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
cp -vfr pyperclip $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
#cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help | ||
|
||
# The dclean target removes compiled python files from plugin directory | ||
# also deletes any .svn entry | ||
dclean: | ||
@echo | ||
@echo "-----------------------------------" | ||
@echo "Removing any compiled python files." | ||
@echo "-----------------------------------" | ||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete | ||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".svn" -prune -exec rm -Rf {} \; | ||
|
||
|
||
derase: | ||
@echo | ||
@echo "-------------------------" | ||
@echo "Removing deployed plugin." | ||
@echo "-------------------------" | ||
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) | ||
|
||
zip: deploy dclean | ||
@echo | ||
@echo "---------------------------" | ||
@echo "Creating plugin zip bundle." | ||
@echo "---------------------------" | ||
# 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 $(CURDIR)/../$(PLUGINNAME).zip | ||
#rm -r $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help/ | ||
#rm -r $(CURDIR)/help/ | ||
cd $(HOME)/$(QGISDIR)/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 | ||
@echo | ||
@echo "------------------------------------" | ||
@echo "Exporting plugin to zip package. " | ||
@echo "------------------------------------" | ||
rm -f $(PLUGINNAME).zip | ||
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION) | ||
echo "Created package: $(PLUGINNAME).zip" | ||
|
||
upload: zip | ||
@echo | ||
@echo "-------------------------------------" | ||
@echo "Uploading plugin to QGIS Plugin repo." | ||
@echo "-------------------------------------" | ||
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip | ||
|
||
transup: | ||
@echo | ||
@echo "------------------------------------------------" | ||
@echo "Updating translation files with any new strings." | ||
@echo "------------------------------------------------" | ||
@chmod +x scripts/update-strings.sh | ||
@scripts/update-strings.sh $(LOCALES) | ||
|
||
transcompile: | ||
@echo | ||
@echo "----------------------------------------" | ||
@echo "Compiled translation files to .qm files." | ||
@echo "----------------------------------------" | ||
@chmod +x scripts/compile-strings.sh | ||
@scripts/compile-strings.sh $(LOCALES) | ||
|
||
transclean: | ||
@echo | ||
@echo "------------------------------------" | ||
@echo "Removing compiled translation files." | ||
@echo "------------------------------------" | ||
rm -f i18n/*.qm | ||
|
||
clean: | ||
@echo | ||
@echo "------------------------------------" | ||
@echo "Removing uic and rcc generated files" | ||
@echo "------------------------------------" | ||
rm $(COMPILED_UI_FILES) $(COMPILED_RESOURCE_FILES) | ||
|
||
doc: | ||
@echo | ||
@echo "------------------------------------" | ||
@echo "Building documentation using sphinx." | ||
@echo "------------------------------------" | ||
#cd help; make html | ||
|
||
pylint: | ||
@echo | ||
@echo "-----------------" | ||
@echo "Pylint violations" | ||
@echo "-----------------" | ||
@pylint --reports=n --rcfile=pylintrc . || true | ||
@echo | ||
@echo "----------------------" | ||
@echo "If you get a 'no module named qgis.core' error, try sourcing" | ||
@echo "the helper script we have provided first then run make pylint." | ||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make pylint" | ||
@echo "----------------------" | ||
|
||
|
||
# Run pep8 style checking | ||
#http://pypi.python.org/pypi/pep8 | ||
pep8: | ||
@echo | ||
@echo "-----------" | ||
@echo "PEP8 issues" | ||
@echo "-----------" | ||
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude pydev,resources_rc.py,conf.py . || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
/*************************************************************************** | ||
CKAN-Browser | ||
A QGIS plugin | ||
Download and display CKAN enabled Open Data Portals | ||
------------------- | ||
begin : 2014-10-24 | ||
git sha : $Format:%H$ | ||
copyright : (C) 2014 by BergWerk GIS | ||
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. * | ||
* * | ||
***************************************************************************/ | ||
""" | ||
|
||
|
||
# noinspection PyPep8Naming | ||
def classFactory(iface): # pylint: disable=invalid-name | ||
"""Load CKANBrowser class from file CKANBrowser. | ||
:param iface: A QGIS interface instance. | ||
:type iface: QgsInterface | ||
""" | ||
# | ||
from .ckan_browser import CKANBrowser | ||
return CKANBrowser(iface) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
make clean && make derase && make deploy && make zip |
Oops, something went wrong.