<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Name="Configuration Tree" Expanded="True" Version="1194" Guid="{D08B9A8C-B81B-4549-AEC8-8852FB95B055}" Time="1257164667.27">
    <Autostart Name="Autostart" Expanded="True">
        <Plugin File="Speech" Identifier="Speech">
            gAIpLg==
        </Plugin>
        <Plugin File="Weather" Identifier="Weather">
            gAIpLg==
        </Plugin>
    </Autostart>
    <Folder Name="TESTING/DEMO" Expanded="True">
        <Macro Name="Weather: GetCountriesFromGoogle: en">
            <Action>
                Weather.GetCountriesFromGoogle(u'en')
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
        </Macro>
        <Macro Name="Weather: GetCitiesFromGoogle: be">
            <Action>
                Weather.GetCitiesFromGoogle(u'be', u'en')
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
        </Macro>
        <Macro Name="Weather: GetWeatherFromGoogle: Antwerp, Belgium">
            <Action>
                Weather.GetWeatherFromGoogle(u'Antwerp, Belgium', u'')
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
        </Macro>
        <Macro Name="Weather: LogResult">
            <Event Name="INFO-LOGGER" />
            <Action>
                Weather.LogResult()
            </Action>
        </Macro>
        <Macro Name="Weather DEMO 1 : GetWeatherFromGoogle + GetWeatherFieldValue + LogResult" Expanded="True">
            <Event Name="DEMO1" />
            <Action Name="Instead of just Logging the result as per this demo, you can do more usefull stuff with it through {eg.result} then logging alone">
                EventGhost.Comment()
            </Action>
            <Action>
                Weather.GetWeatherFromGoogle(u'Antwerp, Belgium', u'en')
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'current_conditions', u'temp_c', -1)
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'forecasts', u'condition', -1)
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
            <Action>
                Weather.GetWeatherFromGoogle(u'Cancun, Mexico', u'')
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'current_conditions', u'temp_c', -1)
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'forecasts', u'condition', -1)
            </Action>
            <Action>
                Weather.LogResult()
            </Action>
        </Macro>
        <Macro Name="Weather DEMO 2 : Possible use in Logic (Dummy)" Expanded="True">
            <Event Name="DEMO2" />
            <Action Name="f.e. using {eg.result} from GetWeatherFieldValue Action to use in logic  (DUMMY)">
                EventGhost.Comment()
            </Action>
            <Action>
                Weather.GetWeatherFromGoogle(u'Antwerp, Belgium', u'en')
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'current_conditions', u'temp_c', -1)
            </Action>
            <Action>
                EventGhost.PythonCommand(u'if eg.result &gt; 25:  HEATING= "off"')
            </Action>
            <Action>
                EventGhost.PythonCommand(u'if eg.result &lt; 18 :  HEATING= "on"')
            </Action>
        </Macro>
        <Macro Name="Weather + Speech  DEMO 3" Expanded="True">
            <Event Name="DEMO3" />
            <Event Name="WeatherMan" />
            <Action Name="f.e. your personal weatherman on your PC - with mixed information retrieval options as demo">
                EventGhost.Comment()
            </Action>
            <Action>
                Weather.GetWeatherFromGoogle(u'Antwerp, Belgium', u'en')
            </Action>
            <Action>
                Speech.TextToSpeech(u'LH Michael', 0, u'{eg.result[\'current_conditions\'][\'condition\'] + " and " + eg.result[\'current_conditions\'][\'temp_c\'] + " degrees celcius now in " + eg.result[\'forecast_information\'][\'city\'] + ". The forecast for tomorrow is " + eg.result[\'forecasts\'][0][\'condition\'] }', 0, 100)
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'forecasts', u'low', -1)
            </Action>
            <Action>
                Speech.TextToSpeech(u'LH Michael', 0, u'"and between " {eg.result}', 0, 100)
            </Action>
            <Action>
                Weather.GetWeatherFieldValue(u'forecasts', u'high', -1)
            </Action>
            <Action>
                Speech.TextToSpeech(u'LH Michael', 0, u'"and  " {eg.result} " degrees Fahrenheit"', 0, 100)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
