Implement core export functionality for OJS Flat Metadata Exporter #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the complete export workflow for the OJS Flat Metadata Exporter plugin, enabling bulk export of journal issues with metadata and galley files packaged for institutional repositories.
Implementation
getArticleCSVRow()to populate 12 DC fields (title, creator, DOI, subject, abstract, date, language, genre, rights, type, relation)_cleanFileName()sanitization using regex pattern/[^\w\-\.]/to prevent path traversaldisplay()to fetch and render published issues in default case usingRepo::issue()->getMany()Key changes
Directory structure created:
Security considerations:
issueIdsparameter to array format for proper repository queriesCross-platform compatibility:
DIRECTORY_SEPARATORfor path construction (line 99)Original prompt
Please update the
OJSFlatMetadataExporterPlugin.phpfile in theUIUCLibrary/OJSFlatMetadataExporterrepository to implement the core export functionality.The updated file should contain the logic to:
journal-name_volume-1-issue-2).metadata.csvfile.galleyssubdirectory inside each issue directory.galleysdirectory.Here is the complete, updated content for
OJSFlatMetadataExporter/OJSFlatMetadataExporterPlugin.php: