Working with @davidfor, I added an API that plugin writers can use to create custom columns for the plugin's use. See the class CreateNewCustomColumn in calibre.gui2.preferences.create_custom_column. It is documented there.
The class is in calibre source now.
Notes:
The class is in calibre source now.
Notes:
- The custom column(s) are actually created the next time calibre starts. The column(s) don't exist until then. The plugin configurator must deal with that in some way.
- You can create columns only once per calibre instance. Further attempts to create columns or run calibre preferences will fail until calibre is restarted. If you use calibre preferences to create/edit/delete a column then this API will refuse to create new columns until calibre is restarted.
- This API doesn't support editing an existing custom column. Use calibre preferences to do that.









