Jump to content



New Guidelines For Uploading Scripts @ Xbmcscripts.com And Good Tips.

  • Please log in to reply
3 replies to this topic

#1 blittan


    X-S X-perience

  • Members
  • PipPip
  • 373 posts
  • Location:Sweden
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 10 December 2006 - 12:28 AM

Since we are about to rewrite the installer, I figured we should give out a guideline for a better and more robust script.

Try and keep everything in english or atleast some things so everyone understands, if a script is aimed at only one language (eg: undertexter.se script, which has only swedish subtitles) you can use that language. If you write very poorly in english, try and get someone to help you with this. Also translation into several languages is a nice thing to include. If your script isn't english, yet your description is, make sure to make that clear. Common way of naming non-english scripts is: Scriptname (nationality) e.g: Undertexter.se (swedish)

The first thing to do is make a folder for your script, (example for a script "Google Videos" then name the folder "Google Videos"). Use this foldername and do not add any versionnumbers or other things. When releasing a new version, it will automatically overwrite the old installation meaning the users scriptsfolder won't be filled with old versions.
If you don't make a folder the script will end up directly in Q:\scripts, which isn't a good idea.

Main python file
Always name the main python file to "DEFAULT.PY". This is to use the directoryflattening in XBMC, meaning you will only click on the folder to run the python.

Also (for cosmetic reasons) include a "DEFAULT.TBN" which is a renamed .jpg or .png picture with a preferred size 256x256, that will be used for icon to the script.

Path to script
After that you create a variable named for example "SCRIPT_DIR" in your script, use this variable to refer to it whenever you need the path to your script.
either with: SCRIPT_DIR = os.getcwd().replace(";","")+"\\"
or: SCRIPT_DIR = sys.path[0] + '\\'
This is for the reason that some users might rename the installfolder and that will give them an error if you for instance linked a file to "Q:\\Scripts\\MyScript\\". Also you know that it always ends with a \

Readme and changelog
Other things to take in mind is a "README.TXT" containing description of the script, contact details, forumthreads etc. Also writing a changelog can be a good idea, so the user can see whats been changed.

This is really a good thing to implement. Both in the zipfilename and also somewhere in the script.
A good practice is Version:Wikipedia for determing the version numbers.

Pack things up
ZIP this up, and name the zip GoogleVideos-v1.0.1.zip (for the script "Google Videos" version 1.0.1 as this will make it easier for us to update the scripts on the site.
You should end up with a package that looks like the following.

IPB Image

Why isn't my upload accepted?
1. Wrong filename (version number is needed)
2. Your script isn't inside a folder, meaning it will unpack to q:\scripts
3. No default.tbn (this needs to be added, we don't accept it without)
4. Main .py file is NOT named default.py
5. Readme.txt isn't included.

Still unsecure?
If you have any questions please use the contact link on the main page.
You can also download this testpackage or join #xbmc-scripting on irc.freenode.com

#2 JayDee


    X-S Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 5,750 posts
  • Gender:Male
  • Location:Sweden
  • Xbox Version:v1.1
  • 360 version:v2 (zephyr)

Posted 11 December 2006 - 08:55 AM

Going up!

#3 blittan


    X-S X-perience

  • Members
  • PipPip
  • 373 posts
  • Location:Sweden
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 11 December 2006 - 11:40 AM

Thank you for pinning this.

#4 iRoNBiLL


    X-S Enthusiast

  • Members
  • 17 posts

Posted 16 January 2009 - 08:51 PM

Any ETR on the xbmcscripts.com tool? I'd like something set in stone, otherwise Team Navi-X is working on rebuilding our own database soon! I can't tell you how much this is the sucks, having to wait when your trigger happy!


Edited by iRoNBiLL, 16 January 2009 - 08:51 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users