@@ -0,0 +1,2089 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Licensed to the Apache Software Foundation (ASF) under one or more%0A# contributor license agreements.  See the NOTICE file distributed with%0A# this work for additional information regarding copyright ownership.%0A# The ASF licenses this file to You under the Apache License, Version 2.0%0A# (the %22License%22); you may not use this file except in compliance with%0A# the License.  You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22%0AHello, World!%0A%0AIn this example we create a shell with one simple command: hello%0A%0ATo run this script you have to change the configuration below, or set%0Aenvironment variables instead.%0A%0APut the token received from Cisco Spark for your bot in%0Aa variable named %60%60SHELLY_TOKEN%60%60::%0A%0A    export SHELLY_TOKEN=%22%3Ctoken id from Cisco Spark for Developers%3E%22%0A%0AThe variable %60%60SERVER_URL%60%60 has to mention the public IP address and link%0Aused to reach this server from the Internet. For example, if you use ngrok%0Aduring development and test::%0A%0A    export SERVER_URL=%22http://1a107f21.ngrok.io%22%0A%0A%22%22%22%0A%0Afrom shellbot import ShellBot, Context, Command%0AContext.set_logger()%0A%0A#%0A# create a bot and load command%0A#%0A%0Aclass Hello(Command):%0A    keyword = 'hello'%0A    information_message = u%22Hello, World!%22%0A%0Abot = ShellBot(command=Hello())%0A%0A#%0A# load configuration%0A#%0A%0Abot.configure(%7B%0A%0A    'spark': %7B%0A        'room': 'Hello tutorial',%0A        'moderators': 'bernard.paques@dimensiondata.com',%0A        'token': '$SHELLY_TOKEN',%0A    %7D,%0A%0A    'server': %7B%0A        'url': '$SERVER_URL',%0A        'hook': '/hook',%0A        'binding': '0.0.0.0',%0A        'port': 8080,%0A    %7D,%0A%0A%7D)%0A%0A#%0A# create a chat room%0A#%0A%0Abot.bond(reset=True)%0A%0A#%0A# run the bot%0A#%0A%0Abot.run()%0A%0A#%0A# delete the chat room%0A#%0A%0Abot.dispose()%0A

add new example: Hello, World!