Kodi addon generator

  Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Razze Offline
Team-Kodi Member
Posts: 1,607
Joined: Jan 2015
Reputation: 50
Location: Osnabrück, Germany
Post: #1
The brand new kodi addon generator is here.
It will get you up and coding your kodi addons in a matter of minutes.

[Image: example-script.gif]

What exactly does it do?
It generates a structure with directories and files, which you will need and you can basically start to add your code in between.
We're also trying to get you to use best practices, to make your and our life better Smile

At the moment of this post, it has generators for the most common addon types, but you might find the addon type you want missing. Please let us know or contribute it yourself Wink

All you need is nodejs --> https://nodejs.org/
And git --> https://git-scm.com/

So when you have installed that, just open up a commandline and install yeoman via
PHP Code:
npm install -g yo 

Then install the kodi generator via
PHP Code:
npm install -g generator-kodi-addon 

You can find infos about the latest package here:
https://www.npmjs.com/package/generator-kodi-addon

And contribute here:
https://github.com/xbmc/generator-kodi-addon

If you have questions, please let us know
(This post was last modified: 2017-04-12 22:42 by Razze.)
find quote
Dangelus Offline
Team-Kodi Member
Posts: 1,950
Joined: Jan 2012
Reputation: 27
Location: United Kingdom
Post: #2
Awesome Smile

Always read the Kodi online-manual, FAQ and search the forum before posting.
Read/follow the forum rules.
find quote
braz Offline
Skilled Skinner
Posts: 3,255
Joined: Aug 2012
Reputation: 100
Post: #3
When I read the first few lines I started thinking this was an early April fool's joke. Glad to see it's not! Wink
find quote
ironic_monkey Offline
Posting Freak
Posts: 1,457
Joined: Nov 2013
Reputation: 69
Post: #4
'all you need is node.js'. lol Wink

EDIT: since this can be read as an offense: all i meant to point out is that node.js isn't exactly the world's lightest dependency, so the formulation made me lol a bit, was all.
(This post was last modified: 2017-02-03 11:14 by ironic_monkey.)
find quote
Razze Offline
Team-Kodi Member
Posts: 1,607
Joined: Jan 2015
Reputation: 50
Location: Osnabrück, Germany
Post: #5
new generator version pushed to npm, run `npm update -g generator-kodi-addon` and you should be good to go

(2017-02-03 11:09)ironic_monkey Wrote:  'all you need is node.js'. lol Wink

EDIT: since this can be read as an offense: all i meant to point out is that node.js isn't exactly the world's lightest dependency, so the formulation made me lol a bit, was all.

Big Grin
find quote
Hedda Offline
Fan
Posts: 676
Joined: Feb 2013
Reputation: 12
Post: #6
(2017-02-03 01:07)Razze Wrote:  All you need is nodejs --> https://nodejs.org/
Oh, that could maybe be a good way for a Kodi addon to enable "Actions On Google"?

https://developers.google.com/actions/

Google at least have a client library for Actions on Google that uses Node.js so perhaps their library could make it easier to create actions for the Google Assistant for Kodi?

https://github.com/actions-on-google/act...gle-nodejs

...or does Team Kodi already a unified plan for how to implement voice control?

Might be a good idea for Kodi to have a unified API or library for voice control addons like Google Assistant, Amazon Alexa, Apple Siri, Microsoft Cortana, and Samsung Viv?
find quote
Razze Offline
Team-Kodi Member
Posts: 1,607
Joined: Jan 2015
Reputation: 50
Location: Osnabrück, Germany
Post: #7
(2017-02-17 16:24)Hedda Wrote:  
(2017-02-03 01:07)Razze Wrote:  All you need is nodejs --> https://nodejs.org/
Oh, that could maybe be a good way for a Kodi addon to enable "Actions On Google"?

https://developers.google.com/actions/

Google at least have a client library for Actions on Google that uses Node.js so perhaps their library could make it easier to create actions for the Google Assistant for Kodi?

https://github.com/actions-on-google/act...gle-nodejs

...or does Team Kodi already a unified plan for how to implement voice control?

Might be a good idea for Kodi to have a unified API or library for voice control addons like Google Assistant, Amazon Alexa, Apple Siri, Microsoft Cortana, and Samsung Viv?

That's completely offtopic and missing the point of this generator and topic Smile
find quote
Don_black00 Offline
Junior Member
Posts: 30
Joined: Jan 2015
Reputation: 0
Post: #8
@razze, Does this generator only create the basic setup files and code. does it help with regex a site that you want use for your addon. I guess I would think generator as a front end and then there is so much built in the back-end that anyone can create a plugin with out any coding knowledge, but that does not seem to be the case.
(This post was last modified: 2017-02-21 06:06 by Don_black00.)
find quote
Martijn Offline
Team Kodi
Posts: 17,038
Joined: Jul 2011
Reputation: 312
Location: Dawn of time
Post: #9
Only the basic structure. The rest is up to you

Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
find quote
robweber Offline
Posting Freak
Posts: 1,137
Joined: Sep 2009
Reputation: 38
Post: #10
(2017-02-21 06:06)Don_black00 Wrote:  I would think generator as a front end and then there is so much built in the back-end that anyone can create a plugin with out any coding knowledge, but that does not seem to be the case.

Seriously? Guess the team should get to work on some sort of Python AI that can take all your ideas and just write the code for you huh?
find quote
pinoytracker Offline
Junior Member
Posts: 13
Joined: Apr 2017
Reputation: 0
Post: #11
got an error

'git ' is not reconized as an internal or external command
find quote
Martijn Offline
Team Kodi
Posts: 17,038
Joined: Jul 2011
Reputation: 312
Location: Dawn of time
Post: #12
(2017-04-12 16:41)pinoytracker Wrote:  got an error

'git ' is not reconized as an internal or external command
Then you don't have git installed

Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
find quote
Razze Offline
Team-Kodi Member
Posts: 1,607
Joined: Jan 2015
Reputation: 50
Location: Osnabrück, Germany
Post: #13
Correct, you will have to have git installed https://git-scm.com/
I'll meniton it in the first post, thanks!
find quote
pinoytracker Offline
Junior Member
Posts: 13
Joined: Apr 2017
Reputation: 0
Post: #14
(2017-04-12 22:41)Razze Wrote:  Correct, you will have to have git installed https://git-scm.com/
I'll meniton it in the first post, thanks!

Oh my bad overlook that process =)
Thanks
find quote
skoosh2017 Offline
Junior Member
Posts: 2
Joined: Jun 2017
Reputation: 0
Post: #15
_-----_ ╭──────────────────────────╮
| | │ Welcome to the awesome │
|--(o)--| │ generator-kodi │
`---------´ │ generator! │
( _´U`_ ) ╰──────────────────────────╯
/___A___\ /
| ~ |
__'.___.'__
´ ` |° ´ Y `




? Choose the type of addon you want to create. Plugin
? Your addon will provide the following media types.
◯ audio
◯ image
◯ executable
◯ game
❯◯ video
>> You need check at least one.

Help please...... how do you check selections?
find quote
Post Reply