Adjustments to settings form
Here are some suggested improvements to the settings form:
- Change "JATSParser plugin settings menu" to "References".
- Drop "force to" in the sentences. So it's just "Display references from X".
- What does the default do?
- Remove the "denotes required field" thing.
- For the convert to PDF setting, give it a heading that says "Create PDF".
- The checkbox label should say something about when the PDF is created. Is this during the XML conversion or later? Something like "Create a PDF galley when ...".
I was using a slightly earlier version. Here are a few more:
- For the style format selection, use the
titleinstead ofdescriptionin the{fbvFormSection}. This will make it bold and not greyed out. - Other citation formats: where do these formats come from? Must the journal have supplied the style XML?
- "Import of JATS XML galleys". So this is a one-time action that they take to generate full text from all XML galleys? Can we separate this from the settings form? The plugins let you add actions to the plugin (
JatsParserPlugin::getActions()). We can have a separate action there that puts a confirmation prompt up behind a big warning.
What does the default do?
I should change it to something like remove as now it just removes the full-text from the database for this publication.
Other citation formats: where do these formats come from? Must the journal have supplied the style XML?
It's CSLs: https://github.com/citation-style-language/styles The plugin has a dependency from this repository
"Import of JATS XML galleys". So this is a one-time action that they take to generate full text from all XML galleys? Can we separate this from the settings form? The plugins let you add actions to the plugin (JatsParserPlugin::getActions()). We can have a separate action there that puts a confirmation prompt up behind a big warning.
Yes, it's a good idea, thanks!
The checkbox label should say something about when the PDF is created. Is this during the XML conversion or later? Something like "Create a PDF galley when ...".
PDF is still generated on the fly. I haven't thought about it yet. Do you think it should also be served statically?
The plugin has a dependency from this repository
Oh my! That's why the release package is 16.5 mb! Let's try to find another solution to this (not for now, but eventually -- maybe file another issue). We could retrieve the requested style when the settings form is saved or something. I don't think it's a great idea to include all 2000+ styles. It may even make sense to build this functionality into the citationStyleLanguage plugin, and then have JATSParser rely on what's configured there.
PDF is still generated on the fly. I haven't thought about it yet. Do you think it should also be served statically?
Let's postpone this for future work. (File an issue so we don't forget?) In the meantime, let's just update the text. How does it work? Does it create a fake PDF galley or something?
How does it work? Does it create a fake PDF galley or something?
I'm assigning a variable to the article page containing a query; this method handles requests containing that query: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L193. I'd need to make some minor changes there regarding citation styling. E.g., citation style format should come from the settings: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L215
But is there a galley that's created? How do you get to the pdfViewCallback unless the galley is already created?
@NateWr, that's what needs to be refactored. In the previous release, the full-text was created on the fly on the galley page. That hook/method is actually for the XML galley page (see check for XML galley type in the method's body): XML is fetched and converter to PDF. For now, I see 2 options: either remove such conversion completely or build a handler for this operation.
Oh I see what you're saying. For now let's hide this. But perhaps in the future we can have an option, similar to how the full text is generated, which would create a PDF galley and generate a PDF for it.