TheMarkster wrote: ↑Mon Oct 25, 2021 7:53 pm
While you're working on the addon manager, I have some ideas:
Thanks for the suggestions, those are great ideas! Let me go through them a bit here:
1) Solved by relaxing the SSL requirements -- you can do this in your own copy by changing
line 49 of addonmanager_utilities.py from
Code: Select all
ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
to
Code: Select all
ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
I'm not thrilled about the security ramifications here, but I don't know realistically what the chances are that we need to worry about it, given that we are hard-coding a domain that we control. Any thoughts?
2 and 3) Neat ideas, but I don't think we can make it work without "phoning home" -- the way the download of the macros currently works it's not easily possible to determine whether a macro was actually installed. And I don't think we want to get into the "sending usage stats to home base" game, that has blown up in the faces of some prominent opensource projects in the past.
4) That seems doable.
5) With the new package.xml metadata file, a macro-containing package can include an icon for that macro. I don't know if this quite meets your needs or not.
6) Can probably be done by direct manipulation of user preferences, or we could expose the C++ code to Python as you suggest.
7) Already possible, and done (in theory!)
8) Hahaha, I thought maybe I was just clueless, I have no idea what system macros are.
9) I'm not sure about the gists, I've only looked at the macros installed from
https://github.com/FreeCAD/FreeCAD-macros -- those are just files in a git repo, and at the code that gets pulled off the wiki via a crazy html-parsing routine. With the new package.xml metadata, IMO the best possible way to distribute a macro is to create your own github repo for it and then have it added to the FreeCAD-Addons git repo as a submodule. You still have complete control over the editing of the macro and its files, because it's your git repo, but it will show up automatically in the Addon Manager without the user having to add an external repo. Macro authors can easily package up a bunch of their related macros into one package, etc.