Python script package specs
#16
-i really like the  <scriptname> subdirectory concept it holds everything the script needs in one place.
i don't know whether a basedirectory is actually needed since q:/scripts is given by xbmc
-zip as default is cool, since everyone should be able to handle them even using python.

i think a browsing,read releasenotes and download /unzip functionality would be a great start.
thumbs, generic configuration (although a cool ,but complex concept) etc. should be done in future releases.

bernd
Reply
#17
actually it might be a good idea to call a dialog for the first time a script is run... you can put a credit message in there, some quick instructions, or do a wizard... this is something though that i think is not critical for the first version. as an alternative i have a configuration file that i try to read at start up, if absent it is autogenerated (and i can put a disclaimer or something up here if i want to)...

if we were doing this though i think it might tie scripts too closely with the launcher... its nice to know that the only interface between the two is xbmc.executescript()... that way it doesnt effect code design at this point.

while i dont think the first version needs thumbs, icons, descriptions, etc.. i think it important to define these so that the launcher interface can be easy improved later without having to fill in missing pieces for all the scripts out there.

i think it good that we define a base level of support right now..

my baselevel format recommendation

q:\scripts\<title>\<title>.py
q:\scripts\<title>\description.xml (format tbd: lots of metadata)
q:\scripts\<title>\readme.txt (displayed at first run)
q:\scripts\<title>\background.png (optional)
q:\scripts\<title>\thumb.png (optional)
q:\scripts\<title>\[whatever other files you want]
no modification of .py files required! (you have to present options in the interface and save config to a file if necessary)

what else do we need for the interface that we cant start doing this for our scripts right now?
Reply
#18
enderw: can you give us some guidelines on how it should be. i think that we have heard all the suggestions, but you should have the final word. we might as well get started.

somethings i would like to know:
* what files should be in the zip file.
* what size should the thumbnail be... (128x128?) should it be called thumb.png or something.tbn? (i prefer thumb.png)
* will there be an xml file with meta data such as title, description, mainscriptfilename, and version number. if so, could you provide a template.
Reply
#19
thanks for all the input, it has helped very much. i can't set anything in stone right now, sorry, but it wouldn't help much anyways since coding a script like this isn't done overnight (well, perhaps if i had a whole night, but i don't...).

- i am leaning towards calling a start() class or something after download, but i have one concern about that. i think i have heard something about imported scripts not being removed from memory until a reset. this could cause some problems when downloading lot of scripts as they would fill the memory. could someone please confirm/deny this?

- zip format is pretty much a given.

