For devs: Addon to zip script
#1
Addon to zip script

To all add-on devs out there, do you hate that damn add-on folder zipping after each new release?
This python script will do this job for you with only one click.

Dowload, change the path and add-on name and simple run this scipt.

-> XBMC-Addon-to-zip <-

Features:
  • zip the add-on folder into script.example-0.1.1.zip
  • get the version number from the addon.xml
  • exclude all unecessary files (.pyo, .pyc, .project, .pydevproject, .gitignore, .git)
Reply
#2
Cool!
Reply
#3
Nice. Few suggestions (assuming this is the standard workflow for every type of add-on):

- Copy the addon.xml from source to destination
- Copy the changelog.txt from source to destination, and rename to changelog-ver.txt
- Exclude all the extra crap OSX would otherwise zip

Edit: right, an exe file, so not going to work on OSX..
Reply
#4
(2013-11-22, 15:52)SpaceMonkey Wrote: Nice. Few suggestions (assuming this is the standard workflow for every type of add-on):

- Copy the addon.xml from source to destination
- Copy the changelog.txt from source to destination, and rename to changelog-ver.txt
- Exclude all the extra crap OSX would otherwise zip

1. the addon.xml will be included in the zip or what do you mean?
2. changelog is also copied, is renaming necessary for an add-on? (I see only add-ons with one changelog file)
3. ok, could you name the file extensions? have no Mac to test.

thanks for the suggestions.

EDIT: yes, but maybe there is a 7zip package for OSX.
Reply
#5
Some more feature requests

- Check for icon
- Check for screenshot001.jpg
Reply
#6
(2013-11-22, 16:01)Jandalf Wrote:
(2013-11-22, 15:52)SpaceMonkey Wrote: Nice. Few suggestions (assuming this is the standard workflow for every type of add-on):

- Copy the addon.xml from source to destination
- Copy the changelog.txt from source to destination, and rename to changelog-ver.txt
- Exclude all the extra crap OSX would otherwise zip

1. the addon.xml will be included in the zip or what do you mean?
2. changelog is also copied, is renaming necessary for an add-on? (I see only add-ons with one changelog file)
3. ok, could you name the file extensions? have no Mac to test.

thanks for the suggestions.

EDIT: yes, but maybe there is a 7zip package for OSX.

1. I believe addon.xml needs to be in your repository, outside the zip. So the repo contents are addon-version.zip, changelog-version.txt, addon.xml, icon.png, fanart.jpg. If the script would copy the addon.xml and the changelog once less manual step would be needed.
2. See the answer above
3. .DS_Store, .AppleDouble to name couple. Could every hidden file starting with a dot be removed? Cannot think of any reason where those are needed in an add-on?
Reply
#7
(2013-11-22, 17:34)zag Wrote: Some more feature requests

- Check for icon
- Check for screenshot001.jpg
What do you mean with check? Check if these are present? Throw a warning or stop if not?

(2013-11-22, 18:35)SpaceMonkey Wrote:
(2013-11-22, 16:01)Jandalf Wrote: [quote='SpaceMonkey' pid='1556414' dateline='1385128366']
-snip

1. I believe addon.xml needs to be in your repository, outside the zip. So the repo contents are addon-version.zip, changelog-version.txt, addon.xml, icon.png, fanart.jpg. If the script would copy the addon.xml and the changelog once less manual step would be needed.
2. See the answer above
3. .DS_Store, .AppleDouble to name couple. Could every hidden file starting with a dot be removed? Cannot think of any reason where those are needed in an add-on?

1. could you please quote this, never heard about it... is this a requirement for a repo add-on? (I don't develop one...)
if this es really necessary, I need a switch between repo and non repo add-ons.
3. yes, you are right, done.

XBMC-Addon-to-zip-0.2.zip
Reply
#8
I cannot find any info about the required repo structure anymore from the XBMC wiki. There was at least something at some point. I remember it took trial and error to get it right when i created my repo.

This is the structure i use and it works, i don't know how others do it:

Image
Reply
#9
ok, then feel free to adapt the script to your preferences, I don't want to overload the script with different cases until more people need it...
Reply

Logout Mark Read Team Forum Stats Members Help
For devs: Addon to zip script0