Gmail Title Output & Localization

Started by SunDoWneR, October 15, 2013, 05:35:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SunDoWneR

Hey,
currently i'm messing arround with the GMail actions and couldn't find em in the VC Folder. My problem is, that the german tts voice has to say english words which sounds quite silly.

When I'm using the {LastResult} on the titles, for example, the output is "From: myacc@mail.com Title: blah". Is there an easy way to fix this (besides changing the tts voice to eng ;D)?
Someone could also lead me to the correct spot in the Folder structure, so I could do the changes myself.
Same with the summarys.

It would also be nice to let VC write sort of a list, that the user could decide for which mail he wants to have, for example, a tts output of the summary.

Example:

- User asks "Do I have new E-Mails?"
- VC says "Yes, you have 2 new E-Mails" (Gmail.GetCount) Works!
- User asks "Read the titles"
- VC reads the titles "E-mail1: from: xxx title: xxx" (Gmail.GetAllTitles)
- User asks "Give me the summary of E-mail1"
- VC reads the summary of E-mail1 (Options: Exerpt lengh;whole Mail)
... and so on.

Cheers, Sunny

jitterjames

The gmail actions are very old, and could certainly use an update.  Until then, you can probably still work around it pretty easily.

Here are some commands that use "replace" and "regex" to achieve what I think you want.

<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="gmail quick fixes" enabled="True" prefix="" priority="0" requiredProcess="" description="">
 <command id="245" name="show new emails" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>Gmail.GetAllTitles</cmdType>
     <cmdString />
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>Results.Replace</cmdType>
     <cmdString>from:&amp;&amp;von:</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>Results.Replace</cmdType>
     <cmdString>title :&amp;&amp;titel:</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>OSD.ShowText</cmdType>
     <cmdString>{LastResult}&amp;&amp;4000&amp;&amp;-5</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <phrase>show new emails</phrase>
 </command>
 <command id="246" name="Get a summary" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
   <action>
     <cmdType>Gmail.GetAllSummaries</cmdType>
     <cmdString />
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>System.SetClipboardText</cmdType>
     <cmdString>{LastResult}</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <action>
     <cmdType>Results.RegEx</cmdType>
     <cmdString>summary\s:\s(.*)</cmdString>
     <cmdRepeat>1</cmdRepeat>
   </action>
   <if ifBlockDisabled="False" ifNot="False">
     <ifType>(A)&lt;(B)</ifType>
     <ifParams>{#M}&amp;&amp;{1}</ifParams>
     <then>
       <action>
         <cmdType>OSD.ShowText</cmdType>
         <cmdString>You only have {#M} new messages</cmdString>
         <cmdRepeat>1</cmdRepeat>
       </action>
     </then>
     <else>
       <action>
         <cmdType>OSD.ShowText</cmdType>
         <cmdString>{Match.{1}}</cmdString>
         <cmdRepeat>1</cmdRepeat>
       </action>
     </else>
   </if>
   <phrase>show summary</phrase>
   <payloadRange>1,8</payloadRange>
 </command>
</commandGroup>

SunDoWneR

#2
Very nice, thx James!

Woks almost like a charm...

The "clipboardtext" doesn't accept special characters. We have a few of them in the german language, like ö ä ü ß, if you can read them. Is there a "workaround"?

Is there a way to extend the summary?


Cheers, Sunny

jitterjames

#3
QuoteIs there a way to extend the summary?

I don't think so.  This is what is served up by gmail's atom feed.

jitterjames

#4
Quote from: SunDoWneR on October 15, 2013, 10:32:29 AM
The "clipboardtext" doesn't accept special characters.

Clipboardtext has nothing to do with it. You can actually remove it from the command.  I was just using it when trying to figure out the regex filter.

jitterjames

...but the special characters I can fix.  That will be corrected in the next version of VC :)

Kalle

James can you fix it also in confirm phrases to use "special characters" in the Options Menu->General Tab

Thanks  ;)
***********  get excited and make things  **********

SunDoWneR

Thx man!

In which language is VC written anyways? C++ or py or another?

Cheers, Sunny

nime5ter

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

Quote from: Kalle on October 15, 2013, 02:35:58 PM
James can you fix it also in confirm phrases to use "special characters" in the Options Menu->General Tab

Thanks  ;)

I'm not sure what you mean.  Are you using 1.163 ?  I can put  ö ä ü ß into my confirm phrases and they work fine, at least they display normally... I don't know if there is a problem with them being recognized by the speech engine.  Is that what you mean?

Kalle

Upps, sorry  :bonk
You've right, it works. I forgot only to change the old phrases by hand.
***********  get excited and make things  **********

jitterjames

Hi.  This issue should be resolved now in version 1.1.6.6. and later:

http://voxcommando.com/forum/index.php?topic=1228.0

I have also added a new action that allows you to specify the format in any language.  See the sample xml below for an example:

<?xml version="1.0" encoding="utf-16"?>
<command id="261" name="get custom" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Gmail.GetCustom</cmdType>
    <cmdString>&lt;#&gt;: DER &lt;FROM&gt;, Titel: &lt;TITLE&gt;{CR}&lt;SUMMARY&gt;{CR}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <cmdString>{LastResult}&amp;&amp;4000&amp;&amp;-5</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>show new emails</phrase>
</command>