Giter Site home page Giter Site logo

generator-kodi-addon's Introduction

generator-kodi-addon NPM version Build Status Dependency Status Development Dependency Status Coverage percentage

Creates the basic structure for a kodi script, written in python.

Example

Installation

First, install Yeoman and generator-kodi-addon using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-kodi-addon

Then generate your new project:

yo kodi-addon

Development

  • Check out this project via git
  • Browse to the folder via commandline
  • Do npm link
  • Now you can use yo kodi-addon, which should include your changes.

License

Apache-2.0 © Kolja Lampe

generator-kodi-addon's People

Contributors

dependabot[bot] avatar enen92 avatar fraserchapman avatar memphiz avatar phate89 avatar razzeee avatar rechi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-kodi-addon's Issues

Prepare next release

I would like to release the next version, so what should we do before that?
Something we want to add before hand?

  • More tests

Create a commons module

Create a commons module offering logging and some common functions out of the box.
So that other addons can depend on it and we can use it for the generator.

PVR addon

why can't tthis generate the skeleton for PVR addons ?

feedback for Kodi target version

? Choose the minimal Kodi Version your targeting.
  Krypton
❯ Jarvis
  • Add a version number - I forgot what versions Krypton and Jarvis were (which is newer, etc)
  • Also let us enter in a number because I'm trying to target 19 because of python3

Delete gulp-util

Yo can replace with;

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

Source: https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

Error 1st Run Newbee

Hi on first run folder created then the following. I am running as admin Win 10
*** Please tell me who you are.
Run
git config - - user. email "[email protected]"
git config - - user. name "Your Name"
to set your account's default identity.
omitt - - global to set the identity only in this reposiry.
fatal: unable to auto-detect email address (got 'Frederick@freds_pc.(none)')
Can you help please want to open a Web page on Kodi android.
Thanks
Fred
Ps where are files saved

Html characters in addon title

As mentioned on slack:

The kodi-addon-generator uses html characters instead of the ascii equivalent for some characters. Maybe it can be avoided when generating the templates? I tried the original version of this addon in Kodi without any issue and across ~ 3 skins. However something tells me this can be an issue at some point.

see: xbmc/repo-plugins#1878 (diff)

Add provides game

Script can have this it seems

game

Does this only apply to scripts and should we add it?

Discussion try/except code smell?

As raised in #6 (review)

Phil said this code smells as if something is done wrongly.

            try:
                xbmc.log(self.format(record), levels[record.levelno])
            except UnicodeEncodeError:
                xbmc.log(self.format(record).encode('utf-8', 'ignore'), levels[record.levelno])

Ronie said

perhaps this post may be useful to you:
http://forum.kodi.tv/showthread.php?tid=144677
it explains how to properly handle/avoid unicode errors.
there's an example log function at the bottom of the post, which i've been using in all my addons for years now, and never had an issue with it.

Let's talk about it, as I feel the try/except is way more pythonic then the one solution named in the forum

Convention for "kodi" classes

Just something to discuss:

What I'm doing with trakt is, splitting methods between two files, for e.g.:

  • kodiUtilities.py is everything I would have in a utilities class, that binds to one of the xbmc/kodi imports
  • utilities.py gets every method that doesn't have a dependency to one of these

So now I can write unit tests for utilities.py, pretty easily.
Here the question, is this a good practice? Is this a practice we want to push?

@phil65 @MartijnKaijser @enen92 @BigNoid @phate89

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.