I’m trying to write a plugin to move some metadata around in our omeka instance, and have hit a snag-I can’t get the plugin to install. Omeka keeps telling me it “isn’t a valid plugin.” I’ve checked online and that usually seems to mean that one of the required files is missing, the base plugin file is misnamed (has to match the folder) or the permissions on the files are incorrect. I’ve checked all those issues and no dice. Can someone else look at the code and perhaps tell me what I’m doing wrong? It’s an extremely simple plugin. It’s located at:
To make it valid and installable, the class name just needs to be
MetadataMigratorPlugin, instead of just
Thank you! I have the plugin installed, but I’ve hit another snag: I can’t see how to access dublin core metadata for an item. I see that you can set or delete metadata text from an item or file object by using some built-in methods and passing it an Element object representing the metadata element, but I can’t see any functionality for actually reading the textual metadata of a pre-existing element out that way. It seems like this should be easy, but I can’t work out how it’s done.
It sounds like what you need to use is the metadata function.
That does indeed seem to be what I need. Another followup: is there any way to trigger a job on a schedule? For example, if I wanted the “processpdfText” process from the pdfCapture plugin to fire automatically every few days. I notice the plugin uses Zend bootstrap to invoke the job when the plugin is configured-could I write a script that does that and fire it with cron? Or does zend have some native functionality to schedule jobs?
thanks for your help!
I think that can happen, but it’s not entirely straightforward. First, you would need to run it from inside Omeka, so that there is an id for the process in the processes table. Then, dig up that id directly from the database.
After that, you can go into the
application/scripts folder and run
php background.php -p ID (where ID is what you grabbed from the table).
You won’t be able to change other parameters, I don’t think, so you wouldn’t be able to select different items to include. But I’m pretty sure that’ll get you close.
This topic was automatically closed after 250 days. New replies are no longer allowed.