translators icon indicating copy to clipboard operation
translators copied to clipboard

CITATION.cff: allow any itemType translation (not just data or software)

Open d33bs opened this issue 1 year ago • 6 comments

Wanted to mention thanks and gratitude for the great work within Zotero and the translator efforts found here! I oftentimes use the CITATION.cff format with projects I contribute to and have often found that Zotero does a great job at initial translation of associated resources. To this end, the existing translator for the CITATION.cff format is really helpful!

I noticed however that the existing translator only translates software and data Zotero items. I'd like to propose modifying the existing CITATION.cff translator to not exclude these works (a user would still have the option to organize or filter resources as they desire through selection). If this doesn't align with use cases, a new translator could be added (perhaps titled "CFF-ALL" to distinguish) for translating all Zotero resources to the format. As a workaround to this I've been modifying the existing CFF.js file locally to exclude the following lines in order to achieve this functionality, but it'd be a time saver to not need to do this (and enable others to use it this way if they so desired).

The current CFF.js file includes these lines which perform the filtering based on itemType. These could be removed to allow for the capability described above.

		// Only use for dataset and software
		if (item.itemType != "dataset" && item.itemType != "computerProgram") {
			continue;
		}

Please don't hesitate to voice concerns, I may have things completely jumbled up here! Thank you in advance for your thoughts.

d33bs avatar Feb 08 '24 16:02 d33bs

When I created the translator, CFF was only defined for those two resource types. Has that since changed? I'm just skeptical of exporting something that's not at all covered by the format spec.

adam3smith avatar Feb 08 '24 16:02 adam3smith

Thanks @adam3smith for the reply (and for the original contributions in this space)! I believe what you mention is true. A bit more background: my feeling is that both the software being worked on as well as the references which were used to build the software (whether inspiration, methods, data, software, etc) are important to outline within the CITATION.cff. Otherwise it might look from a glance that the software was purely self-inspired by those making direct contributions to it.

Specifically this could be important in reference to software which may not yet have a journal article or other resource tied to it where these references and acknowledgements might traditionally be mentioned. To this effect, this is an effort of openly acknowledging the resources used to create software as it is developed.

When I use CITATION.cff in this way I often implement items under the references key to define these (which roughly has sub-keys/values that align to the convention of top-level keys for the CITATION.cff format).

d33bs avatar Feb 08 '24 17:02 d33bs

do you have an example of a CFF file like that? I understand the idea to cite references and IIRC even looked at that, but CFF doesn't seem particularly well suited for that purpose (though I may have missed something).

adam3smith avatar Feb 08 '24 18:02 adam3smith

Thanks @adam3smith , sure thing, here's an example of CITATION.cff file demonstrating what I mentioned.

... CFF doesn't seem particularly well suited for that purpose (though I may have missed something).

Would you suggest any alternatives that are better suited from a software-based perspective? I might have missed something as well; I arrived at the the format of the shared example out of a necessity to follow best known practice today while balancing integration with other formats and services and acknowledging related works + authors. Just the same, I can accept that it might be a bad way of doing things, so I'd value your input here if you have thoughts.

d33bs avatar Feb 09 '24 16:02 d33bs

Hi @adam3smith , circling back around to this, would you mind if I expanded upon your original work in CFF.js with a new CFF translator, perhaps labeled as something like CFF-references to assist with what I've described in this issue?

I ask this both from seeking your input as well as respecting licensing permission (the translators repo itself doesn't include overarching LICENSING and the CFF.js file mentions a copyright belonging to you).

d33bs avatar Mar 15 '24 14:03 d33bs

I don't know if we'll take it into Zotero -- since Zotero doesn't create hierarchical item types, this is conceptually quite messy -- but you're absolutely welcome to do this -- my copyright on the translator is followed by an AGPL license (which almost all translators carry).

adam3smith avatar Mar 15 '24 14:03 adam3smith