diff options
author | mathieui <mathieui@mathieui.net> | 2020-12-10 19:17:11 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-12-10 19:22:40 +0100 |
commit | 010bf6dd70a44d9e9087336bc955a591ab9248b3 (patch) | |
tree | 2e8d45b925f191b73845510a567abfe267e7a6f1 /docs | |
parent | 9d616552153b48375a594466266d99b368d074b8 (diff) | |
download | slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.gz slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.bz2 slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.xz slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.zip |
docs: fix rest issues
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api/stanza/iq.rst | 1 | ||||
-rw-r--r-- | docs/api/stanza/message.rst | 1 | ||||
-rw-r--r-- | docs/api/xmlstream/tostring.rst | 1 | ||||
-rw-r--r-- | docs/event_index.rst | 8 | ||||
-rw-r--r-- | docs/glossary.rst | 8 | ||||
-rw-r--r-- | docs/howto/make_plugin_extension_for_message_and_iq.pl.rst | 172 | ||||
-rw-r--r-- | docs/howto/make_plugin_extension_for_message_and_iq.rst | 172 | ||||
-rw-r--r-- | docs/license.rst | 3 | ||||
-rw-r--r-- | docs/xmpp_tdg.rst | 24 |
9 files changed, 197 insertions, 193 deletions
diff --git a/docs/api/stanza/iq.rst b/docs/api/stanza/iq.rst index 0a7d7ffb..e1e9a89f 100644 --- a/docs/api/stanza/iq.rst +++ b/docs/api/stanza/iq.rst @@ -2,6 +2,7 @@ IQ Stanza ========= .. module:: slixmpp.stanza + :noindex: .. autoclass:: Iq :members: diff --git a/docs/api/stanza/message.rst b/docs/api/stanza/message.rst index f01c62a7..3292ca08 100644 --- a/docs/api/stanza/message.rst +++ b/docs/api/stanza/message.rst @@ -2,6 +2,7 @@ Message Stanza ============== .. module:: slixmpp.stanza + :noindex: .. autoclass:: Message :members: diff --git a/docs/api/xmlstream/tostring.rst b/docs/api/xmlstream/tostring.rst index 107e97b0..dae2906b 100644 --- a/docs/api/xmlstream/tostring.rst +++ b/docs/api/xmlstream/tostring.rst @@ -1,4 +1,5 @@ .. module:: slixmpp.xmlstream.tostring + :noindex: .. _tostring: diff --git a/docs/event_index.rst b/docs/event_index.rst index 84655534..8ab18a6a 100644 --- a/docs/event_index.rst +++ b/docs/event_index.rst @@ -309,10 +309,6 @@ Event Index - **Data:** :py:class:`~slixmpp.Message` - **Source:** :py:class:`~slixmpp.plugins.xep_0333.XEP_0333` - message_correction - - **Data:** :py:class:`~slixmpp.Message` - - **Source:** :py:class:`~slixmpp.plugins.xep_0308.XEP_0308` - attention - **Data:** :py:class:`~slixmpp.Message` - **Source:** :py:class:`~slixmpp.plugins.xep_0224.XEP_0224` @@ -408,7 +404,3 @@ Event Index pubsub_subscription - **Data:** :py:class:`~slixmpp.Message` - **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060` - - pubsub_retract - - **Data:** :py:class:`~slixmpp.Message` - - **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060` diff --git a/docs/glossary.rst b/docs/glossary.rst index 435df102..8943af17 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -32,3 +32,11 @@ Glossary substanza See :term:`stanza plugin` + + interfaces + A set of keys defined on a :term:`stanza plugin`. + + stanza + An XML payload sent over the XML stream, which is the root of XMPP. + A stanza is either ``<iq/>``, ``<message/>`` or ``<presence/>``. Other + elements are called nonzas. diff --git a/docs/howto/make_plugin_extension_for_message_and_iq.pl.rst b/docs/howto/make_plugin_extension_for_message_and_iq.pl.rst index fb00cbf7..811de8b1 100644 --- a/docs/howto/make_plugin_extension_for_message_and_iq.pl.rst +++ b/docs/howto/make_plugin_extension_for_message_and_iq.pl.rst @@ -76,49 +76,49 @@ Plik zawiera prostą strukturę, która pozwoli nam zapisać dane logowania. .. code-block:: python
-#!/usr/bin/python3
-#File: /usr/bin/test_slixmpp & permissions rwx--x--x (711)
-
-import subprocess
-import time
-
-if __name__ == "__main__":
- #~ prefix = ["x-terminal-emulator", "-e"] # Osobny terminal dla kazdego klienta, może być zastąpiony inną konsolą.
- #~ prefix = ["xterm", "-e"]
- prefix = []
- #~ suffix = ["-d"] # Debug
- #~ suffix = ["-q"] # Quiet
- suffix = []
-
- sender_path = "./example/sender.py"
- sender_jid = "SENDER_JID"
- sender_password = "SENDER_PASSWORD"
-
- example_file = "./test_example_tag.xml"
-
- responder_path = "./example/responder.py"
- responder_jid = "RESPONDER_JID"
- responder_password = "RESPONDER_PASSWORD"
-
- # Remember about the executable permission. (`chmod +x ./file.py`)
- SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix
- RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix
-
- try:
- responder = subprocess.Popen(RESPON_TEST)
- sender = subprocess.Popen(SENDER_TEST)
- responder.wait()
- sender.wait()
- except:
- try:
- responder.terminate()
- except NameError:
- pass
- try:
- sender.terminate()
- except NameError:
- pass
- raise
+ #!/usr/bin/python3
+ #File: /usr/bin/test_slixmpp & permissions rwx--x--x (711)
+
+ import subprocess
+ import time
+
+ if __name__ == "__main__":
+ #~ prefix = ["x-terminal-emulator", "-e"] # Osobny terminal dla kazdego klienta, może być zastąpiony inną konsolą.
+ #~ prefix = ["xterm", "-e"]
+ prefix = []
+ #~ suffix = ["-d"] # Debug
+ #~ suffix = ["-q"] # Quiet
+ suffix = []
+
+ sender_path = "./example/sender.py"
+ sender_jid = "SENDER_JID"
+ sender_password = "SENDER_PASSWORD"
+
+ example_file = "./test_example_tag.xml"
+
+ responder_path = "./example/responder.py"
+ responder_jid = "RESPONDER_JID"
+ responder_password = "RESPONDER_PASSWORD"
+
+ # Remember about the executable permission. (`chmod +x ./file.py`)
+ SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix
+ RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix
+
+ try:
+ responder = subprocess.Popen(RESPON_TEST)
+ sender = subprocess.Popen(SENDER_TEST)
+ responder.wait()
+ sender.wait()
+ except:
+ try:
+ responder.terminate()
+ except NameError:
+ pass
+ try:
+ sender.terminate()
+ except NameError:
+ pass
+ raise
Skrypt uruchamiający powinien być dostosowany do potrzeb urzytkownika: można w nim pobierać ścieżki do projektu z linii komend (przez `'sys.argv[...]'` lub `'os.getcwd()'`), wybierać z jaką flagą mają zostać uruchomione programy oraz wiele innych. Jego należyte przygotowanie pozwoli zaoszczędzić czas i nerwy podczas późniejszych prac.
@@ -1263,49 +1263,49 @@ W poniższym kodzie zostały pozostawione oryginalne komentarze w języku angiel .. code-block:: python
-#!/usr/bin/python3
-#File: /usr/bin/test_slixmpp & permissions rwx--x--x (711)
-
-import subprocess
-import time
-
-if __name__ == "__main__":
- #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal
- #~ prefix = ["xterm", "-e"]
- prefix = []
- #~ suffix = ["-d"] # Debug
- #~ suffix = ["-q"] # Quiet
- suffix = []
-
- sender_path = "./example/sender.py"
- sender_jid = "SENDER_JID"
- sender_password = "SENDER_PASSWORD"
-
- example_file = "./test_example_tag.xml"
-
- responder_path = "./example/responder.py"
- responder_jid = "RESPONDER_JID"
- responder_password = "RESPONDER_PASSWORD"
-
- # Remember about the executable permission. (`chmod +x ./file.py`)
- SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix
- RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix
-
- try:
- responder = subprocess.Popen(RESPON_TEST)
- sender = subprocess.Popen(SENDER_TEST)
- responder.wait()
- sender.wait()
- except:
- try:
- responder.terminate()
- except NameError:
- pass
- try:
- sender.terminate()
- except NameError:
- pass
- raise
+ #!/usr/bin/python3
+ #File: /usr/bin/test_slixmpp & permissions rwx--x--x (711)
+
+ import subprocess
+ import time
+
+ if __name__ == "__main__":
+ #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal
+ #~ prefix = ["xterm", "-e"]
+ prefix = []
+ #~ suffix = ["-d"] # Debug
+ #~ suffix = ["-q"] # Quiet
+ suffix = []
+
+ sender_path = "./example/sender.py"
+ sender_jid = "SENDER_JID"
+ sender_password = "SENDER_PASSWORD"
+
+ example_file = "./test_example_tag.xml"
+
+ responder_path = "./example/responder.py"
+ responder_jid = "RESPONDER_JID"
+ responder_password = "RESPONDER_PASSWORD"
+
+ # Remember about the executable permission. (`chmod +x ./file.py`)
+ SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix
+ RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix
+
+ try:
+ responder = subprocess.Popen(RESPON_TEST)
+ sender = subprocess.Popen(SENDER_TEST)
+ responder.wait()
+ sender.wait()
+ except:
+ try:
+ responder.terminate()
+ except NameError:
+ pass
+ try:
+ sender.terminate()
+ except NameError:
+ pass
+ raise
.. code-block:: python
diff --git a/docs/howto/make_plugin_extension_for_message_and_iq.rst b/docs/howto/make_plugin_extension_for_message_and_iq.rst index 3a7784b8..54a9949c 100644 --- a/docs/howto/make_plugin_extension_for_message_and_iq.rst +++ b/docs/howto/make_plugin_extension_for_message_and_iq.rst @@ -76,49 +76,49 @@ This file contains a simple structure for logging credentials: .. code-block:: python -#!/usr/bin/python3 -#File: /usr/bin/test_slixmpp & permissions rwx--x--x (711) - -import subprocess -import time - -if __name__ == "__main__": - #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal - #~ prefix = ["xterm", "-e"] - prefix = [] - #~ suffix = ["-d"] # Debug - #~ suffix = ["-q"] # Quiet - suffix = [] - - sender_path = "./example/sender.py" - sender_jid = "SENDER_JID" - sender_password = "SENDER_PASSWORD" - - example_file = "./test_example_tag.xml" - - responder_path = "./example/responder.py" - responder_jid = "RESPONDER_JID" - responder_password = "RESPONDER_PASSWORD" - - # Remember about the executable permission. (`chmod +x ./file.py`) - SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix - RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix - - try: - responder = subprocess.Popen(RESPON_TEST) - sender = subprocess.Popen(SENDER_TEST) - responder.wait() - sender.wait() - except: - try: - responder.terminate() - except NameError: - pass - try: - sender.terminate() - except NameError: - pass - raise + #!/usr/bin/python3 + #File: /usr/bin/test_slixmpp & permissions rwx--x--x (711) + + import subprocess + import time + + if __name__ == "__main__": + #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal + #~ prefix = ["xterm", "-e"] + prefix = [] + #~ suffix = ["-d"] # Debug + #~ suffix = ["-q"] # Quiet + suffix = [] + + sender_path = "./example/sender.py" + sender_jid = "SENDER_JID" + sender_password = "SENDER_PASSWORD" + + example_file = "./test_example_tag.xml" + + responder_path = "./example/responder.py" + responder_jid = "RESPONDER_JID" + responder_password = "RESPONDER_PASSWORD" + + # Remember about the executable permission. (`chmod +x ./file.py`) + SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix + RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix + + try: + responder = subprocess.Popen(RESPON_TEST) + sender = subprocess.Popen(SENDER_TEST) + responder.wait() + sender.wait() + except: + try: + responder.terminate() + except NameError: + pass + try: + sender.terminate() + except NameError: + pass + raise The launch script should be convenient in use and easy to reconfigure again. The proper preparation of it now, can help saving time in the future. Logging credentials, the project paths (from `'sys.argv[...]'` or `'os.getcwd()'`), set the parameters for the debugging purposes, mock the testing xml file and many more things can be defined inside. Whichever parameters are used, the script testing itself should be fast and effortless. The proper preparation of it now, can help saving time in the future. @@ -1260,49 +1260,49 @@ Complete code from tutorial .. code-block:: python -#!/usr/bin/python3 -#File: /usr/bin/test_slixmpp & permissions rwx--x--x (711) - -import subprocess -import time - -if __name__ == "__main__": - #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal - #~ prefix = ["xterm", "-e"] - prefix = [] - #~ suffix = ["-d"] # Debug - #~ suffix = ["-q"] # Quiet - suffix = [] - - sender_path = "./example/sender.py" - sender_jid = "SENDER_JID" - sender_password = "SENDER_PASSWORD" - - example_file = "./test_example_tag.xml" - - responder_path = "./example/responder.py" - responder_jid = "RESPONDER_JID" - responder_password = "RESPONDER_PASSWORD" - - # Remember about the executable permission. (`chmod +x ./file.py`) - SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix - RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix - - try: - responder = subprocess.Popen(RESPON_TEST) - sender = subprocess.Popen(SENDER_TEST) - responder.wait() - sender.wait() - except: - try: - responder.terminate() - except NameError: - pass - try: - sender.terminate() - except NameError: - pass - raise + #!/usr/bin/python3 + #File: /usr/bin/test_slixmpp & permissions rwx--x--x (711) + + import subprocess + import time + + if __name__ == "__main__": + #~ prefix = ["x-terminal-emulator", "-e"] # Separate terminal for every client; can be replaced with other terminal + #~ prefix = ["xterm", "-e"] + prefix = [] + #~ suffix = ["-d"] # Debug + #~ suffix = ["-q"] # Quiet + suffix = [] + + sender_path = "./example/sender.py" + sender_jid = "SENDER_JID" + sender_password = "SENDER_PASSWORD" + + example_file = "./test_example_tag.xml" + + responder_path = "./example/responder.py" + responder_jid = "RESPONDER_JID" + responder_password = "RESPONDER_PASSWORD" + + # Remember about the executable permission. (`chmod +x ./file.py`) + SENDER_TEST = prefix + [sender_path, "-j", sender_jid, "-p", sender_password, "-t", responder_jid, "--path", example_file] + suffix + RESPON_TEST = prefix + [responder_path, "-j", responder_jid, "-p", responder_password] + suffix + + try: + responder = subprocess.Popen(RESPON_TEST) + sender = subprocess.Popen(SENDER_TEST) + responder.wait() + sender.wait() + except: + try: + responder.terminate() + except NameError: + pass + try: + sender.terminate() + except NameError: + pass + raise .. code-block:: python diff --git a/docs/license.rst b/docs/license.rst index d9505344..7b0fbc99 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,4 +2,5 @@ License (MIT) ============= -.. include:: ../LICENSE + +.. literalinclude:: ../LICENSE diff --git a/docs/xmpp_tdg.rst b/docs/xmpp_tdg.rst index b14fd9e1..53194e13 100644 --- a/docs/xmpp_tdg.rst +++ b/docs/xmpp_tdg.rst @@ -38,8 +38,8 @@ Updated Code def handleIncomingMessage(self, message): self.xmpp.send_message(message["from"], message["body"]) -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/EchoBot/EchoBot.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/EchoBot/EchoBot.py>`_ +`View full source (1) <http://github.com/legastero/xmpp-tdg/blob/master/code/EchoBot/EchoBot.py>`_ | +`View original code (1) <http://github.com/remko/xmpp-tdg/blob/master/code/EchoBot/EchoBot.py>`_ Example 14-1. (Page 215) ------------------------ @@ -88,8 +88,8 @@ Updated Code for subscriberJID in self.backend.getSubscriberJIDs(message.user) : self.xmpp.send_message(subscriberJID, body, mhtml=htmlBody) -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/Bot.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/Bot.py>`_ +`View full source (2) <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/Bot.py>`_ | +`View original code (2) <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/Bot.py>`_ Example 14-3. (Page 217) @@ -131,8 +131,8 @@ Updated Code if self.backend.getShouldMonitorPresenceFromUser(user): self.handleIncomingXMPPEvent(event) -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/ConfigurableBot.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/ConfigurableBot.py>`_ +`View full source (3) <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/ConfigurableBot.py>`_ | +`View original code (3) <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/ConfigurableBot.py>`_ Example 14-4. (Page 220) @@ -176,8 +176,8 @@ Updated Code for subscriberJID in self.backend.getSubscriberJIDs(message.user) : self.xmpp.send_message(subscriberJID, body, mfrom=self.xmpp.jid) -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/SimpleComponent.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/SimpleComponent.py>`_ +`View full source (4) <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/SimpleComponent.py>`_ | +`View original code (4) <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/SimpleComponent.py>`_ Example 14-6. (Page 223) @@ -195,8 +195,8 @@ implementation should work correctly. To see how to implement in-band registration as a Slixmpp plugin, see the tutorial :ref:`tutorial-create-plugin`. -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ +`View full source (5) <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ | +`View original code (5) <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/RegistrableComponent.py>`_ Example 14-7. (Page 225) ------------------------ @@ -245,5 +245,5 @@ Updated Code if contactJID == self.componentDomain : self.sendAllContactSubscriptionRequestsToUser(userJID) -`View full source <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/Component.py>`_ | -`View original code <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/Component.py>`_ +`View full source (6) <http://github.com/legastero/xmpp-tdg/blob/master/code/CheshiR/Component.py>`_ | +`View original code (6) <http://github.com/remko/xmpp-tdg/blob/master/code/CheshiR/Component.py>`_ |