Quote:
Originally Posted by estherflails
Hello all
I wanted to know if it was possible to install two versions of the same plugin and have them work separately. I want the old version for a functionality that is missing from the new one.
I got as far as changing the name in __init__.py so the old version didn't overwrite the new, and in the Plug-ins menu they both show up separately, but I can't find the old version in Toolbars & menus, it's just missing for some reason.  So I can't actually use it.
Any suggestions on what else needs to be edited or what I could do to make this work?
Many thanks!
|
Basically, you need three mandatory changes:
1) Change the name on the __init__.py file, like you already did. Lets suppose it is now PLUGIN_NEW_NAME.
2) Then you need to rename the file "plugin-import-name-PLUGIN_NAME.txt" to "plugin-import-name-PLUGIN_NEW_NAME.txt".
3) Search and replace across all the files:
Search: from calibre_plugins.PLUGIN_NAME
Replace: from calibre_plugins.PLUGIN_NEW_NAME
Now, this is the basic, but I can't promise it will always work. One good example of what can go wrong is shortcut management. They might have the same unique name, and also the same trigger.
But with these three changes you will be able to duplicate most plugins.