Plugin dbTalk

Ovanio edited this page Feb 22, 2012 · 2 revisions

With dbTalk all 'simple' questions are saved in the mysql database. For Example: Smalltalk, simple URL requests.

In every questions and answer in the db you can save code (only one line at the moment). This code will be executed.

##How to Use the code## answer = self.getUrl( "URL", "user", "pw", "auto") # user and pw can be "" if "auto" is set, it will response with "I'm connecting first. It is possible to insert instead of auto a manual response like "The result is:" or nothing ""

Set Personal Var (in questions): self.setVar("name", speech.replace(u"My name is ",""))

Get Personal Var (in answers): answer = (u"Hello {0}!".format(self.getVar("name")))