Skip to content

Commit 2068637

Browse files
author
ricckli
committed
test
1 parent 1be5ae7 commit 2068637

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1522
-0
lines changed

Makefile

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#/***************************************************************************
2+
# qgis2leaf
3+
#
4+
# Exports a QGIS Project to a working leaflet webmap
5+
# -------------------
6+
# begin : 2014-04-20
7+
# copyright : (C) 2014 by Riccardo Klinger, Geolicious
8+
9+
# ***************************************************************************/
10+
#
11+
#/***************************************************************************
12+
# * *
13+
# * This program is free software; you can redistribute it and/or modify *
14+
# * it under the terms of the GNU General Public License as published by *
15+
# * the Free Software Foundation; either version 2 of the License, or *
16+
# * (at your option) any later version. *
17+
# * *
18+
# ***************************************************************************/
19+
20+
# CONFIGURATION
21+
PLUGIN_UPLOAD = $(CURDIR)/plugin_upload.py
22+
23+
QGISDIR=.qgis2
24+
25+
# Makefile for a PyQGIS plugin
26+
27+
# translation
28+
SOURCES = qgis2leaf.py ui_qgis2leaf.py __init__.py qgis2leafdialog.py
29+
#TRANSLATIONS = i18n/qgis2leaf_en.ts
30+
TRANSLATIONS =
31+
32+
# global
33+
34+
PLUGINNAME = qgis2leaf
35+
36+
PY_FILES = qgis2leaf.py qgis2leafdialog.py __init__.py
37+
38+
EXTRAS = icon.png metadata.txt
39+
40+
UI_FILES = ui_qgis2leaf.py
41+
42+
RESOURCE_FILES = resources_rc.py
43+
44+
HELP = help/build/html
45+
46+
default: compile
47+
48+
compile: $(UI_FILES) $(RESOURCE_FILES)
49+
50+
%_rc.py : %.qrc
51+
pyrcc4 -o $*_rc.py $<
52+
53+
%.py : %.ui
54+
pyuic4 -o $@ $<
55+
56+
%.qm : %.ts
57+
lrelease $<
58+
59+
# The deploy target only works on unix like operating system where
60+
# the Python plugin directory is located at:
61+
# $HOME/$(QGISDIR)/python/plugins
62+
deploy: compile doc transcompile
63+
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
64+
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
65+
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
66+
cp -vf $(RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
67+
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
68+
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
69+
cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help
70+
71+
# The dclean target removes compiled python files from plugin directory
72+
# also delets any .svn entry
73+
dclean:
74+
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
75+
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".svn" -prune -exec rm -Rf {} \;
76+
77+
# The derase deletes deployed plugin
78+
derase:
79+
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
80+
81+
# The zip target deploys the plugin and creates a zip file with the deployed
82+
# content. You can then upload the zip file on http://plugins.qgis.org
83+
zip: deploy dclean
84+
rm -f $(PLUGINNAME).zip
85+
cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)
86+
87+
# Create a zip package of the plugin named $(PLUGINNAME).zip.
88+
# This requires use of git (your plugin development directory must be a
89+
# git repository).
90+
# To use, pass a valid commit or tag as follows:
91+
# make package VERSION=Version_0.3.2
92+
package: compile
93+
rm -f $(PLUGINNAME).zip
94+
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
95+
echo "Created package: $(PLUGINNAME).zip"
96+
97+
upload: zip
98+
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip
99+
100+
# transup
101+
# update .ts translation files
102+
transup:
103+
pylupdate4 Makefile
104+
105+
# transcompile
106+
# compile translation files into .qm binary format
107+
transcompile: $(TRANSLATIONS:.ts=.qm)
108+
109+
# transclean
110+
# deletes all .qm files
111+
transclean:
112+
rm -f i18n/*.qm
113+
114+
clean:
115+
rm $(UI_FILES) $(RESOURCE_FILES)
116+
117+
# build documentation with sphinx
118+
doc:
119+
cd help; make html

README.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<html>
2+
<body style='background-color:##D7ECF8;'>
3+
<h3>Plugin Builder Results</h3>
4+
<div id='help' style='font-size:.9em;'>
5+
Your plugin <b>qgis2leaf</b> was created in:<br>
6+
&nbsp;&nbsp;<b>/home/ricckli/qgis_plugin/qgis2leaf</b>
7+
<p>
8+
Your QGIS plugin directory is located at:<br>
9+
&nbsp;&nbsp;<b>/home/ricckli/.qgis2/python/plugins</b>
10+
<p>
11+
<b>What's Next</b>
12+
<ol>
13+
<li>Copy the entire directory containing your new plugin to the QGIS plugin directory
14+
<li>Compile the ui file using pyuic4
15+
<li>Compile the resources file using pyrcc4
16+
<li>Test the plugin by enabling it in the QGIS plugin manager
17+
<li>Customize it by editing the implementation file <b>qgis2leaf.py</b>
18+
<li>Create your own custom icon, replacing the default <b>icon.png</b>
19+
<li>Modify your user interface by opening <b>qgis2leaf.ui</b> in Qt Designer (don't forget to compile it with pyuic4 after changing it)
20+
<li>You can use the <b>Makefile</b> to compile your Ui and resource files when you make changes. This requires GNU make (gmake)
21+
</ul>
22+
</div>
23+
<div style='font-size:.9em;'>
24+
<p>
25+
For more information, see the PyQGIS Developer Cookbook at:
26+
<a href="http://www.qgis.org/pyqgis-cookbook/index.html">http://www.qgis.org/pyqgis-cookbook/index.html</a>.
27+
</p>
28+
</div>
29+
<img src="http://geoapt.com/geoapt_logo_p.png" alt='GeoApt LLC' title='GeoApt LLC' align='absmiddle'>
30+
&copy;2011-2014 GeoApt LLC - geoapt.com
31+
</body>
32+
</html>

README.txt

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Plugin Builder Results
2+
3+
Your plugin qgis2leaf was created in:
4+
/home/ricckli/qgis_plugin/qgis2leaf
5+
6+
Your QGIS plugin directory is located at:
7+
/home/ricckli/.qgis2/python/plugins
8+
9+
What's Next:
10+
11+
* Copy the entire directory containing your new plugin to the QGIS plugin
12+
directory
13+
14+
* Compile the ui file using pyuic4
15+
16+
* Compile the resources file using pyrcc4
17+
18+
* Test the plugin by enabling it in the QGIS plugin manager
19+
20+
* Customize it by editing the implementation file:
21+
qgis2leaf.py
22+
23+
* Create your own custom icon, replacing the default icon.png
24+
25+
* Modify your user interface by opening qgis2leaf.ui
26+
in Qt Designer (don't forget to compile it with pyuic4 after changing it)
27+
28+
* You can use the Makefile to compile your Ui and resource files when
29+
you make changes. This requires GNU make (gmake)
30+
31+
For more information, see the PyQGIS Developer Cookbook at:
32+
http://www.qgis.org/pyqgis-cookbook/index.html
33+
34+
(C) 2011-2014 GeoApt LLC - geoapt.com

__init__.py

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
/***************************************************************************
4+
qgis2leaf
5+
A QGIS plugin
6+
Exports a QGIS Project to a working leaflet webmap
7+
-------------------
8+
begin : 2014-04-20
9+
copyright : (C) 2014 by Riccardo Klinger, Geolicious
10+
11+
***************************************************************************/
12+
13+
/***************************************************************************
14+
* *
15+
* This program is free software; you can redistribute it and/or modify *
16+
* it under the terms of the GNU General Public License as published by *
17+
* the Free Software Foundation; either version 2 of the License, or *
18+
* (at your option) any later version. *
19+
* *
20+
***************************************************************************/
21+
This script initializes the plugin, making it known to QGIS.
22+
"""
23+
def name():
24+
return "PCA"
25+
26+
27+
def description():
28+
return "Principal Component Analysis for rasters"
29+
30+
31+
def version():
32+
return "Version 0.2"
33+
34+
35+
def icon():
36+
return "icon.png"
37+
38+
39+
def qgisMinimumVersion():
40+
return "2.0"
41+
42+
def author():
43+
return "Stavros Georgousis"
44+
45+
def email():
46+
47+
48+
def classFactory(iface):
49+
# load qgis2leaf class from file qgis2leaf
50+
from qgis2leaf import qgis2leaf
51+
return qgis2leaf(iface)

__init__.pyc

2.71 KB
Binary file not shown.

help/Makefile

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = build
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
14+
15+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
16+
17+
help:
18+
@echo "Please use \`make <target>' where <target> is one of"
19+
@echo " html to make standalone HTML files"
20+
@echo " dirhtml to make HTML files named index.html in directories"
21+
@echo " singlehtml to make a single large HTML file"
22+
@echo " pickle to make pickle files"
23+
@echo " json to make JSON files"
24+
@echo " htmlhelp to make HTML files and a HTML help project"
25+
@echo " qthelp to make HTML files and a qthelp project"
26+
@echo " devhelp to make HTML files and a Devhelp project"
27+
@echo " epub to make an epub"
28+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
30+
@echo " text to make text files"
31+
@echo " man to make manual pages"
32+
@echo " changes to make an overview of all changed/added/deprecated items"
33+
@echo " linkcheck to check all external links for integrity"
34+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
35+
36+
clean:
37+
-rm -rf $(BUILDDIR)/*
38+
39+
html:
40+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41+
@echo
42+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43+
44+
dirhtml:
45+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
46+
@echo
47+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
48+
49+
singlehtml:
50+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
51+
@echo
52+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
53+
54+
pickle:
55+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
56+
@echo
57+
@echo "Build finished; now you can process the pickle files."
58+
59+
json:
60+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
61+
@echo
62+
@echo "Build finished; now you can process the JSON files."
63+
64+
htmlhelp:
65+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
66+
@echo
67+
@echo "Build finished; now you can run HTML Help Workshop with the" \
68+
".hhp project file in $(BUILDDIR)/htmlhelp."
69+
70+
qthelp:
71+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
72+
@echo
73+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
74+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
75+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/templateclass.qhcp"
76+
@echo "To view the help file:"
77+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/templateclass.qhc"
78+
79+
devhelp:
80+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
81+
@echo
82+
@echo "Build finished."
83+
@echo "To view the help file:"
84+
@echo "# mkdir -p $$HOME/.local/share/devhelp/templateclass"
85+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/templateclass"
86+
@echo "# devhelp"
87+
88+
epub:
89+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
90+
@echo
91+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
92+
93+
latex:
94+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
95+
@echo
96+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
97+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
98+
"(use \`make latexpdf' here to do that automatically)."
99+
100+
latexpdf:
101+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102+
@echo "Running LaTeX files through pdflatex..."
103+
make -C $(BUILDDIR)/latex all-pdf
104+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
105+
106+
text:
107+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
108+
@echo
109+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
110+
111+
man:
112+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113+
@echo
114+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115+
116+
changes:
117+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
118+
@echo
119+
@echo "The overview file is in $(BUILDDIR)/changes."
120+
121+
linkcheck:
122+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
123+
@echo
124+
@echo "Link check complete; look for any errors in the above output " \
125+
"or in $(BUILDDIR)/linkcheck/output.txt."
126+
127+
doctest:
128+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129+
@echo "Testing of doctests in the sources finished, look at the " \
130+
"results in $(BUILDDIR)/doctest/output.txt."

0 commit comments

Comments
 (0)