Add new externals, rename addons plural

* openHABian USAGE
* alexa-skill USAGE
* mycroft-skill USAGE
* HABPanel config article

persistence -> persistences
io -> ios

Many minor changes to articles

Signed-off-by: Thomas Dietrich <thomas.dietrich@tu-ilmenau.de>
pull/532/merge
Thomas Dietrich 2017-09-24 16:37:53 +02:00 committed by Kai Kreuzer
parent 91ee75d821
commit f0487deb5d
8 changed files with 119 additions and 35 deletions

View File

@ -7,7 +7,7 @@ twitter_username: openhab
github_username: openhab github_username: openhab
# Build settings # Build settings
markdown: kramdown markdown: kramdown
exclude: ["CNAME", "pom.xml", "README.md", "CONTRIBUTING.md", "process_addons.groovy", "update.sh", "Vagrantfile"] exclude: ["CNAME", "pom.xml", "README.md", "CONTRIBUTING.md", "process_addons.groovy", "update-external-resources.sh", "Vagrantfile"]
# Additional gems for sitemap generation # Additional gems for sitemap generation
plugins: plugins:
- jekyll-sitemap - jekyll-sitemap
@ -21,10 +21,10 @@ collections:
addons_iconsets: addons_iconsets:
output: true output: true
permalink: /addons/iconsets/:path:output_ext permalink: /addons/iconsets/:path:output_ext
addons_io: addons_ios:
output: true output: true
permalink: /addons/io/:path:output_ext permalink: /addons/ios/:path:output_ext
addons_persistence: addons_persistences:
output: true output: true
permalink: /addons/persistence/:path:output_ext permalink: /addons/persistence/:path:output_ext
addons_transformations: addons_transformations:
@ -58,13 +58,13 @@ defaults:
- -
scope: scope:
path: "" path: ""
type: addons_io type: addons_ios
values: values:
layout: addon layout: addon
- -
scope: scope:
path: "" path: ""
type: addons_persistence type: addons_persistences
values: values:
layout: addon layout: addon
- -

View File

@ -53,6 +53,7 @@
<li><a href="{{docu}}/configuration/packages.html">Initial Setup Packages</a></li> <li><a href="{{docu}}/configuration/packages.html">Initial Setup Packages</a></li>
<li><a href="{{docu}}/configuration/paperui.html">Paper UI</a></li> <li><a href="{{docu}}/configuration/paperui.html">Paper UI</a></li>
<li><a href="{{docu}}/configuration/habmin.html">HABmin</a></li> <li><a href="{{docu}}/configuration/habmin.html">HABmin</a></li>
<li><a href="{{docu}}/configuration/habpanel.html">HABPanel</a></li>
<li><a href="{{docu}}/configuration/rules-ng.html">Rules (Experimental)</a></li> <li><a href="{{docu}}/configuration/rules-ng.html">Rules (Experimental)</a></li>
<li><a href="{{docu}}/configuration/editors.html">Editors</a></li> <li><a href="{{docu}}/configuration/editors.html">Editors</a></li>
<hr /> <hr />
@ -95,7 +96,7 @@
<ul> <ul>
<li><a href="{{docu}}/addons/persistence.html">Overview</a></li> <li><a href="{{docu}}/addons/persistence.html">Overview</a></li>
<hr /> <hr />
{% for persistence in site.addons_persistence %} {% for persistence in site.addons_persistences %}
{% if persistence.install == "auto" or persistence.id == page.id and page.install == "manual" %} {% if persistence.install == "auto" or persistence.id == page.id and page.install == "manual" %}
<li><a href="{{ persistence.url }}">{{ persistence.label }}</a></li> <li><a href="{{ persistence.url }}">{{ persistence.label }}</a></li>
{% endif %} {% endif %}
@ -136,7 +137,7 @@
<ul> <ul>
<li><a href="{{docu}}/addons/io.html">Overview</a></li> <li><a href="{{docu}}/addons/io.html">Overview</a></li>
<hr /> <hr />
{% for io in site.addons_io %} {% for io in site.addons_ios %}
<li><a href="{{ io.url }}">{{ io.label }}</a></li> <li><a href="{{ io.url }}">{{ io.label }}</a></li>
{% endfor %} {% endfor %}
<hr /> <hr />

View File

