Permalink
Browse files

No commit message

  • Loading branch information...
gusarba committed Jun 7, 2007
0 parents commit f6c7e63057b17202ff152d3f5a6e0b3a6e33df63
Showing with 62,138 additions and 0 deletions.
  1. +504 −0 COPYING
  2. +104 −0 autopackage/default.apspec
  3. +146 −0 configure.py
  4. BIN doc/api.tar.gz
  5. +11 −0 empaqueta.sh
  6. +379 −0 examples/OracleAgent.py
  7. +68 −0 examples/alfred/Alfred.py
  8. +98 −0 examples/alfred/GooglePlugin.py
  9. +18 −0 examples/alfred/Profile.py
  10. +1 −0 examples/alfred/google/.googlekey
  11. +85 −0 examples/alfred/google/GoogleSOAPFacade.py
  12. +3,974 −0 examples/alfred/google/SOAP.py
  13. +3 −0 examples/alfred/google/__init__.py
  14. +97 −0 examples/alfred/google/doc/epydoc.css
  15. +13 −0 examples/alfred/google/doc/index.html
  16. +97 −0 examples/alfred/google/doc/private/epydoc.css
  17. +96 −0 examples/alfred/google/doc/private/exceptions.Exception-class.html
  18. +13 −0 examples/alfred/google/doc/private/frames.html
  19. +958 −0 examples/alfred/google/doc/private/google-module.html
  20. +100 −0 examples/alfred/google/doc/private/google.NoLicenseKey-class.html
  21. +184 −0 examples/alfred/google/doc/private/google.SearchResult-class.html
  22. +190 −0 examples/alfred/google/doc/private/google.SearchResultsMetaData-class.html
  23. +123 −0 examples/alfred/google/doc/private/google.SearchReturnValue-class.html
  24. +88 −0 examples/alfred/google/doc/private/google._OutputFormatter-class.html
  25. +89 −0 examples/alfred/google/doc/private/google._SearchBase-class.html
  26. +112 −0 examples/alfred/google/doc/private/google._TextOutputFormatter-class.html
  27. +236 −0 examples/alfred/google/doc/private/help.html
  28. +13 −0 examples/alfred/google/doc/private/index.html
  29. +201 −0 examples/alfred/google/doc/private/indices.html
  30. +73 −0 examples/alfred/google/doc/private/toc-everything.html
  31. +73 −0 examples/alfred/google/doc/private/toc-google-module.html
  32. +25 −0 examples/alfred/google/doc/private/toc.html
  33. +93 −0 examples/alfred/google/doc/private/trees.html
  34. +97 −0 examples/alfred/google/doc/public/epydoc.css
  35. +96 −0 examples/alfred/google/doc/public/exceptions.Exception-class.html
  36. +13 −0 examples/alfred/google/doc/public/frames.html
  37. +721 −0 examples/alfred/google/doc/public/google-module.html
  38. +100 −0 examples/alfred/google/doc/public/google.NoLicenseKey-class.html
  39. +171 −0 examples/alfred/google/doc/public/google.SearchResult-class.html
  40. +177 −0 examples/alfred/google/doc/public/google.SearchResultsMetaData-class.html
  41. +123 −0 examples/alfred/google/doc/public/google.SearchReturnValue-class.html
  42. +236 −0 examples/alfred/google/doc/public/help.html
  43. +13 −0 examples/alfred/google/doc/public/index.html
  44. +167 −0 examples/alfred/google/doc/public/indices.html
  45. +54 −0 examples/alfred/google/doc/public/toc-everything.html
  46. +54 −0 examples/alfred/google/doc/public/toc-google-module.html
  47. +25 −0 examples/alfred/google/doc/public/toc.html
  48. +84 −0 examples/alfred/google/doc/public/trees.html
  49. +638 −0 examples/alfred/google/google.py
  50. +290 −0 examples/alfred/google/googletest.py
  51. +114 −0 examples/alfred/google/readme.txt
  52. +14 −0 examples/alfred/google/setup.py
  53. +141 −0 examples/alfred/googleAgent.py
  54. +13 −0 examples/alfred/profile.ini
  55. +397 −0 examples/auctioner.py
  56. +714 −0 examples/bidder.py
  57. +126 −0 examples/client.js
  58. BIN examples/data/chimp.bmp
  59. BIN examples/data/dsic.jpg
  60. BIN examples/data/fist.bmp
  61. BIN examples/data/p2dx.jpg
  62. BIN examples/data/punch.wav
  63. BIN examples/data/robot.png
  64. BIN examples/data/target.png
  65. BIN examples/data/whiff.wav
  66. +199 −0 examples/emissor-gus.py
  67. +159 −0 examples/emissor.py
  68. +57 −0 examples/example.py
  69. +59 −0 examples/example2.py
  70. +98 −0 examples/external.py
  71. +379 −0 examples/oracle/OracleAgent.py
  72. +97 −0 examples/oracle/emissor-oracle.py
  73. +125 −0 examples/ping/PingAgentExample.py
  74. +70 −0 examples/ping/emissor-ping.py
  75. +16 −0 examples/rdf/example.rdf
  76. +12 −0 examples/rdf/example2.rdf
  77. +11 −0 examples/rdf/example3.rdf
  78. +19 −0 examples/rdf/example4.rdf
  79. +27 −0 examples/rdf/example5.rdf
  80. +27 −0 examples/rdf/example6.rdf
  81. +100 −0 examples/receptor.py
  82. +193 −0 examples/simbamtp/emissor-simba.py
  83. +34 −0 examples/simbamtp/udp-sender.py
  84. +46 −0 examples/webadmin.css
  85. +448 −0 gspade.py
  86. +3 −0 gspade.sh
  87. +3 −0 readme.txt
  88. +173 −0 runspade.py
  89. +582 −0 setup.iss
  90. +77 −0 setup.py
  91. +3 −0 spade.sh
  92. +346 −0 spade/ACLMessage.py
  93. +618 −0 spade/ACLParser.py
  94. +185 −0 spade/AID.py
  95. +522 −0 spade/AMS.py
  96. +1,727 −0 spade/Agent.py
  97. +130 −0 spade/BasicFipaDateTime.py
  98. +705 −0 spade/Behaviour.py
  99. +622 −0 spade/DF.py
  100. +181 −0 spade/Envelope.py
  101. +23 −0 spade/FIPAMessage.py
  102. +58 −0 spade/MTP.py
  103. +94 −0 spade/MessageReceiver.py
  104. +947 −0 spade/Organization.py
  105. +949 −0 spade/Organization_new.py
  106. +761 −0 spade/Platform.py
  107. +458 −0 spade/RDF0Parser.py
  108. +39 −0 spade/ReceivedObject.py
  109. +71 −0 spade/SIMBA.py
  110. +133 −0 spade/SL0Parser.py
  111. +172 −0 spade/SpadeConfigParser.py
  112. +1,925 −0 spade/Unit.py
  113. +1,858 −0 spade/Unit_new.py
  114. +418 −0 spade/XMLCodec.py
  115. +18 −0 spade/__init__.py
  116. +19 −0 spade/colors.py
  117. +6 −0 spade/msgtypes.py
  118. +345 −0 spade/mtp/http.py
  119. +105 −0 spade/mtp/simba.py
  120. +2,226 −0 spade/pyparsing.py
  121. +69 −0 spade/spade_backend.py
  122. +1 −0 spade/xmpp
  123. +1 −0 spade/xmppd
  124. +10 −0 stack_thread/Makefile
  125. +176 −0 stack_thread/old/mymod.c
  126. +51 −0 stack_thread/old/stack_thread.c
  127. +9 −0 stack_thread/old/stack_thread.i
  128. +60 −0 stack_thread/old/stack_thread.py
  129. +454 −0 stack_thread/stackthread.c
  130. +38 −0 stack_thread/stackthread.h
  131. +25 −0 stack_thread/test.py
  132. +673 −0 stack_thread/threadmodule.c
  133. +1 −0 svn2cl
  134. +215 −0 svn2cl.xsl
  135. +120 −0 tlslite/BaseDB.py
  136. +146 −0 tlslite/Checker.py
  137. +220 −0 tlslite/FileObject.py
  138. +159 −0 tlslite/HandshakeSettings.py
  139. +131 −0 tlslite/Session.py
  140. +103 −0 tlslite/SessionCache.py
  141. +58 −0 tlslite/SharedKeyDB.py
  142. +1,598 −0 tlslite/TLSConnection.py
  143. +1,118 −0 tlslite/TLSRecordLayer.py
  144. +90 −0 tlslite/VerifierDB.py
  145. +133 −0 tlslite/X509.py
  146. +181 −0 tlslite/X509CertChain.py
  147. +38 −0 tlslite/__init__.py
  148. +69 −0 tlslite/api.py
  149. +225 −0 tlslite/constants.py
  150. +149 −0 tlslite/errors.py
  151. +235 −0 tlslite/integration/AsyncStateMachine.py
  152. +223 −0 tlslite/integration/HTTPTLSConnection.py
  153. +139 −0 tlslite/integration/TLSAsyncDispatcherMixIn.py
  154. +59 −0 tlslite/integration/TLSSocketServerMixIn.py
  155. +196 −0 tlslite/integration/TLSTwistedProtocolWrapper.py
  156. +172 −0 tlslite/integration/XMLRPCTransport.py
  157. +14 −0 tlslite/integration/__init__.py
  158. +170 −0 tlslite/mathtls.py
  159. +561 −0 tlslite/messages.py
  160. +1,045 −0 tlslite/scripts/tls.py
  161. +194 −0 tlslite/scripts/tlsdb.py
  162. +33 −0 tlslite/utils/AES.py
  163. +34 −0 tlslite/utils/ASN1Parser.py
  164. +34 −0 tlslite/utils/Cryptlib_AES.py
  165. +28 −0 tlslite/utils/Cryptlib_RC4.py
  166. +35 −0 tlslite/utils/Cryptlib_TripleDES.py
  167. +49 −0 tlslite/utils/OpenSSL_AES.py
  168. +25 −0 tlslite/utils/OpenSSL_RC4.py
  169. +148 −0 tlslite/utils/OpenSSL_RSAKey.py
  170. +44 −0 tlslite/utils/OpenSSL_TripleDES.py
  171. +22 −0 tlslite/utils/PyCrypto_AES.py
  172. +22 −0 tlslite/utils/PyCrypto_RC4.py
  173. +61 −0 tlslite/utils/PyCrypto_RSAKey.py
  174. +22 −0 tlslite/utils/PyCrypto_TripleDES.py
  175. +68 −0 tlslite/utils/Python_AES.py
  176. +39 −0 tlslite/utils/Python_RC4.py
  177. +209 −0 tlslite/utils/Python_RSAKey.py
  178. +17 −0 tlslite/utils/RC4.py
  179. +264 −0 tlslite/utils/RSAKey.py
  180. +26 −0 tlslite/utils/TripleDES.py
  181. +31 −0 tlslite/utils/__init__.py
  182. +111 −0 tlslite/utils/cipherfactory.py
  183. +94 −0 tlslite/utils/codec.py
  184. +399 −0 tlslite/utils/cryptomath.py
  185. +75 −0 tlslite/utils/dateFuncs.py
  186. +173 −0 tlslite/utils/entropy.c
  187. +104 −0 tlslite/utils/hmac.py
  188. +195 −0 tlslite/utils/jython_compat.py
  189. +243 −0 tlslite/utils/keyfactory.py
  190. +392 −0 tlslite/utils/rijndael.py
  191. +63 −0 tlslite/utils/win32prng.c
  192. +201 −0 tlslite/utils/xmltools.py
  193. +3,578 −0 usr/share/spade/rma.glade
  194. +5 −0 win_setup.py
  195. +31 −0 xmpp/__init__.py
  196. +307 −0 xmpp/auth.py
  197. +216 −0 xmpp/browser.py
  198. +312 −0 xmpp/client.py
  199. +330 −0 xmpp/commands.py
  200. +423 −0 xmpp/debug.py
  201. +375 −0 xmpp/dispatcher.py
  202. +182 −0 xmpp/features.py
  203. +199 −0 xmpp/filetransfer.py
  204. +705 −0 xmpp/protocol.py
  205. +184 −0 xmpp/roster.py
  206. +351 −0 xmpp/session.py
  207. +381 −0 xmpp/simplexml.py
  208. +332 −0 xmpp/transports.py
  209. +164 −0 xmppd/README
  210. +1 −0 xmppd/__init__.py
  211. +19 −0 xmppd/generate-cert.py
  212. +340 −0 xmppd/gpl.txt
  213. +84 −0 xmppd/locales.py
  214. +43 −0 xmppd/modules/__init__.py
  215. +190 −0 xmppd/modules/config.py
  216. +388 −0 xmppd/modules/db_fake.py
  217. +88 −0 xmppd/modules/dialback.py
  218. +61 −0 xmppd/modules/jep0077.py
  219. +57 −0 xmppd/modules/jep0078.py
  220. +109 −0 xmppd/modules/message.py
  221. +3,269 −0 xmppd/modules/muc.py
  222. +282 −0 xmppd/modules/roster.py
  223. +1,424 −0 xmppd/modules/router.py
  224. +395 −0 xmppd/modules/stream.py
  225. +52 −0 xmppd/modules/web/webadmin.css
  226. +290 −0 xmppd/modules/webadmin.py
  227. +229 −0 xmppd/modules/wq.py
  228. +161 −0 xmppd/socker/router.py
  229. +663 −0 xmppd/socker/socker.py
  230. +28 −0 xmppd/thx1138.pem
  231. +30 −0 xmppd/tools/client.py
  232. +86 −0 xmppd/tools/ping.py
  233. +32 −0 xmppd/tools/xsend.py
  234. +7 −0 xmppd/xmppd.cfg
  235. +31 −0 xmppd/xmppd.pem
  236. +1,576 −0 xmppd/xmppd.py
  237. +17 −0 xmppd/xmppd.xml
