Extract via command line only the metadata of a journal article

How can one manually extract via command line only the metadata of a journal article when submission id or publication id is given?

Thanks in advance.

Hi @obi,

Can you please indicate which version of OJS you’re using (e.g. 3.3.0-13)?

PKP Team

Hi Roger,

We are running OJS 3.3.0-13 and we will upgrade to 3.3.0-14 next week.

Thank you for your quick response.

Hi @obi,

There are a number of plugins that you can use in the CLI that might allow for this: https://docs.pkp.sfu.ca/admin-guide/en/data-import-and-export#use-importexport-plugins-from-the-command-line

Another alternative would be to construct an SQL query. Exactly how to go about this though, I’m not sure, but I will see if some of my colleagues can provide some insight.

Best regards,

PKP Team

Am still wondering if any of your colleagues can help provide some insight on extracting metadata of a journal article via sql query? Or any another script to run at commandline. I have error problems when using NativeImportExportPlugin:

php tools/importExport.php NativeImportExportPlugin export ojs.xml article <article_id>

and using xmllint to validate it:

xmllint --schema plugins/importexport/native/native.xsd ojs.xml > ojsxmllint.xml

(I used different options when running xmlint : --noout, --format, --recover, --nsclean, --valid and/or --encode utf-8)

I received the following syntax errors:

1.The node element breaks into second line:

<article xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="nb_NO" date_submitted="2023-03-21" status="1" submission_progress="4" current_publication_id="9034" stage="submission" xsi:schem

aLocation=“http://pkp.sfu.ca native.xsd”>

Error: An element or attribute information item has already been validated from ‘http://pkp.sfu.ca’ namespace. It is an error tif xsi:schemaLocation/xsi:noNamespaceSchemaLocation or an inline schema occurs for that namespace
3. The node is neither valid nor invalid because no DTD/schema declaration was found.

We are doing our test on OJS version

Thanks in advance

You might consider using the REST API.