summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-10 19:17:11 +0100
committermathieui <mathieui@mathieui.net>2020-12-10 19:22:40 +0100
commit010bf6dd70a44d9e9087336bc955a591ab9248b3 (patch)
tree2e8d45b925f191b73845510a567abfe267e7a6f1 /docs/howto
parent9d616552153b48375a594466266d99b368d074b8 (diff)
downloadslixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.gz
slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.bz2
slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.tar.xz
slixmpp-010bf6dd70a44d9e9087336bc955a591ab9248b3.zip
docs: fix rest issues
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/make_plugin_extension_for_message_and_iq.pl.rst172
-rw-r--r--docs/howto/make_plugin_extension_for_message_and_iq.rst172
2 files changed, 172 insertions, 172 deletions
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