-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d73c22b
commit cc455a1
Showing
50 changed files
with
5,927 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,244 @@ | ||
#/*************************************************************************** | ||
# DownloadBoku | ||
# | ||
# This plugin downloads data from the Boku server. | ||
# ------------------- | ||
# begin : 2023-06-09 | ||
# git sha : $Format:%H$ | ||
# copyright : (C) 2023 by TBD | ||
# email : TBD | ||
# ***************************************************************************/ | ||
# | ||
#/*************************************************************************** | ||
# * * | ||
# * 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) | ||
# default is no locales | ||
# LOCALES = af | ||
LOCALES = | ||
|
||
# If locales are enabled, set the name of the lrelease binary on your system. If | ||
# you have trouble compiling the translations, you may have to specify the full path to | ||
# lrelease | ||
#LRELEASE = lrelease | ||
#LRELEASE = lrelease-qt4 | ||
|
||
|
||
# translation | ||
SOURCES = \ | ||
__init__.py \ | ||
download_boku.py download_boku_dialog.py | ||
|
||
PLUGINNAME = download_boku | ||
|
||
PY_FILES = \ | ||
__init__.py \ | ||
download_boku.py download_boku_dialog.py | ||
|
||
UI_FILES = download_boku_dialog_base.ui | ||
|
||
EXTRAS = metadata.txt icon.png | ||
|
||
EXTRA_DIRS = | ||
|
||
COMPILED_RESOURCE_FILES = resources.py | ||
|
||
PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui | ||
|
||
# QGISDIR points to the location where your plugin should be installed. | ||
# This varies by platform, relative to your HOME directory: | ||
# * Linux: | ||
# .local/share/QGIS/QGIS3/profiles/default/python/plugins/ | ||
# * Mac OS X: | ||
# Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins | ||
# * Windows: | ||
# AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins' | ||
|
||
QGISDIR=C:\Users\whisp\AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins | ||
|
||
################################################# | ||
# Normally you would not need to edit below here | ||
################################################# | ||
|
||
HELP = help/build/html | ||
|
||
PLUGIN_UPLOAD = $(c)/plugin_upload.py | ||
|
||
RESOURCE_SRC=$(shell grep '^ *<file' resources.qrc | sed 's@</file>@@g;s/.*>//g' | tr '\n' ' ') | ||
|
||
.PHONY: default | ||
default: | ||
@echo While you can use make to build and deploy your plugin, pb_tool | ||
@echo is a much better solution. | ||
@echo A Python script, pb_tool provides platform independent management of | ||
@echo your plugins and runs anywhere. | ||
@echo You can install pb_tool using: pip install pb_tool | ||
@echo See https://g-sherman.github.io/plugin_build_tool/ for info. | ||
|
||
compile: $(COMPILED_RESOURCE_FILES) | ||
|
||
%.py : %.qrc $(RESOURCES_SRC) | ||
pyrcc5 -o $*.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_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 $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help | ||
# Copy extra directories if any | ||
(foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;) | ||
|
||
|
||
# The dclean target removes compiled python files from plugin directory | ||
# also deletes any .git 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 ".git" -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 $(PLUGINNAME).zip | ||
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 $(LRELEASE) $(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 $(PEP8EXCLUDE) . || true | ||
@echo "-----------" | ||
@echo "Ignored in PEP8 check:" | ||
@echo $(PEP8EXCLUDE) |
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,42 @@ | ||
<html> | ||
<body> | ||
<h3>Plugin Builder Results</h3> | ||
|
||
Congratulations! You just built a plugin for QGIS!<br/><br /> | ||
|
||
<div id='help' style='font-size:.9em;'> | ||
Your plugin <b>DownloadBoku</b> was created in:<br> | ||
<b>C:/Users/whisp/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins\download_boku</b> | ||
<p> | ||
Your QGIS plugin directory is located at:<br> | ||
<b>C:/Users/whisp/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins</b> | ||
<p> | ||
<h3>What's Next</h3> | ||
<ol> | ||
<li>If resources.py is not present in your plugin directory, compile the resources file using pyrcc5 (simply use <b>pb_tool</b> or <b>make</b> if you have automake) | ||
<li>Optionally, test the generated sources using <b>make test</b> (or run tests from your IDE) | ||
<li>Copy the entire directory containing your new plugin to the QGIS plugin directory (see Notes below) | ||
<li>Test the plugin by enabling it in the QGIS plugin manager | ||
<li>Customize it by editing the implementation file <b>download_boku.py</b> | ||
<li>Create your own custom icon, replacing the default <b>icon.png</b> | ||
<li>Modify your user interface by opening <b>download_boku_dialog_base.ui</b> in Qt Designer | ||
</ol> | ||
Notes: | ||
<ul> | ||
<li>You can use <b>pb_tool</b> to compile, deploy, and manage your plugin. Tweak the <i>pb_tool.cfg</i> file included with your plugin as you add files. Install <b>pb_tool</b> using | ||
<i>pip</i> or <i>easy_install</i>. See <b>http://loc8.cc/pb_tool</b> for more information. | ||
<li>You can also use the <b>Makefile</b> to compile and deploy when you | ||
make changes. This requires GNU make (gmake). The Makefile is ready to use, however you | ||
will have to edit it to add addional Python source files, dialogs, and translations. | ||
</ul> | ||
</div> | ||
<div style='font-size:.9em;'> | ||
<p> | ||
For information on writing PyQGIS code, see <b>http://loc8.cc/pyqgis_resources</b> for a list of resources. | ||
</p> | ||
</div> | ||
<p> | ||
©2011-2019 GeoApt LLC - geoapt.com | ||
</p> | ||
</body> | ||
</html> |
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,32 @@ | ||
Plugin Builder Results | ||
|
||
Your plugin DownloadBoku was created in: | ||
C:/Users/whisp/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins\download_boku | ||
|
||
Your QGIS plugin directory is located at: | ||
C:/Users/whisp/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins | ||
|
||
What's Next: | ||
|
||
* Copy the entire directory containing your new plugin to the QGIS plugin | ||
directory | ||
|
||
* Compile the resources file using pyrcc5 | ||
|
||
* Run the tests (``make test``) | ||
|
||
* Test the plugin by enabling it in the QGIS plugin manager | ||
|
||
* Customize it by editing the implementation file: ``download_boku.py`` | ||
|
||
* Create your own custom icon, replacing the default icon.png | ||
|
||
* Modify your user interface by opening DownloadBoku_dialog_base.ui in Qt Designer | ||
|
||
* You can use the Makefile to compile your Ui and resource files when | ||
you make changes. This requires GNU make (gmake) | ||
|
||
For more information, see the PyQGIS Developer Cookbook at: | ||
http://www.qgis.org/pyqgis-cookbook/index.html | ||
|
||
(C) 2011-2018 GeoApt LLC - geoapt.com |
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,36 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
/*************************************************************************** | ||
DownloadBoku | ||
A QGIS plugin | ||
This plugin downloads data from the Boku server. | ||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ | ||
------------------- | ||
begin : 2023-06-09 | ||
copyright : (C) 2023 by TBD | ||
email : TBD | ||
git sha : $Format:%H$ | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* 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. | ||
""" | ||
|
||
|
||
# noinspection PyPep8Naming | ||
def classFactory(iface): # pylint: disable=invalid-name | ||
"""Load DownloadBoku class from file DownloadBoku. | ||
:param iface: A QGIS interface instance. | ||
:type iface: QgsInterface | ||
""" | ||
# | ||
from .download_boku import DownloadBoku | ||
return DownloadBoku(iface) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.