This is a way for people to write and use plugins. Plugins are sourced into the program itself, so everything is available to them. the call to call_plugins could probably be added in a few more places, but this is a good starting point.
Plugins can be added in a subdirectory called plugins, or system wide in /usr/share/bashblog/plugins. I can write more information for the readme, but basically each of them can be in a file, and they are each written as a series of functions. For example, this plugin will show what you were listening to as you wrote the current post:
So, each plugin must start with the keyword plugin_ followed by where it's called, in this case pre_edit, and then should have a unique identifier, _composed. I think this will add a whole lot more flexibility to an already powerful system, and the lines of code it took to do it were minimal.
This is a way for people to write and use plugins. Plugins are sourced into the program itself, so everything is available to them. the call to call_plugins could probably be added in a few more places, but this is a good starting point.
Plugins can be added in a subdirectory called plugins, or system wide in /usr/share/bashblog/plugins. I can write more information for the readme, but basically each of them can be in a file, and they are each written as a series of functions. For example, this plugin will show what you were listening to as you wrote the current post:
So, each plugin must start with the keyword plugin_ followed by where it's called, in this case pre_edit, and then should have a unique identifier, _composed. I think this will add a whole lot more flexibility to an already powerful system, and the lines of code it took to do it were minimal.