504 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,104 @@
+# -*-shell-script-*-
+
+[Meta]
+RootName: @magentix.gti-ia.dsic.upv.es/spade:$SOFTWAREVERSION
+DisplayName: SPADE Multi-Agent Platform
+ShortName: spade
+Maintainer: Gustavo Aranda <garanda@dsic.upv.es>
+Packager: Gustavo Aranda <garanda@dsic.upv.es>
+Summary: SPADE (Smart Python multi-Agent Development Environment)
+URL: http://spade.gti-ia.dsic.upv.es
+License: GNU General Public License, Version 2
+SoftwareVersion: 1.9.8
+AutopackageTarget: 1.0
+
+# Only uncomment InterfaceVersion if your package exposes interfaces to other software,
+# for instance if it includes DSOs or python/perl modules. See the developer guide for more info,
+# or ask on autopackage-dev if you don't understand interface versioning in autopackage.
+#
+# InterfaceVersion: 0.0
+
+[Description]
+SPADE (Smart Python multi-Agent Development Environment)
+
+[BuildPrepare]
+#prepareBuild
+
+#[BuildUnprepare]
+#unprepareBuild
+
+[Imports]
+#echo '*' | import
+#echo $source_dir/* | import
+import << EOF
+$source_dir/configure.py
+$source_dir/setup.py
+$source_dir/runspade.py
+$source_dir/gspade.py
+$source_dir/spade.sh
+$source_dir/gspade.sh
+$source_dir/etc
+$source_dir/readme.txt
+$source_dir/doc
+$source_dir/spade
+$source_dir/usr
+$source_dir/xmpp
+$source_dir/xmppd
+$source_dir/tlslite
+EOF
+
+[Prepare]
+# Dependency checking
+#require @whatever.you/need 1.0
+requireFile /usr/bin/python
+testForPythonModule distutils
+
+[Install]
+# Put your installation script here
+#installExe bin/*
+#echo $AUTOPACKAGE_FRONTEND
+outputTest "hostname"
+if [ -e /usr/bin/zenity ] && [ $AUTOPACKAGE_FRONTEND != "apkg-ttyfe" ]; then
+ hostname=`zenity --entry --text "Please type the hostname" --entry-text $HOSTNAME`
+#fi;
+#if [ -z $hostname ]; then
+else
+ #S3="Your choice: "
+ #OPTIONS="localhost $HOSTNAME"
+ if [ -e /usr/bin/dialog ]; then
+ hostname=`dialog --clear --stdout --inputbox "Please type the hostname" 10 50 $HOSTNAME`
+ #OPTIONS="$OPTIONS Other..."
+ else
+ hostname=$HOSTNAME
+ fi;
+ #echo -n "Please select hostname: "
+ #select opt in $OPTIONS; do
+ # if [ $opt == "Other..." ]; then
+ #echo -n "Insert new hostname: "
+ #read hostname|true
+ # break
+ # else
+ # hostname=$opt
+ # break
+ # fi;
+ #done
+fi;
+outputTestPass
+outputTest "SPADE pre-configuration"
+python configure.py $hostname
+outputTestPass
+outputTest "SPADE platform installation"
+python setup.py install
+mv /usr/bin/spade.sh /usr/bin/spade
+chmod +x /usr/bin/spade
+mv /usr/bin/gspade.sh /usr/bin/gspade
+chmod +x /usr/bin/gspade
+outputTestPass
+
+#installDesktop "Applications" spade.desktop
+
+[Uninstall]
+# Usually just the following line is enough to uninstall everything
+rm -rf /etc/spade /usr/share/spade /usr/bin/runspade.py /usr/bin/gspade.py /usr/share/doc/spade /usr/bin/spade /usr/bin/gspade
+#uninstallFromLog
+
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+
+import sys
+import string
+import random
+import os
+import socket
+
+
+globalhostname = ""
+
+def generateCode():
+ # Fill the template with the correct data
+
+ global jabber_template
+ global globalhostname
+
+ if os.name == "posix":
+ # If no hostname was previously specified, get one from the system
+ if globalhostname == "":
+ hostname = socket.gethostname()
+ else:
+ hostname = globalhostname
+
+ path = os.sep+"usr"+os.sep+"share"+os.sep+"spade"
+ else:
+ # If no hostname was previously specified, get one from the system
+ if globalhostname == "":
+ hostname = socket.gethostbyaddr(socket.gethostname())[0]
+ else:
+ hostname = globalhostname
+ path = "usr"+os.sep+"share"+os.sep+"spade"
+
+ acc_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+ ams_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+ df_passwd = "".join([string.ascii_letters[int(random.randint(0,len(string.ascii_letters)-1))] for a in range(8)])
+
+
+ spadexml = """
+ <spade>
+
+ <platform>
+ <hostname>""" + hostname + """</hostname>
+ <port>5222</port>
+ <path>"""+path+"""</path>
+ </platform>
+
+ <acc>
+ <hostname>acc."""+hostname+"""</hostname>
+ <password>"""+acc_passwd+"""</password>
+ <port>5222</port>
+ #MTPS#
+ </acc>
+
+ <ams>
+ <hostname>ams."""+hostname+"""</hostname>
+ <password>"""+ams_passwd+"""</password>
+ <port>5222</port>
+ </ams>
+
+ <df>
+ <hostname>df."""+hostname+"""</hostname>
+ <password>"""+df_passwd+"""</password>
+ <port>5222</port>
+ </df>
+
+ </spade>
+ """
+
+ # Now fill the MTPs information
+ mtp_str = "\n"
+ for file in os.listdir("spade/mtp"):
+ try:
+ # If its a python script
+ if file[-3:] == ".py":
+ fname = file[:-3]
+ mtp_str = mtp_str + '''\t\t\t<mtp name="''' + fname + '''">\n\t\t\t\t<instance>''' + fname + '''</instance>\n'''
+ mtp_str = mtp_str + """\t\t\t\t<protocol>""" + fname + """</protocol>\n"""
+ mtp_str = mtp_str + """\t\t\t</mtp>\n\n"""
+ except Exception, e:
+ print "EXCEPTION GETTING MTPS: ", str(e)
+
+ # Fill the data
+ spadexml = spadexml.replace("#MTPS#", mtp_str)
+
+ file = open("etc/spade.xml", "w+")
+ file.write(spadexml)
+ file.close()
+
+ # Generating real xmppd.xml
+ if os.name == 'posix':
+ xmppdxml = '''
+ <server>
+ <servernames>
+ <name>'''+hostname+'''</name>
+ </servernames>
+ <certificate file="xmppd.pem"/>
+ <spool path="'''+str(os.environ['HOME'])+'''/.spade/spool"/>
+ <plugins>
+ <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
+ <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
+ </plugins>
+ <components>
+ <AMS jid="ams.'''+hostname+'''" name="AMS" username="ams" password="'''+ams_passwd+'''"/>
+ <DF jid="df.'''+hostname+'''" name="DF" username="df" password="'''+df_passwd+'''"/>
+ <ACC jid="acc.'''+hostname+'''" name="ACC" username="acc" password="'''+acc_passwd+'''"/>
+ </components>
+ </server>
+ '''
+ else:
+ xmppdxml = '''
+ <server>
+ <servernames>
+ <name>'''+hostname+'''</name>
+ </servernames>
+ <certificate file="xmppd.pem"/>
+ <spool path="usr/share/spade/xmppd/spool"/>
+ <plugins>
+ <MUC jid="muc.'''+hostname+'''" name="SPADE MUC Component"/>
+ <WQ jid="wq.'''+hostname+'''" name="SPADE Workgroup Queues"/>
+ </plugins>
+ <components>
+ <AMS jid="ams.'''+hostname+'''" name="AMS" username="ams" password="'''+ams_passwd+'''"/>
+ <DF jid="df.'''+hostname+'''" name="DF" username="df" password="'''+df_passwd+'''"/>
+ <ACC jid="acc.'''+hostname+'''" name="ACC" username="acc" password="'''+acc_passwd+'''"/>
+ </components>
+ </server>
+ '''
+
+ file = open("etc/xmppd.xml", "w+")
+ file.write(xmppdxml)
+ file.close()
+
+
+
+if __name__ == '__main__':
+ # We look for a command line parameter
+ if len(sys.argv) > 1:
+ # There is a parameter
+ globalhostname = sys.argv[1]
+ else:
+ # There is no parameter (i.e. macho-mode)
+ pass
+
+ generateCode()
+
Binary file not shown.
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+svn ci -m "packaging"
+svn export . tmp
+cd tmp
+makeinstaller
+mv *.package ../bin/setup.bin
+echo "moved to bin/setup.bin"
+cd ..
+rm -rf tmp
+echo ":-)"
Oops, something went wrong.

0 comments on commit f6c7e63

Please sign in to comment.