From e9eb21395fd1bc0eb26e7ae4c9a8b1cb14ac1711 Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:54:58 +0200 Subject: [PATCH 1/8] Update ts3plugin.py --- ressources/python/ts3plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/python/ts3plugin.py b/ressources/python/ts3plugin.py index 67c6656..739261e 100644 --- a/ressources/python/ts3plugin.py +++ b/ressources/python/ts3plugin.py @@ -46,7 +46,7 @@ class ts3plugin(object, metaclass=PluginMount): requestAutoload = False name = "__ts3plugin__" version = "1.0" - apiVersion = 21 + apiVersion = 23 author = "Thomas \"PLuS\" Pathmann" description = "This is the baseclass for all ts3 python plugins" offersConfigure = False From 591f89b8c3ab09562c13490d78334340467867d6 Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:56:07 +0200 Subject: [PATCH 2/8] Update pytson.py --- ressources/python/pytson.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/python/pytson.py b/ressources/python/pytson.py index 10ab106..1971cdb 100644 --- a/ressources/python/pytson.py +++ b/ressources/python/pytson.py @@ -145,4 +145,4 @@ def getCurrentApiVersion(): @return: the apiVersion @rtype: str """ - return 21 + return 23 From 5579a4ea9298854e7d207c515a9e78535e9d0f33 Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:57:07 +0200 Subject: [PATCH 3/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 26018d1..e5b3f2c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ class testplugin(ts3plugin): name = "test" requestAutoload = False version = "1.0" - apiVersion = 21 + apiVersion = 23 author = "Thomas \"PLuS\" Pathmann" description = "This is a testplugin" offersConfigure = True From 38a8135d3d1973d0e504c8df58a53eb199065581 Mon Sep 17 00:00:00 2001 From: "prettifier[bot]" <45367598+prettifier[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2019 22:57:09 +0000 Subject: [PATCH 4/8] Prettify README.md --- README.md | 94 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index e5b3f2c..10d805a 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,65 @@ [![Build Status](https://build.4qt.de/buildStatus/icon?job=pyTSon)](https://build.4qt.de/job/pyTSon/) [![Gitter chat](https://badges.gitter.im/pyTSon-ts3/gitter.png)](https://gitter.im/pyTSon-ts3/Lobby) [![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=thomas.pathmann%40gmail%2ecom&lc=GB&item_name=pyTSon¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted) # pyTSon + pyTSon is a plugin for the TeamSpeak 3 client, it offers a python3 interface for the plugin sdk. pyTSon has a minimum C/C++ part, so that the main plugin runs in embedded python. Current used python version is Python 3.5.2. -Batteries included -================== +# Batteries included + The python standard library is included, either built in the plugin or bundled in the lib directory (which is in sys.path by default). pyTSon has PythonQt included, so that scripts can have UIs written in python, see pyTSon's own configdialog or the scripting console for examples. -Dependencies -============ +# Dependencies + pyTSon has multiple layers of dependencies listed below. -Generating Code ---------------- -* [Python3](https://www.python.org/download/releases/3.0/) -* [pycparser](https://github.com/eliben/pycparser/) -* [jinja2](http://jinja.pocoo.org) - -Generating Documentation ------------------------- -* [Python3](https://www.python.org/download/releases/3.0/) -* [epydoc](http://epydoc.sourceforge.net) (which is only available for Python2, so we'll switch to another doctool in the future) - -Building --------- -* [Qt 5.12.1](https://download.qt.io/archive/qt/5.12/5.12.1/) (which is the version, the TeamSpeak 3 client is currently using) -* [Python 3.5.2](https://www.python.org/downloads/release/python-352/#Files) (configure with --enable-shared) -* [PythonQt](https://github.com/pathmann/PythonQt) -* [patchelf](http://nixos.org/patchelf.html) (linux; Version >= 0.9) - -Running -------- -* None! (At least none you have to care about, python is deployed with the plugin) - -How to use -========== +## Generating Code + +- [Python3](https://www.python.org/download/releases/3.0/) +- [pycparser](https://github.com/eliben/pycparser/) +- [jinja2](http://jinja.pocoo.org) + +## Generating Documentation + +- [Python3](https://www.python.org/download/releases/3.0/) +- [epydoc](http://epydoc.sourceforge.net) (which is only available for Python2, so we'll switch to another doctool in the future) + +## Building + +- [Qt 5.12.1](https://download.qt.io/archive/qt/5.12/5.12.1/) (which is the version, the TeamSpeak 3 client is currently using) +- [Python 3.5.2](https://www.python.org/downloads/release/python-352/#Files) (configure with --enable-shared) +- [PythonQt](https://github.com/pathmann/PythonQt) +- [patchelf](http://nixos.org/patchelf.html) (linux; Version >= 0.9) + +## Running + +- None! (At least none you have to care about, python is deployed with the plugin) + +# How to use + 1. Get the latest release for your Teamspeak client [here](https://github.com/pathmann/pyTSon/releases/) or compile the source yourself. -3. Restart your Teamspeak Client. -4. Download or write any pyTSon script and place it in `%APPDATA%\TS3Client\plugins\pyTSon\scripts\` on windows resp. `~/.ts3client/plugins/pyTSon/scripts/` on unix. -5. In your client click on "Plugins" => "pyTSon" => "Settings" and on the settings dialog click on "Reload All" and check the plugins checkbox if it's not checked already. - -How to build -============ -* Adjust the python include and lib path in [python.pri](https://github.com/pathmann/pyTSon/blob/master/python.pri) or run qmake with `qmake [...] PYTHONPATH=` -* Download/Clone PythonQt from [here](https://github.com/pathmann/PythonQt) to includes/ +2. Restart your Teamspeak Client. +3. Download or write any pyTSon script and place it in `%APPDATA%\TS3Client\plugins\pyTSon\scripts\` on windows resp. `~/.ts3client/plugins/pyTSon/scripts/` on unix. +4. In your client click on "Plugins" => "pyTSon" => "Settings" and on the settings dialog click on "Reload All" and check the plugins checkbox if it's not checked already. + +# How to build + +- Adjust the python include and lib path in [python.pri](https://github.com/pathmann/pyTSon/blob/master/python.pri) or run qmake with `qmake [...] PYTHONPATH=` +- Download/Clone PythonQt from [here](https://github.com/pathmann/PythonQt) to includes/ + ``` qmake (n)make ``` + Done -How to develop a python plugin -============================== -Create a *.py file in \/plugins/pyTSon/scripts/\ with a subclass of ts3plugin. +# How to develop a python plugin + +Create a \*.py file in \/plugins/pyTSon/scripts/\ with a subclass of ts3plugin. Needed class attributes are requestAutoload, name, version, apiVersion, author, description, offersConfigure, commandKeyword, infoTitle, menuItems, hotkeys. Otherwise pyTSon refuses to load the plugin. See ts3plugin.py or the documentation for a description of each attribute. @@ -67,6 +70,7 @@ TeamSpeak 3's library functions are available with the ts3lib module (eg err, my Constants are available in the ts3defines module (see ts3defines.py in include/ directory). Below is a small example plugin: + ```python from ts3plugin import ts3plugin @@ -98,14 +102,14 @@ class testplugin(ts3plugin): else: ts3lib.printMessageToCurrentTab("got error %s" % err) ``` -Repository -========== -pyTSon can load plugins from online repositories. [pyTSon master](https://github.com/pathmann/pyTSon_repository) is included by default. Check [the Readme](https://github.com/pathmann/pyTSon_repository/blob/master/README.md) for more information, if you want to setup your own. -Releases -======== +# Repository + +pyTSon can load plugins from online repositories. [pyTSon master](https://github.com/pathmann/pyTSon_repository) is included by default. Check [the Readme](https://github.com/pathmann/pyTSon_repository/blob/master/README.md) for more information, if you want to setup your own. + +# Releases + Personally I work on my linux amd64 machine, other platforms are only tested for basic running, but of course feel free to open an issue, if there is something wrong on your platform and I'll have a look into it. Check the [release page](https://github.com/pathmann/pyTSon/releases) or myteamspeak.com within your client. If you are interested in the most recent version, check [this repository](https://repo.4qt.de/pyTSon/nightlies/) for automatic (untested) builds. - From 04484f468b74cbb3e7da9634681baa6517b931a1 Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:57:39 +0200 Subject: [PATCH 5/8] Update devtools.py --- ressources/python/devtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/python/devtools.py b/ressources/python/devtools.py index d2eab86..ebd7302 100644 --- a/ressources/python/devtools.py +++ b/ressources/python/devtools.py @@ -23,7 +23,7 @@ class PluginInstaller(object): class %s(ts3plugin): name = "%s" - apiVersion = 21 + apiVersion = 23 version = "1.0.0" author = "" description = "" From 9113f4241fb9a62e16ccdf89ade1ab0968608bef Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:58:06 +0200 Subject: [PATCH 6/8] Update repository.ui --- ressources/ui/repository.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ressources/ui/repository.ui b/ressources/ui/repository.ui index ac84e07..a5c6f7c 100644 --- a/ressources/ui/repository.ui +++ b/ressources/ui/repository.ui @@ -273,7 +273,7 @@ p, li { white-space: pre-wrap; } - 21 + 23 true From 636eb474ff910422974e08011ae0c9a04aa9ab2d Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:58:39 +0200 Subject: [PATCH 7/8] Update ts3plugin.cpp.tpl --- templates/ts3plugin.cpp.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ts3plugin.cpp.tpl b/templates/ts3plugin.cpp.tpl index 48e98ad..2fce281 100644 --- a/templates/ts3plugin.cpp.tpl +++ b/templates/ts3plugin.cpp.tpl @@ -61,7 +61,7 @@ class ts3plugin(object): """The name of the plugin. Use meaningful names. It has to be unique in the list of plugins.""" version = "1.0" """Version string of the plugin. pyTSon will use this string to determine, if a new version is available in an online repository.""" - apiVersion = 21 + apiVersion = 23 """apiVersion the plugin was developed for.""" author = "Thomas \"PLuS\" Pathmann" """Let the world know who made the plugin.""" From 2a47ac2752eca706b74ce6bf36cd0725d7cb04be Mon Sep 17 00:00:00 2001 From: Bluscream Date: Tue, 24 Sep 2019 00:59:35 +0200 Subject: [PATCH 8/8] Update ts3plugin.cpp --- generated/pregen/ts3plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated/pregen/ts3plugin.cpp b/generated/pregen/ts3plugin.cpp index d33ec3e..3d49568 100644 --- a/generated/pregen/ts3plugin.cpp +++ b/generated/pregen/ts3plugin.cpp @@ -61,7 +61,7 @@ class ts3plugin(object): """The name of the plugin. Use meaningful names. It has to be unique in the list of plugins.""" version = "1.0" """Version string of the plugin. pyTSon will use this string to determine, if a new version is available in an online repository.""" - apiVersion = 21 + apiVersion = 23 """apiVersion the plugin was developed for.""" author = "Thomas \"PLuS\" Pathmann" """Let the world know who made the plugin."""