Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As part of a presentation, Jonathan Franks created a PDF parser plugin for Migrate Plus. I think it would be a great addition to the Migrate Plus plugins: https://github.com/jonathanfranks/d8migrate/tree/master/web/modules/cust...
Attaching a sample module, to speed up testing the plugin (rename from migrate_pdfs.tar_.gz to migrate_pdfs.tar.gz after download).
Comment | File | Size | Author |
---|---|---|---|
#7 | migrate_pdfs.tar_.gz | 187.35 KB | ressa |
#4 | migrate_plus_pdf_parser_plugin-3019758-4.patch | 1.89 KB | ressa |
Comments
Comment #2
heddnWe'd need to add a suggestion to the composer.json of the project and do a check in the process plugin's constructor if the parser class is available. Plus tests. But great suggestions.
Comment #3
ressa CreditAttribution: ressa at Ardea commentedSounds great. I have alerted the author about this issue, to hear if he wants to create the plugin himself.
Comment #4
ressa CreditAttribution: ressa at Ardea commentedHere is a first patch. No tests, I hope somebody else can help out with that.
Comment #5
ressa CreditAttribution: ressa at Ardea commentedComment #7
ressa CreditAttribution: ressa at Ardea commentedSample module, to speed up testing the plugin (rename from migrate_pdfs.tar_.gz to migrate_pdfs.tar.gz after download).
Comment #8
ressa CreditAttribution: ressa at Ardea commentedCan somebody else help with debugging why the patch fails? It works fine locally ...
Comment #9
heddncomposer.json files can't be patched and assume the new requirements are downloaded. But that also brings up a good point. We need to add it as a suggestion.
Put some of this into the constructor. And see if we can somehow silently fail plugin discovery if the pdf parser code isn't available.