@ -1,11 +1,11 @@
--- ---
layout: documentation layout: documentation
title: System Integration title: System Integrations
--- ---
{% include base.html %} {% include base.html %}
# System Integration # System Integrations
openHAB supports services that enable integration with various technologies that don't fall into other add-on categories. openHAB supports services that enable integration with various technologies that don't fall into other add-on categories.
@ -39,8 +39,9 @@ openHAB supports services that enable integration with various technologies that
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for io in site.addons_io %} {% for io in site.addons_ios %}
<tr class="install-{{io.install}} since-{{io.since}}"> <!-- <tr class="install-{{io.install}} since-{{io.since}}"> -->
<tr>
<td> <td>
<h4><a href="{{io.url}}">{% if io.logo %}<img class="logo" src="{{base}}/{{io.logo}}" title="{{ io.label }}" alt="{{ io.label }}" />{% else %}{{ io.label }}{% endif %}</a></h4> <h4><a href="{{io.url}}">{% if io.logo %}<img class="logo" src="{{base}}/{{io.logo}}" title="{{ io.label }}" alt="{{ io.label }}" />{% else %}{{ io.label }}{% endif %}</a></h4>
<img src="{{base}}/images/tag-install-{{io.install}}.svg"> <img src="{{base}}/images/tag-install-{{io.install}}.svg">

View File

@ -1,11 +1,11 @@
--- ---
layout: documentation layout: documentation
title: Persistence title: Persistence Services
--- ---
{% include base.html %} {% include base.html %}
# Persistence # Persistence Services
Persistence services enable the storage of item states over time. Persistence services enable the storage of item states over time.
@ -39,7 +39,7 @@ Persistence services enable the storage of item states over time.
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for persistence in site.addons_persistence %} {% for persistence in site.addons_persistences %}
<tr class="install-{{persistence.install}} since-{{persistence.since}}"> <tr class="install-{{persistence.install}} since-{{persistence.since}}">
<td> <td>
<h4><a href="{{persistence.url}}">{% if persistence.logo %}<img class="logo" src="{{base}}/{{persistence.logo}}" title="{{ persistence.label }}" alt="{{ persistence.label }}" />{% else %}{{ persistence.label }}{% endif %}</a></h4> <h4><a href="{{persistence.url}}">{% if persistence.logo %}<img class="logo" src="{{base}}/{{persistence.logo}}" title="{{ persistence.label }}" alt="{{ persistence.label }}" />{% else %}{{ persistence.label }}{% endif %}</a></h4>

View File

