[RELEASE] Repository Preparer (update to addons_xml_generator.py) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: [RELEASE] Repository Preparer (update to addons_xml_generator.py) (/showthread.php?tid=129401) |
[RELEASE] Repository Preparer (update to addons_xml_generator.py) - unobtanium - 2012-04-19 Repository Preparer (repo_prep.py) Could an admin please sticky this? I think repository owners will find this very useful. I've written an update / replacement to addons_xml_generator.py The latest version will always be hosted here https://github.com/unobtanium/xbmc_repo_aggregator/blob/master/lib/repo_prep.py Which you can download from here: https://raw.github.com/unobtanium/xbmc_repo_aggregator/master/lib/repo_prep.py This includes some code improvements and a function to automatically generate a compressed repository structure. So now you get the benefits of compressing your addons without the having to manually rename the changelog, zip the file etc, just by running repo-prep.py when you need to update your addons.xml Full readme: Quote:This is an: RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - paddycarey - 2012-04-25 works perfect, cheers RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - paddycarey - 2012-04-25 just in the middle of modifying this to work in a little project i'm writing, but I was just wondering if there are any disadvantages to requiring compression? i.e. can I safely strip out the non-compressed code path without side-effects? RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - unobtanium - 2012-04-27 not sure i follow, you'll have to try it and see if it works i guess RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - spiff - 2012-04-27 no advantage to non-compressed. only disadvantages (rollbacks no working, no quick reinstall). RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - Nuka1195 - 2012-05-01 nice job, i just updated the addons_xml_generator.py for python 2.6. not sure if you've done that in yours. RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - unobtanium - 2012-05-05 thanks, i use python 2.7, and its worked for me. my changes to the xml generator were a bit more verbosity, and a check that it found at least one addon.xml before saving the xml and md5 files. i'm not happy with the speed with which the update check takes, so i might remove that feature altogether to be honest RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - unobtanium - 2012-05-06 removed the update feature and added a few code tweaks RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - divingmule - 2012-05-10 I'm getting SyntaxError with your latest code. Code: E:\Eden_Repo>python repo_prep.py The previous commit seemed to work fine. Thanks for your efforts. RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - unobtanium - 2012-05-11 thanks, i've fixed it now and pushed it to github. you can get the latest version from the links in the first post RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - bossanova808 - 2012-06-20 Hey - a few questions... I've run this on a folder with 5 addons in it...made a bit of a mess as a result.... 1. It seems to delete changelog.txt, not just create (say) changelog-0.2.2.txt - is that right? What about the next time is run, will it detect the -0.2.2 and auto update to the next addon version, 0.2.3 for example? I expected it to always look at the changelog.txt and change that to the current one.. 2. It creates the .zip files inside the add on dirs themselves - traditionally I have them in a separate downloads folder, but I suppose this isn't a big deal. Will it delete older versions or will they just keep building up? 3. It seems to get the version numbers wrong on every second add on - first one is ok, but it uses this again for the next add on, the seems to get it right, then gets it wrong on the 4th or whatever. There's something not right going on there - have you tried this with a bunch of addons? If you want to try what I am doing, clone my repo: http://code.google.com/p/bossanova808-xbmc-addons/source/checkout ...cd into staging and run repo_prep.py from there. I am sure it's me being a duffer but there's not a lot of documentation to work with Any help appreciated!! RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - schumi2004 - 2013-02-22 Playing to day with this updated version and noticed when i set repo_root = True the script failes (or windows paths). (Windows machine, not yet tested on Linux) It also generates errors when using a large sized skin addon (the zip seems to be fine though) Edit: Using a absolute windows path generates a syntax error. RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - DoubleT - 2014-04-21 Just started using this, and works great to initially create the repo but still working out how to update addons and re run the script. RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - shlomicthailand - 2014-04-24 Sorry i don't get it - it delete all sources and put them in zip file , what happens next time i have an update ?? this cannot be run from original source controlled folder (aka git folder) every time one needs to copy entire source tree to somewhere else then run this script ? too cumbersome for me Shlomi RE: [RELEASE] Repository Preparer (update to addons_xml_generator.py) - Jorge86 - 2016-06-14 error Traceback (most recent call last): File "C:/Users/JorEl/KodiMexico/miNuevoRepo/repo_prep.py", line 320, in <module> if standalone: execute() File "C:/Users/JorEl/KodiMexico/miNuevoRepo/repo_prep.py", line 316, in execute Compressor() File "C:/Users/JorEl/KodiMexico/miNuevoRepo/repo_prep.py", line 182, in __init__ if compress_addons: self.master() File "C:/Users/JorEl/KodiMexico/miNuevoRepo/repo_prep.py", line 202, in master addon_xml_exists = self._read_addon_xml() File "C:/Users/JorEl/KodiMexico/miNuevoRepo/repo_prep.py", line 290, in _read_addon_xml self.addon_xml = f.read() File "C:\Users\JorEl\AppData\Local\Programs\Python\Python35-32\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 937: character maps to <undefined> |