Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - derCel

Pages: [1]
1
General Discussion / Re: German Weather in combination with TTS?
« on: October 13, 2011, 04:46:09 AM »
Ok, I think I got it now. Thanks for taking the time to explain this to me, James!

Cel

2
General Discussion / Re: German Weather in combination with TTS?
« on: October 12, 2011, 06:45:36 PM »

It works! The following did the trick - <condition\sdata="(.*?)"/>
I did not understand how the ? works and to be honest I still don't get it why you need to combine * and ? to limit the output to just what I want.  ;D

Many thanks for your help James!
Cel

3
General Discussion / Re: German Weather in combination with TTS?
« on: October 12, 2011, 04:07:46 PM »

Thanks a lot James!

Using your example I was able to come up with a solution.

Code: [Select]

<command id="314" name="Wetter heute" enabled="true" alwaysOn="False" confirm="False" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>Scrape</cmdType>
                <cmdString>http://de.wetter.yahoo.com/deutschland/<< your location here >>/</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>yw-cond"&gt;(.*)&lt;/div&gt;&lt;dl&gt;&lt;dt&gt;</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.Speak</cmdType>
                <cmdString>Im Moment {Match.1} und</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Results.RegEx</cmdType>
                <cmdString>Temperatur:&lt;/dt&gt;&lt;dd&gt;(.*)&amp;deg;C</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TTS.Speak</cmdType>
                <cmdString>{Match.1} Grad.</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
        </command>


One question though (more out of curiosity) as I'm new to regEx.
What do I have to do in case a regex condition (string) contains a space like in the line below found in the weather API of google > http://www.google.de/ig/api?weather=Berlin < ?

<condition data="Nieselregen"/>

I tried the following RegEx pattern without any success because of the space in the tag I think:

<condition data="(.*)"/>

Thanks a lot,
Cel

4
General Discussion / German Weather in combination with TTS?
« on: October 12, 2011, 07:18:35 AM »

Hi all,

I'm playing around with VC for some days now and I yet have a lot to learn.
I have a question regarding the weather function provided in VC -

Is it possible to trigger a different weather page instead the built in one and use it with TTS.speak?
What I'm currently doing using the provided weather function is:  after fetching the weather for my location switching the voice to EN then using TTS.speak with {lastresult}, once done switching back to German.

While this is okay to some extent (even using EN Anna) I'd really prefer a German weather forecast instead.

If someone could help me that would be really great!

Thanks a lot,
Cel

Pages: [1]