Skip to content

Commit

Permalink
Update template files
Browse files Browse the repository at this point in the history
  • Loading branch information
nclavaud committed Nov 1, 2016
1 parent e7b9f94 commit 2db97b0
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 101 deletions.
4 changes: 1 addition & 3 deletions .classpath
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="bin" path="src"/> <classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
<classpathentry kind="lib" path="/home/nico/workspace/libs/processing2/core.jar"/>
<classpathentry kind="output" path="resources/code"/> <classpathentry kind="output" path="resources/code"/>
</classpath> </classpath>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1 +1,3 @@
bin
tmp
distribution distribution
6 changes: 3 additions & 3 deletions data/README
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
the data folder: the data folder:
If your library is using files like images, sound files, If your Library is using files like images, sound files,
any data file, etc., put them into the data folder. any data file, etc., put them into the data folder.
When coding your library you can use processing's internal loading When coding your Library you can use processing's internal loading
functions like loadImage(), loadStrings(), etc. to load files functions like loadImage(), loadStrings(), etc. to load files
located inside the data folder into your library. located inside the data folder into your Library.


26 changes: 12 additions & 14 deletions license.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,20 +1,18 @@
A code template to build libraries for the Processing programming environment. A template to build a Library for the Processing programming environment.


Part of the Processing project - http://processing.org Part of the Processing project - http://processing.org


Copyright (c) 2011-12 Elie Zananiri Copyright 2011-2015 Elie Zananiri
Copyright (c) 2008-11 Andreas Schlegel Copyright 2008-2011 Andreas Shlegel


This program is free software; you can redistribute it and/or Licensed under the Apache License, Version 2.0 (the "License");
modify it under the terms of the GNU General Public License you may not use this file except in compliance with the License.
as published by the Free Software Foundation; either version 2 You may obtain a copy of the License at
of the License, or (at your option) any later version.


This program is distributed in the hope that it will be useful, http://www.apache.org/licenses/LICENSE-2.0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


You should have received a copy of the GNU General Public License Unless required by applicable law or agreed to in writing, software
along with this program; if not, write to the Free Software distributed under the License is distributed on an "AS IS" BASIS,
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
38 changes: 38 additions & 0 deletions resources/README.md
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,38 @@
## How to install ##library.name##

### Install with the Contribution Manager

Add contributed Libraries by selecting the menu item _Sketch__Import Library...__Add Library..._ This will open the Contribution Manager, where you can browse for ##library.name##, or any other Library you want to install.

Not all available Libraries have been converted to show up in this menu. If a Library isn't there, it will need to be installed manually by following the instructions below.

### Manual Install

Contributed Libraries may be downloaded separately and manually placed within the `libraries` folder of your Processing sketchbook. To find (and change) the Processing sketchbook location on your computer, open the Preferences window from the Processing application (PDE) and look for the "Sketchbook location" item at the top.

By default the following locations are used for your sketchbook folder:
* For Mac users, the sketchbook folder is located inside `~/Documents/Processing`
* For Windows users, the sketchbook folder is located inside `My Documents/Processing`

Download ##library.name## from ##library.url##

Unzip and copy the contributed Library's folder into the `libraries` folder in the Processing sketchbook. You will need to create this `libraries` folder if it does not exist.

The folder structure for Library ##library.name## should be as follows:

```
Processing
libraries
##library.name##
examples
library
##library.name##.jar
reference
src
```
Some folders like `examples` or `src` might be missing. After Library ##library.name## has been successfully installed, restart the Processing application.

### Troubleshooting

If you're having trouble, have a look at the [Processing Wiki](https://github.com/processing/processing/wiki/How-to-Install-a-Contributed-Library) for more information, or contact the author [##author.name##](##author.url##).
21 changes: 12 additions & 9 deletions resources/build.xml
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
<project name="ProcessingLibs" default="clean" basedir="../"> <project name="Processing Library" default="clean" basedir="../">