@ -5,7 +5,7 @@ title: Configuration though HABmin
{% include base.html %} {% include base.html %}
# Configuration though HABmin # Configuration through HABmin
HABmin is a modern, professional and portable user interface for openHAB, HABmin is a modern, professional and portable user interface for openHAB,
providing both user and administrative functions (eg sitemaps for users, and configuration utilities providing both user and administrative functions (eg sitemaps for users, and configuration utilities

84
pom.xml
View File

@ -6,6 +6,9 @@
<version>2.0.0-SNAPSHOT</version> <version>2.0.0-SNAPSHOT</version>
<name>openHAB Documentation</name> <name>openHAB Documentation</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -20,7 +23,7 @@
<directory>${basedir}/_addons_bindings/</directory> <directory>${basedir}/_addons_bindings/</directory>
</fileset> </fileset>
<fileset> <fileset>
<directory>${basedir}/_addons_persistence/</directory> <directory>${basedir}/_addons_persistences/</directory>
</fileset> </fileset>
<fileset> <fileset>
<directory>${basedir}/_addons_transformations/</directory> <directory>${basedir}/_addons_transformations/</directory>
@ -32,7 +35,7 @@
<directory>${basedir}/_addons_uis/</directory> <directory>${basedir}/_addons_uis/</directory>
</fileset> </fileset>
<fileset> <fileset>
<directory>${basedir}/_addons_io/</directory> <directory>${basedir}/_addons_ios/</directory>
</fileset> </fileset>
<fileset> <fileset>
<directory>${basedir}/_addons_iconsets/</directory> <directory>${basedir}/_addons_iconsets/</directory>
@ -137,7 +140,7 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${basedir}/_addons_persistence/oh1</outputDirectory> <outputDirectory>${basedir}/_addons_persistences/oh1</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>${basedir}/.external-resources/openhab1-addons/bundles/persistence</directory> <directory>${basedir}/.external-resources/openhab1-addons/bundles/persistence</directory>
@ -264,6 +267,10 @@
<include>**/doc/**</include> <include>**/doc/**</include>
<include>**/cfg/**</include> <include>**/cfg/**</include>
</includes> </includes>
<excludes>
<exclude>**/cordova/**</exclude>
<exclude>**/src/**</exclude>
</excludes>
</resource> </resource>
</resources> </resources>
</configuration> </configuration>
@ -303,7 +310,7 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${basedir}/_addons_io/oh1</outputDirectory> <outputDirectory>${basedir}/_addons_ios/oh1</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>${basedir}/.external-resources/openhab1-addons/bundles/io</directory> <directory>${basedir}/.external-resources/openhab1-addons/bundles/io</directory>
@ -326,7 +333,7 @@
<goal>copy-resources</goal> <goal>copy-resources</goal>
</goals> </goals>
<configuration> <configuration>
<outputDirectory>${basedir}/_addons_io/oh2</outputDirectory> <outputDirectory>${basedir}/_addons_ios/oh2</outputDirectory>
<resources> <resources>
<resource> <resource>
<directory>${basedir}/.external-resources/openhab2-addons/addons/io</directory> <directory>${basedir}/.external-resources/openhab2-addons/addons/io</directory>
@ -339,6 +346,73 @@
</resources> </resources>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>copy-openhabian-install-docs</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/installation</outputDirectory>
<resources>
<resource>
<directory>${basedir}/.external-resources/openhabian/docs</directory>
<includes>
<include>openhabian.md</include>
<include>images/*.png</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-habpanel-config-docs</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/configuration</outputDirectory>
<resources>
<resource>
<directory>${basedir}/.external-resources/openhab-bundles/uis/org.openhab.ui.habpanel/docs</directory>
<includes>
<include>habpanel.md</include>
<include>images/*.png</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>copy-oh-mycroft-docs</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${basedir}/.external-resources/openhab-mycroft/USAGE.md</sourceFile>
<destinationFile>${basedir}/_addons_ios/ext/mycroft-skill/readme.md</destinationFile>
</configuration>
</execution>
<execution>
<id>copy-oh-alexa-docs</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${basedir}/.external-resources/openhab-alexa/USAGE.md</sourceFile>
<destinationFile>${basedir}/_addons_ios/ext/alexa-skill/readme.md</destinationFile>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -18,7 +18,7 @@ def collect_features = { features ->
def process_addon_type = { features, sources, type, collection, suffix, lblremoves, pkgremoves -> def process_addon_type = { features, sources, type, collection, suffix, lblremoves, pkgremoves ->
sources.each { source -> sources.each { source ->
println "--------------------------------------------------" println "--------------------------------------------------"
println "Processing: " + collection + "/" + source + "\n" println "Processing: _" + collection + "/" + source + "\n"
def files = new File(project.basedir, "_${collection}/".concat(source)) def files = new File(project.basedir, "_${collection}/".concat(source))
if (! files.exists()) { if (! files.exists()) {
println "No resources found." println "No resources found."
@ -27,7 +27,8 @@ def process_addon_type = { features, sources, type, collection, suffix, lblremov
files.eachFile { files.eachFile {
def name = it.name def name = it.name
println name println name
if (! name.contains(type) || name.endsWith('.test')) { if (! name.contains(type)) println "[WARN] Addon package name doesn't contain '${type}'."
if (name.endsWith('.test')) {
println "[INFO] Skip." println "[INFO] Skip."
it.deleteDir() it.deleteDir()
} else { } else {
@ -43,7 +44,7 @@ def process_addon_type = { features, sources, type, collection, suffix, lblremov
println "[WARNING] No README.md found." println "[WARNING] No README.md found."
} else { } else {
readme.renameTo(new File(simpleNameDir.path, 'readme.md')) readme.renameTo(new File(simpleNameDir.path, 'readme.md'))
println readme //println readme
def label = readme.readLines().find{it.startsWith('#')} def label = readme.readLines().find{it.startsWith('#')}
if (label == null) { if (label == null) {
println "[WARNING] No level 1 header found." println "[WARNING] No level 1 header found."
@ -95,7 +96,7 @@ def process_addon_type = { features, sources, type, collection, suffix, lblremov
readme.write(toYaml(front) + '<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->\n\n{% include base.html %}\n\n' + readme.text) readme.write(toYaml(front) + '<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->\n\n{% include base.html %}\n\n' + readme.text)
} }
} }
println "\n" print "\n"
} }
def temp_folder = new File(project.basedir, "_${collection}/".concat(source)) def temp_folder = new File(project.basedir, "_${collection}/".concat(source))
if (temp_folder.list().length > 0) { if (temp_folder.list().length > 0) {
@ -107,16 +108,20 @@ def process_addon_type = { features, sources, type, collection, suffix, lblremov
def process_addon_files = { features -> def process_addon_files = { features ->
// features, sources, type, collection, suffix, lblremoves, pkgremoves // features, sources, type, collection, suffix, lblremoves, pkgremoves
process_addon_type(features, ['oh1', 'oh2'], 'binding', 'addons_bindings', ' - Bindings', [' Binding'], ['org.openhab.binding.','org.eclipse.smarthome.binding.'])
process_addon_type(features, ['oh1'], 'action', 'addons_actions', ' - Actions', [' Actions', ' Action'], ['org.openhab.action.'] ) process_addon_type(features, ['oh1'], 'action', 'addons_actions', ' - Actions', [' Actions', ' Action'], ['org.openhab.action.'] )
process_addon_type(features, ['oh1'], 'persistence', 'addons_persistence', ' - Persistence', ['\\s*Persistence\\s*$'], ['org.openhab.persistence.'] ) process_addon_type(features, ['oh1', 'oh2'], 'binding', 'addons_bindings', ' - Bindings', [' Binding'], ['org.openhab.binding.','org.eclipse.smarthome.binding.'])
process_addon_type(features, ['oh1', 'oh2'], 'io', 'addons_io', ' - Services', [' Service'], ['org.openhab.io.','org.eclipse.smarthome.io'] )
process_addon_type(features, ['oh2'], 'transform', 'addons_transformations', ' - Transformations', [' Transformation Service'], ['org.eclipse.smarthome.transform.'] )
process_addon_type(features, ['oh2'], 'voice', 'addons_voices', ' - Voices', [:], ['org.openhab.voice.','org.eclipse.smarthome.voice.'] )
process_addon_type(features, ['oh2'], 'iconset', 'addons_iconsets', ' - Icon Sets', [:], ['org.eclipse.smarthome.ui.iconset.'] ) process_addon_type(features, ['oh2'], 'iconset', 'addons_iconsets', ' - Icon Sets', [:], ['org.eclipse.smarthome.ui.iconset.'] )
process_addon_type(features, ['oh2'], 'ui', 'addons_uis', ' - UI', [:], ['org.openhab.ui.','org.eclipse.smarthome.ui.'] ) process_addon_type(features, ['oh1', 'oh2', 'ext'], 'io', 'addons_ios', ' - System Integrations', [' Service'], ['org.openhab.io.','org.eclipse.smarthome.io'] )
process_addon_type(features, ['oh1'], 'persistence', 'addons_persistences', ' - Persistence Services', ['\\s*Persistence\\s*$'], ['org.openhab.persistence.'] )
process_addon_type(features, ['oh2'], 'transform', 'addons_transformations', ' - Transformation Services', [' Transformation Service'], ['org.eclipse.smarthome.transform.'] )
process_addon_type(features, ['oh2'], 'ui', 'addons_uis', ' - UIs', [:], ['org.openhab.ui.','org.eclipse.smarthome.ui.'] )
process_addon_type(features, ['oh2'], 'voice', 'addons_voices', ' - Voices', [:], ['org.openhab.voice.','org.eclipse.smarthome.voice.'] )
} }
if (! new File(project.basedir, ".external-resources").exists()) {
println "\n\n[WARNING] Folder '.external-resources' missing. Please use the update script to run all steps in order. Exiting.\n\n"
return
}
def features = [:] def features = [:]
collect_features(features) collect_features(features)
process_addon_files(features) process_addon_files(features)

View File

@ -20,7 +20,7 @@ if [ ! -f "$(dirname $0)/CNAME" ]; then
fi fi
resourcefolder=$(dirname $0)/.external-resources resourcefolder=$(dirname $0)/.external-resources
mkdir -p "$resourcefolder" mkdir -p "$resourcefolder"
echo -e "# About\n\nUsed to temporarly store repository clones from related openHAB projects for `update-external-resources.sh`." > "$resourcefolder"/README.md echo -e "# About\n\nUsed to temporarily store repository clones from related openHAB projects for 'update-external-resources.sh'." > "$resourcefolder/README.md"
# Prerequisites # Prerequisites
if ! command -v git &>/dev/null || ! command -v mvn &>/dev/null; then if ! command -v git &>/dev/null || ! command -v mvn &>/dev/null; then
@ -48,6 +48,9 @@ pull_or_clone_repo "openhab-distro" "openhab/openhab-distro.git"
pull_or_clone_repo "openhab1-addons" "openhab/openhab1-addons.git" pull_or_clone_repo "openhab1-addons" "openhab/openhab1-addons.git"
pull_or_clone_repo "openhab2-addons" "openhab/openhab2-addons.git" pull_or_clone_repo "openhab2-addons" "openhab/openhab2-addons.git"
pull_or_clone_repo "openhab-bundles" "openhab/openhab-bundles.git" pull_or_clone_repo "openhab-bundles" "openhab/openhab-bundles.git"
pull_or_clone_repo "openhabian" "openhab/openhabian.git"
pull_or_clone_repo "openhab-alexa" "openhab/openhab-alexa.git"
pull_or_clone_repo "openhab-mycroft" "openhab/openhab-mycroft.git"
echo_process "Updating submodules of the 'openhab-bundles' repo... " echo_process "Updating submodules of the 'openhab-bundles' repo... "
git -C "$resourcefolder/openhab-bundles" submodule update --recursive --remote --init git -C "$resourcefolder/openhab-bundles" submodule update --recursive --remote --init