Skip to content
Browse files

created

  • Loading branch information...
0 parents commit 24e2d56cf8b84fb7701f422067d2fb7460cd2d22 @d1ffuz0r committed
BIN 1.select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN 2.enter-text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN 3.success.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 Psto/Psto.package-menu
@@ -0,0 +1,3 @@
+<menu>
+ <item caption="Psto" command="psto"/>
+</menu>
33 Psto/Psto.py
@@ -0,0 +1,33 @@
+from sublimeplugin import WindowCommand
+from sublime import statusMessage
+from functools import partial
+from os import path, curdir
+import sys
+sys.path.append(path.abspath(curdir)+'\\xmpppy-0.5.0rc1-py2.5.egg')
+from xmpp import JID, Client, Message
+
+settings = {"jid": "",
+ "password": "",
+ "pstobot": "psto@psto.net",
+ "res": "Sublime Text Psto-Plugin"}
+
+class PstoCommand(WindowCommand):
+ def __init__(self):
+ jid = JID(settings["jid"])
+ conn = Client(jid.getDomain(), debug=[])
+ if not conn.connect():
+ statusMessage("PSTO: connection error")
+ if not conn.auth(jid.getNode(), settings["password"], settings["res"]):
+ statusMessage("PSTO: autentification error")
+ self.conn = conn
+
+ def run(self, window, args):
+ view = window.activeView()
+ window.showInputPanel("Message:", view.name(), partial(self.onDone), None, None)
+
+ def onDone(self, text):
+ if text:
+ self.conn.send(Message(to=settings["pstobot"], body=text))
+ statusMessage("PSTO: Message sended (%s)" % text)
+ else:
+ statusMessage("PSTO: Error. Not message")
BIN Psto/select.pyd
Binary file not shown.
BIN Psto/xmpppy-0.5.0rc1-py2.5.egg
Binary file not shown.
13 readme
@@ -0,0 +1,13 @@
+simple plugin for Sublime Text for sending message on http://psto.net from editor
+
+installing:
+copy Psto to %sublime/text/intall/path%/Data/Packages/
+
+settings:
+username and password for you jabber account set in Psto/Psto.py:
+settings = {"jid": "",
+ "password": "",
+ "pstobot": "psto@psto.net",
+ "res": "Sublime Text Psto-Plugin"}
+
+using: Tools -> Packages -> Psto and see screens

0 comments on commit 24e2d56

Please sign in to comment.
Something went wrong with that request. Please try again.