<!-- <!--
Expand Down Expand Up @@ -52,8 +52,8 @@
<property name="project.reference" location="reference"/> <property name="project.reference" location="reference"/>
<property name="project.dist" location="distribution"/> <property name="project.dist" location="distribution"/>
<property name="project.dist.version" location="distribution/${project.name}-${library.version}"/> <property name="project.dist.version" location="distribution/${project.name}-${library.version}"/>
<property name="install.source" location="resources/install_instructions.txt"/> <property name="install.source" location="resources/README.md"/>
<property name="install.destination" location="${project.dist.version}/INSTALL.txt"/> <property name="install.destination" location="${project.dist.version}/README.md"/>
<property name="libprops.source" location="resources/library.properties"/> <property name="libprops.source" location="resources/library.properties"/>


<taskdef resource="net/sf/antcontrib/antcontrib.properties"> <taskdef resource="net/sf/antcontrib/antcontrib.properties">
Expand All @@ -78,7 +78,7 @@


<target name="init"> <target name="init">
<echo>${line} <echo>${line}
Building the Processing library ${project.name} ${library.version} Building the Processing Library ${project.name} ${library.version}
${line} ${line}
src path ${project.src} src path ${project.src}
bin path ${project.bin} bin path ${project.bin}
Expand Down Expand Up @@ -209,8 +209,8 @@ ${line}




<target name="generate.javadoc" if="is.normal"> <target name="generate.javadoc" if="is.normal">
<!-- create the java reference of the library --> <!-- create the java reference of the Library -->
<javadoc bottom="Processing library ${project.name} by ${author.name}. ${library.copyright}" <javadoc bottom="Processing Library ${project.name} by ${author.name}. ${library.copyright}"
classpath="${classpath.local.location}/core.jar;{project.bin}" classpath="${classpath.local.location}/core.jar;{project.bin}"
destdir="${project.tmp}/${project.name}/reference" destdir="${project.tmp}/${project.name}/reference"
verbose="false" verbose="false"
Expand Down Expand Up @@ -271,8 +271,11 @@ ${line}
<replaceregexp file="${file}" match="##library.version##" replace="${library.version}" flags="g" /> <replaceregexp file="${file}" match="##library.version##" replace="${library.version}" flags="g" />
<replaceregexp file="${file}" match="##library.prettyVersion##" replace="${library.prettyVersion}" flags="g" /> <replaceregexp file="${file}" match="##library.prettyVersion##" replace="${library.prettyVersion}" flags="g" />


<replaceregexp file="${file}" match="##compatible.minRevision##" replace="${compatible.minRevision}" flags="g" />
<replaceregexp file="${file}" match="##compatible.maxRevision##" replace="${compatible.maxRevision}" flags="g" />

<replaceregexp file="${file}" match="##library.url##" replace="${library.url}" flags="g" /> <replaceregexp file="${file}" match="##library.url##" replace="${library.url}" flags="g" />
<replaceregexp file="${file}" match="##library.category##" replace="${library.category}" flags="g" /> <replaceregexp file="${file}" match="##library.categories##" replace="${library.categories}" flags="g" />
<replaceregexp file="${file}" match="##library.sentence##" replace="${library.sentence}" flags="g" /> <replaceregexp file="${file}" match="##library.sentence##" replace="${library.sentence}" flags="g" />
<replaceregexp file="${file}" match="##library.paragraph##" replace="${library.paragraph}" flags="g" /> <replaceregexp file="${file}" match="##library.paragraph##" replace="${library.paragraph}" flags="g" />
<replaceregexp file="${file}" match="##library.keywords##" replace="${library.keywords}" flags="g" /> <replaceregexp file="${file}" match="##library.keywords##" replace="${library.keywords}" flags="g" />
Expand All @@ -289,15 +292,15 @@ ${line}




<target name="generate.install.library" if="is.normal"> <target name="generate.install.library" if="is.normal">
<copy file="${install.source}" tofile="${project.dist.version}/INSTALL.txt" /> <copy file="${install.source}" tofile="${install.destination}" />