- thumbnail size...who knows. was thinking of announing this when the gui was somewhat made (which it isn't atm...).

- description xml will be in the "specs" i am pretty sure. details isn't needed to be public right now, nor can they be as i haven't set that in stone yet.

other than that, bernd pretty much hits it on the spot. the script will be basic at first and rather expand later. otherwise you'd have to wait an awful lot of time.

i know many of you think progress is slow or something, but keep in mind that i haven't said that it will be out shortly and i have lots of full-day tests coming up so it will consume a lot of my time. as soon as i got a base up i think i will ask other scripters if they're interested in helping out (don't mail me, i'll mail you).

keep the ideas/complaints/suggestions coming and thanks again.
xbmcscripts.com administrator
Reply
#20
Quote:- i think i have heard something about imported scripts not being removed from memory until a reset.

i can confirm this.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#21
perfect enderw i'm with you :d
Reply
#22
thanks alot for doing all this enderw.

i have a small suggestion: how about some mechanism that ensures the installation of the most common libraries. i'm thinking especially pil, but also if there are any other commonly useful scripts (such as a settings system or my cachemanager.py). you could host them all in one big zip file.
Reply
#23
when i read these fine comments, i can see this setup failing for a lot of scripts.

in order to have this working properly this should not depend on a script that has been uploaded with xml files and folderstructures. this should be handled from one source (e.g. xbmcscripts) once uploading, make mandatory fields (title, version, author, description, instructions etc), let one upload a thumb (with fixed sizes, if not correct, reject or auto resize), with this information you can write a python script which retrieves all this information from the website directly (via xml output), plus that you can show the thumbs on the website as well.
store the id's/versions that belong to a script in a file and compare them at startup.

this ensures that it will function consistently.

i just foresee mistakes in the folderstructure and xml.

maybe i just don't understand Rolleyes
Reply
#24
well, what you suggest would include a major rewrite of the download manager and i certainly don't have time for anything like that. i believe it will work good enough the way described here...thumbs is something that should be added though, but i haven't got time to have a look at it yet. it's not crucial though, there's no 'real need' for it, it's just handy.

got the xml parsing from my site done - rather badly coded i'm sure - but it works. expect some time before i get the full base done though.
xbmcscripts.com administrator
Reply
#25
as for thumbnails :
not sure i really understand everything...
anyway, use :
folder.jpg
to create a picture for the folder in which python script is
and
myscriptname.tbn
to change the python script icon of 'myscriptname.py'

if every scripter follow this 'trick', it will be easy to get a picture.
Reply
#26
hmm...maybe that wouldn't be bad. anyways, my script will include a launcher for scripts with various features, but having it this way would make it look nice in the builtin script launcher in xbmc as well...
xbmcscripts.com administrator
Reply
#27
about the script launcher, would another view in my scripts be better. say the top half a list or icon view of the scripts and the bottom the info read from an xml file.

then the skinner could add a button that calls the update script.

just a thought.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#28
(nuka1195 @ april 26 2005,02:32 Wrote:about the script launcher, would another view in my scripts be better. say the top half a list or icon view of the scripts and the bottom the info read from an xml file.

then the skinner could add a button that calls the update script.

just a thought.
nope, thinking of taking a different approach to it. it will look pretty much like the current script and the only info that will be available on the main screen is script, thumb and whether it's the newest version or not. the other info can be accessed on popups. that's at least the design idea for now.
xbmcscripts.com administrator
Reply
#29
ok, time for an update on the specifications. i haven't done much lately, but it's time to get things more set in stone than they are now.

the script xml file structure suggestion per today looks like this:
Quote:<info>
   <name>xbmclyrics</name>
   <author>enderw</author>
   <version>1.0</version>
   <updated>05-05-20t15:16:12</updated> #will be written to by script with data from site
   <description>fetches lyrics from the song you are currently listening to. uses lyrc.com.ar as a base. some more information could be here i'm sure, but i can't come up with any at the moment.</description>
   <changelog>xx-xx-xx: added animations on startup and end.</changelog>
   <firstrun>this will be displayed on first run</firstrun>
</info>

first, the name of the script can never be changed. that's right, if you change the name i won't have anything to identify the script with. i don't see this as a problem however, and assigning id's to scripts seems like clutter to me.

one thing that i am uncertain about here is the updated tag. i need to have a way to decide exactly when a script was updated. this could be saved locally by the script service script in it's own settings xml, but if you then deleted it or updated it you would lose all the data. thus i thought that saving it per script into their script.xml would be a better idea.

the firstrun is for displaying a text after installation. perhaps launching a function inside the installed script would be nice to have too, but that might not be a feature for the initial version. keep in mind that settings manager will not be included in the initial version.

the gui will not be something mind blowing as it seems like i will be making it myself, but it should be ok i hope. people can contribute of course when that time comes.

i have to apologize for the lack of work on it lately, but i'm insanely busy now. things will get much better in 10-15 days or so. basically what's done is listing, downloading and installing scripts from the site (just the basics). it also lists local scripts, but that needs much more work due to some scripts not having a script.xml. none of this is incorporated into a gui yet however.
xbmcscripts.com administrator
Reply

Logout Mark Read Team Forum Stats Members Help
Python script package specs0