PaperPi
PaperPi copied to clipboard
packaging plugin
need a packaging script to bundle up plugin in sensible way that is easily installable
This is an interesting way to handle plugins. Just one approach
https://alysivji.github.io/simple-plugin-system.html
It also lists a few plugin framework modules that we could look at instead of reinventing the wheel
I wonder if a phase 2 of this couldn't be a simple web interface with the ability to enable/disable plugins, set configs, install/uninstall, etc. Pretty big phase 2, but I'm just thinking out loud. Obviously, this would be a pretty big upgrade and I want to focus on the rest of the stuff we have planned (including modularizing the plugins) before even attempting this.
I like this idea. I'll need to put some more work into packaging and managing plugin install/uninstall.
I've started with a basic script to do the plugin install; it's based loosely on the existing install script.
https://github.com/txoof/PaperPi/blob/plugin_installer/utilities/install_plugin.sh
There's not much to it yet, just a basic outline of what it will do:
- stop running instance of PaperPi (daemon)
- decompress plugin tar
- copy the plugin into the PaperPi/plguins/directory
- do some checking that it will not clobber an existing plugin w/out confirmation
- install any debian or python requirements
- prompt the user to handle the debian reqs first?
- install the python reqs automatically
- add plugin configuration to user/etc config filesprompt user to edit config files and manage settings
- display a sample of the config so the user knows what to look for
- clean up temp files
- prompt user to restart paperp
- optionally restart automatically (dubious)