<antcall target="parse.file"><param name="file" value="${install.destination}"/></antcall> <antcall target="parse.file"><param name="file" value="${install.destination}"/></antcall>
</target> </target>






<target name="generate.zip" if="is.normal"> <target name="generate.zip" if="is.normal">
<!-- zip the distribution of the library --> <!-- zip the distribution of the Library -->


<move todir="${project.dist.version}/tmp/${project.name}"> <move todir="${project.dist.version}/tmp/${project.name}">
<fileset dir="${project.dist.version}/${project.name}" /> <fileset dir="${project.dist.version}/${project.name}" />
Expand Down
6 changes: 3 additions & 3 deletions resources/code/doc.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,10 @@
# a shell script to create a java documentation # a shell script to create a java documentation
# for a processing library. # for a processing Library.
# #
# make changes to the variables below so they # make changes to the variables below so they
# fit the structure of your library # fit the structure of your Library


# the package name of your library # the package name of your Library
package=template; package=template;


# source folder location # source folder location
Expand Down
46 changes: 0 additions & 46 deletions resources/install_instructions.txt

This file was deleted.

40 changes: 24 additions & 16 deletions resources/library.properties
Original file line number Original file line Diff line number Diff line change
@@ -1,49 +1,57 @@
# More on this file here: https://github.com/processing/processing/wiki/Library-Basics # More on this file here: https://github.com/processing/processing/wiki/Library-Basics
# UTF-8 supported. # UTF-8 supported.


# The name of your library as you want it formatted. # The name of your Library as you want it formatted.
name = ##library.name## name = ##library.name##


