Commits

Alfonso de la Guarda Reyes committed 7a445ed Merge

Merge pull request #1 from jmcastagnetto/master

Correcciones menores en documentación y comentarios

  • Participants
  • Parent commits 18d3d19, c76cd71

Comments (0)

Files changed (6)

README

-Sboty Project
-=============
-
-Messaging Multiprotocol Application with automatically responsive
-by using the AIML standard.
-
-
-Requirements
-============
-
-* xmpp
-* msn_lib (included and modified for fix depreceated methods)
-
-You can install using:
-
-    pip install xmpppy
-
-
-Usage
-=====
-
-Rename chatbot_settings.xml.EDITME as chatbot_settings.xml
-
-Edit chatbot_settings.xml filling the data required by each tag.
-
-Run chatbot_gtalk_setup.py or chatbot_msn_setup.py according to the service.
-
-You can use all_questions.py or show_unanswered.py for debug the IA.
-
-Please, go to the *intelligence* drawer for change the logic and replys
-
-
-Demo
-====
-
-Try adding this contact to gmail / google apps / live / hotmail :
-
-    demo@ictec.biz
-
-
-AIML References
-===============
-
-http://www.alicebot.org/aiml.html
-
-
-Notes
-=====
-
-You can surely modify the chatbot_gtalk_setup.py to accomodate to any service.
-Remember that today, almost any messaging services are xmpp protocol based.
-
-
-Author
-======
-
-ICTEC SAC
-
-Alfonso de la Guarda Reyes <alfonsodg@gmail.com>
-
-
-Thanks
-======
-
-César Bustios
-
-Giancarlo Reyes
-
-
-
-License
-=======
-
-Under GPL / v3
-
-Propietary on demand when OSI / FSF licenses are not compatible with
-your desires
+Sboty Project
+=============
+
+Messaging Multiprotocol Application (bot) with automated responses
+using the AIML standard libraries.
+
+
+Requirements
+------------
+
+* xmpp
+* msn_lib (included and modified to fix deprecated methods)
+
+You can install xmpp, using:
+
+    pip install xmpppy
+
+
+Usage
+-----
+
+* Rename **chatbot_settings.xml.EDITME** to **chatbot_settings.xml**.
+* Edit chatbot_settings.xml filling the data required by each tag.
+* Run **chatbot_gtalk_setup.py** or **chatbot_msn_setup.py** according
+  to what service you will be using.
+* To debug the AI, you can use/modify the scripts: all_questions.py
+  (to show all questions being asked) or show_unanswered.py (to show
+  only the unanswered ones).
+* If you need to change the logic or the content of the replies, change
+  the corresponding files in the *intelligence* drawer.
+
+Demo
+----
+
+Try adding this contact to gmail / google apps / live / hotmail :
+
+    demo@ictec.biz
+
+
+AIML Reference
+--------------
+
+http://www.alicebot.org/aiml.html
+
+
+Notes
+-----
+
+You can copy or modify the chatbot_gtalk_setup.py to accommodate to any service.
+Nowadays most messaging services use the xmpp protocol, so it should
+be simple to accommodate other providers.
+
+
+Author
+------
+
+ICTEC SAC
+
+Alfonso de la Guarda Reyes <alfonsodg@gmail.com>
+
+
+Thanks
+------
+
+César Bustios
+
+Giancarlo Reyes
+
+
+
+License
+-------
+
+Under GPL / v3
+
+Proprietary on demand when OSI / FSF licenses are not compatible with
+your desires

chatbot_gtalk_setup.py

 
 def present_controller(conn, presence):
     """
-    Handler for add automatically users with jabber servers (gtalk).
+    Handler for automatically adding users to jabber servers (gtalk).
     """
     if presence:
         try:
 
 def registrochat(message, email):
     """
-    Performs the chat log.
+    Logs the chat.
     """
     filename = chatbotini.LOGDIR + "/gtalk/" + email
     logfile = open(filename, "a")
 
 def loop_start(conn):
     """
-    Starts the loop
+    Starts the loop.
     """
     while step_on(conn):
         SHOW.setShow("ax")
 
 def cache_read_rpta(email):
     """
-    Read Cache
+    Reads the cache
     """
     rpta = 0
     try:
 
 def cache_write_rpta(message, email):
     """
-    whire Cache
+    Writes to the cache
     """
     try:
         cache = open(chatbotini.CACHEDIR + str(
 
 def rpta_gtalk(conn, mess):
     """
-    Response messages to gtalk contacts.
+    Respond to messages from gtalk contacts.
     """
     logtime = chatbotini.now()
     text = mess.getBody()
 
 def record_questions_unanswered(message, answer, email, date, time):
     """
-    Record Questions Unanswered
+    Records Unanswered Questions
     """
     answer = open("unanswered.txt", "r")
     unanswered = answer.readlines()

chatbot_msn_setup.py

 
     def emailtonick(self, email):
         """
-        Returns a nick accoriding to the given email, or None if noone matches.
+        Returns a nick using the given email, or None if nobody matches.
         """
         if email in MSN.users.keys():
             return MSN.users[email].nick
 
     def quit(self, code=0):
         """
-        Sign out from MSN.
+        Signs out from MSN.
         """
         print "Closing"
         chatbotini.connection_log("Sesion terminada\n\n\n", "msn")

intelligence/aleatorio.aiml

     </category>
     
     <category>
-        <pattern>RAMDOMM</pattern>
+        <pattern>RANDOM</pattern>
         <template> 
           <random>
             <li>¿Cuál es tu deporte favorito?</li>

intelligence/saludo.aiml

 						<li>Es un placer, <get name="nombre"/></li>
 						<li>¡Hola <get name="nombre"/>!</li>
 					</random>
-					<srai>RAMDOMM</srai>
+					<srai>RANDOM</srai>
 				</li>				
 			</condition>
 		</template>
 				<li>Gracias</li>
 				<li>Muy bien</li>
 			</random>
-            <srai>RAMDOMM</srai>
+            <srai>RANDOM</srai>
 		</template>
 	</category>