21 Aug 2020 - The wiki is undergoing a major cleanup. If you arrived here from a search engine and cannot find the page, please use the wiki search instead (top right corner of page)
More info can be found on the forum

Difference between revisions of "Development Tools"

From Official Kodi Wiki
Jump to: navigation, search
(Visual Studio Code)
(Add Codequick framework)
 
(3 intermediate revisions by one other user not shown)
Line 56: Line 56:
  
 
'''Installation'''
 
'''Installation'''
 +
 
Within a python virtual environment of your add-on source code execute `pip install kodistubs`.  
 
Within a python virtual environment of your add-on source code execute `pip install kodistubs`.  
 +
 +
'''Homepage'''
  
 
https://romanvm.github.io/Kodistubs
 
https://romanvm.github.io/Kodistubs
Line 81: Line 84:
  
 
https://romanvm.github.io/script.module.pyxbmct/
 
https://romanvm.github.io/script.module.pyxbmct/
 +
 +
=== Codequick ===
 +
 +
'''Description'''
 +
 +
Codequick is a framework for kodi add-on's. The goal for this framework is to simplify add-on development. This is achieved by reducing the amount of boilerplate code to a minimum, while automating as many tasks that can be automated. Ultimately, allowing the developer to focus primarily on scraping content from websites and passing it to Kodi.
 +
 +
* Route dispatching (callbacks)
 +
* Callback arguments can be any Python object that can be "pickled"
 +
* Delayed execution (execute code after callbacks have returned results)
 +
* No need to set "isplayable" or "isfolder" properties
 +
* Supports both Python 2 and 3
 +
* Auto sort method selection
 +
* Better error reporting
 +
* Full unicode support
 +
* Sets "mediatype" to "video" or "music" depending on listitem type if not set
 +
* Sets "xbmcplugin.setContent" base off mediatype infolabel.
 +
* Sets "xbmcplugin.setPluginCategory" to the title of current folder
 +
* Sets "thumbnail" to add-on icon image if not set
 +
* Sets "fanart" to add-on fanart image if not set
 +
* Sets "icon" to "DefaultFolder.png" or "DefaultVideo.png’ if not set
 +
* Sets "plot" to the listitem title if not set
 +
* Auto type convertion for (str, unicode, int, float, long) infolables and stream info
 +
* Support for media flags e.g. High definition '720p', audio channels '2.0'
 +
* Reimplementation of the listitem class, that makes heavy use of dictionaries
 +
* Built-in support for saved searches
 +
* Youtube.DL intergration (https://forum.kodi.tv/showthread.php?tid=200877)
 +
* URLQuick intergration (http://urlquick.readthedocs.io/en/stable/)
 +
* Youtube intergration
 +
* Supports use of "reuselanguageinvoker"
 +
 +
'''Homepage'''
 +
 +
https://scriptmodulecodequick.readthedocs.io
  
 
== Debugging ==
 
== Debugging ==
  
https://kodi.wiki/view/HOW-TO:Debug_Python_Scripts_with_Web-PDB
+
* https://kodi.wiki/view/HOW-TO:DebugAndDevelopPythonScriptsWithVisualStudio
 +
* https://kodi.wiki/view/HOW-TO:Debug_Python_Scripts_with_Web-PDB
 +
* https://kodi.wiki/view/HOW-TO:Debug_Python_Scripts_with_Eclipse

Latest revision as of 14:41, 9 August 2020

Home icon grey.png   ▶ Development ▶ Add-on development ▶ Development Tools

Below you will find software that can be useful in Add-on Development.

1 Python IDE's

1.1 Visual Studio Code

Platforms

  • Linux
  • Windows
  • macOS

Vsc.png

Description

Code editing. Redefined.Free. Built on open source. Runs everywhere. If you're not a pro or you are not used to work with another IDE, use this.

Note

Install the 'Python' extension by Microsoft.

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!

Homepage

https://code.visualstudio.com/

1.2 PyCharm

Platforms

  • Linux
  • Windows
  • macOS

Pycharm.png

Description

The Python IDE for Professional Developers.

http://www.jetbrains.com/pycharm/

2 Auto Completion Add-ons

2.1 Kodistubs

Kodistubs.png

Description

The main purpose of Kodistubs is to help you to write Kodi addon code in various IDEs by providing code completion, quick access to Kodi Python API docstrings, and code inspection (linting) in IDEs that provide this feature.

When developing Python addons for Kodi it is strongly recommended to use virtual environments to isolate your development dependencies. Virtual environments are supported by all popular Python IDEs.

Installation

Within a python virtual environment of your add-on source code execute `pip install kodistubs`.

Homepage

https://romanvm.github.io/Kodistubs

3 Frameworks

3.1 KodiSwift

Description

KodiSwift is a small framework to ease development of Kodi add-ons. It is an xbmcswift2 fork with API updates. Whether you are an experienced addon developer, or just coding your first addon, you’ll find benefits to using kodiswift.

Homepage

https://xbmcswift2.readthedocs.io/

3.2 PyXBMCt

Description

PyXBMCt is a Python framework for simple Kodi addon UI building. It was inspired by PyQt (hence the name) and shares the same basic principles, so those who are familiar with PyQt/PySide should feel themselves right at home. The framework provides 4 base classes, 9 ready-to-use widgets or, in Kodi terms, controls, a Grid layout manager and an event connection manager. PyXBMCt uses texture images from Kodi’s default Confluence skin to decorate its visual elements. Those textures are included in PyXBMCt, so UI based on it will have the same look in different skins.

Homepage

https://romanvm.github.io/script.module.pyxbmct/

3.3 Codequick

Description

Codequick is a framework for kodi add-on's. The goal for this framework is to simplify add-on development. This is achieved by reducing the amount of boilerplate code to a minimum, while automating as many tasks that can be automated. Ultimately, allowing the developer to focus primarily on scraping content from websites and passing it to Kodi.

  • Route dispatching (callbacks)
  • Callback arguments can be any Python object that can be "pickled"
  • Delayed execution (execute code after callbacks have returned results)
  • No need to set "isplayable" or "isfolder" properties
  • Supports both Python 2 and 3
  • Auto sort method selection
  • Better error reporting
  • Full unicode support
  • Sets "mediatype" to "video" or "music" depending on listitem type if not set
  • Sets "xbmcplugin.setContent" base off mediatype infolabel.
  • Sets "xbmcplugin.setPluginCategory" to the title of current folder
  • Sets "thumbnail" to add-on icon image if not set
  • Sets "fanart" to add-on fanart image if not set
  • Sets "icon" to "DefaultFolder.png" or "DefaultVideo.png’ if not set
  • Sets "plot" to the listitem title if not set
  • Auto type convertion for (str, unicode, int, float, long) infolables and stream info
  • Support for media flags e.g. High definition '720p', audio channels '2.0'
  • Reimplementation of the listitem class, that makes heavy use of dictionaries
  • Built-in support for saved searches
  • Youtube.DL intergration (https://forum.kodi.tv/showthread.php?tid=200877)
  • URLQuick intergration (http://urlquick.readthedocs.io/en/stable/)
  • Youtube intergration
  • Supports use of "reuselanguageinvoker"

Homepage

https://scriptmodulecodequick.readthedocs.io

4 Debugging