# List of authors. Links can be provided using the syntax [author name](url). # List of authors. Links can be provided using the syntax [author name](url).
authorList = [##author.name##](##author.url##) authors = [##author.name##](##author.url##)


# A web page for your library, NOT a direct link to where to download it. # A web page for your Library, NOT a direct link to where to download it.
url = ##library.url## url = ##library.url##


# The category of your library, must be one (or many) of the following: # The category (or categories) of your Library, must be from the following list:
# "3D" "Animation" "Compilations" "Data" # "3D" "Animation" "Compilations" "Data"
# "Fabrication" "Geometry" "GUI" "Hardware" # "Fabrication" "Geometry" "GUI" "Hardware"
# "I/O" "Language" "Math" "Simulation" # "I/O" "Language" "Math" "Simulation"
# "Sound" "Utilities" "Typography" "Video & Vision" # "Sound" "Utilities" "Typography" "Video & Vision"
# #
# If a value other than those listed is used, your library will listed as # If a value other than those listed is used, your Library will listed as
# "Other". # "Other". Many categories must be comma-separated.
category = ##library.category## categories = ##library.categories##


# A short sentence (or fragment) to summarize the library's function. This will # A short sentence (or fragment) to summarize the Library's function. This will
# be shown from inside the PDE when the library is being installed. Avoid # be shown from inside the PDE when the Library is being installed. Avoid
# repeating the name of your library here. Also, avoid saying anything redundant # repeating the name of your Library here. Also, avoid saying anything redundant
# like mentioning that it's a library. This should start with a capitalized # like mentioning that it's a Library. This should start with a capitalized
# letter, and end with a period. # letter, and end with a period.
sentence = ##library.sentence## sentence = ##library.sentence##


# Additional information suitable for the Processing website. The value of # Additional information suitable for the Processing website. The value of
# 'sentence' always will be prepended, so you should start by writing the # 'sentence' always will be prepended, so you should start by writing the
# second sentence here. If your library only works on certain operating systems, # second sentence here. If your Library only works on certain operating systems,
# mention it here. # mention it here.
paragraph = ##library.paragraph## paragraph = ##library.paragraph##


# Links in the 'sentence' and 'paragraph' attributes can be inserted using the # Links in the 'sentence' and 'paragraph' attributes can be inserted using the
# same syntax as for authors. # same syntax as for authors.
# That is, [here is a link to Processing](http://processing.org/) # That is, [here is a link to Processing](http://processing.org/)



# A version number that increments once with each release. This is used to # A version number that increments once with each release. This is used to
# compare different versions of the same library, and check if an update is # compare different versions of the same Library, and check if an update is
# available. You should think of it as a counter, counting the total number of # available. You should think of it as a counter, counting the total number of
# releases you've had. # releases you've had.
version = ##library.version## # This must be parsable as an int version = ##library.version## # This must be parsable as an int


# The version as the user will see it. If blank, the version attribute will be # The version as the user will see it. If blank, the version attribute will be
# used here. # used here. This should be a single word, with no spaces.
prettyVersion = ##library.prettyVersion## # This is treated as a String prettyVersion = ##library.prettyVersion## # This is treated as a String

# The min and max revision of Processing compatible with your Library.
# Note that these fields use the revision and not the version of Processing,
# parsable as an int. For example, the revision number for 2.2.1 is 227.
# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
# Only use maxRevision (or minRevision), when your Library is known to
# break in a later (or earlier) release. Otherwise, use the default value 0.
minRevision = ##compatible.minRevision##
maxRevision = ##compatible.maxRevision##
14 changes: 7 additions & 7 deletions web/index.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
<title>##library.name##</title> <title>##library.name##</title>
<meta name="description" content="A library for the Processing programming environment" /> <meta name="description" content="A Library for the Processing programming environment" />
<meta name="keywords" content="processing.org, library, ##library.keywords##" /> <meta name="keywords" content="processing.org, library, ##library.keywords##" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Language" content="en-us" />
Expand Down Expand Up @@ -41,14 +41,14 @@ <h1>##library.name##</h1>
<div id="about"> <div id="about">
<h2>##library.name##</h2> <h2>##library.name##</h2>
<p> <p>
A library by <a href="##author.url##">##author.name##</a> for the <a href="http://www.processing.org" target="_blank">Processing</a> programming environment.<br> A Library by <a href="##author.url##">##author.name##</a> for the <a href="http://www.processing.org" target="_blank">Processing</a> programming environment.<br>
Last update, ##date##. Last update, ##date##.
</p> </p>
<p> <p>
##library.sentence##<br> ##library.sentence##<br>
##library.paragraph##<br> ##library.paragraph##<br>
Feel free to replace this paragraph with a description of the library.<br> Feel free to replace this paragraph with a description of the Library.<br>
Contributed libraries are developed, documented, and maintained by members of the Processing community. Further directions are included with each library. For feedback and support, please post to the Discourse. We strongly encourage all libraries to be open source, but not all of them are. Contributed Libraries are developed, documented, and maintained by members of the Processing community. Further directions are included with each Library. For feedback and support, please post to the Discourse. We strongly encourage all Libraries to be open source, but not all of them are.
</p> </p>
</div> </div>


Expand Down Expand Up @@ -86,13 +86,13 @@ <h2>Examples</h2>
<div id="info"> <div id="info">
<h2>Tested</h2> <h2>Tested</h2>
<p> <p>
<!-- on which platform has the library been tested? --> <!-- on which platform has the Library been tested? -->
<strong>Platform</strong> ##tested.platform## <strong>Platform</strong> ##tested.platform##


<!-- which processing version did you use for testing your library? --> <!-- which processing version did you use for testing your Library? -->
<br /><strong>Processing</strong> ##tested.processingVersion## <br /><strong>Processing</strong> ##tested.processingVersion##


<!-- does your library depend on any other library or framework? --> <!-- does your Library depend on any other Library or framework? -->
<br /><strong>Dependencies</strong> ##library.dependencies## <br /><strong>Dependencies</strong> ##library.dependencies##
</p> </p>
</div> </div>
Expand Down

0 comments on commit 2db97b0

Please sign in to comment.