Merging two plugins

Hi everyone, I’m relatively new to Omeka and working on developing a plugin for the CMS. This is the first plugin I’ve ever developed, so I’m just becoming familiar with hooks, filters, etc.
The plugin we’re developing helps users OCR their PDFs and then automatically tags them. Right now, those two processes are set up as two separate plugins (neither of which were made by anyone on our current team). I’m looking into how to merge the two plugins, but since I’m not very familiar with plugin development I’m a little lost.
Does anyone know what might be the best way to go about this? If it’s not possible/too complicated, is there a way to build a third plugin that connects the two from a single admin page? i.e. the user would click “start” on the admin interface in the third plugin and it would start the processes on the other two.

What’s simple or feasible really depends on the plugins involved.

Using them with a third plugin could be simple, it just depends how the initial 2 plugins are written, whether they give you simple access to what you want to do or not. You might also be able to have one or the other simply acknowledge that both plugins are present and handle having them work together.

What are the specific plugins you’re looking to “merge”?

The plugins were custom-made for our system a few years ago, so they’re not openly available for download. Is there a way I can check whether they give us simple access?

It’s not really a matter of something obvious to check, more just looking at the code of the two plugins and seeing, for example, if they provide a function you could call to do their work, so that a third module combining them could simply call both functions.

If they’re both custom, it might make sense to simply merge their functionality as you first suggested. You’d probably want to look at things like which hooks and filters they each use. Another option many plugins use is to optionally work together: one identifies that the other is also installed and sets things up so they work as desired when combined.

Without knowing a little more about what each one does, how they do or don’t currently work together, and how specifically they were written, it’s hard to really say which option is best here.

1 Like

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.