On closer inspection, it does look like
1) [the Zotero API supports exports in RDF](https://www.zotero.org/support/dev/web_api/v3/basics) and
2) the pertinent changes mainly (solely?) involve Zotpress’s request.cite.php file, assuming that I only wanted to get RDF output and never RIS.
But when I attempt to replace the RIS elements there with the pertinent entries for rdf_zotero
, I get back a file with the contents [null]. Here’s what I’ve tried from lines 40–55 of the request.cite.php:
$zp_import_url = “https://api.zotero.org/”.$zp_account[0]->account_type.”/”.$zp_api_user_id.”/items/”.$zp_item_key.”?format=rdf_zotero&key=”.$zp_account[0]->public_key;
// Read the external data
$zp_xml = $zp_import_contents->get_request_contents( $zp_import_url, true, ‘rdf‘ ); // Here, I’ve also tried instead rdf_zotero.
if ( $zp_xml !== false
&& strlen(trim($zp_xml[“json”])) > 0 )
{
header(‘Content-Type: application/x-research-info-systems’);
header(‘Content-Disposition: attachment; filename=”itemkey-‘.$zp_item_key.’.rdf“‘);
header(‘Content-Description: Cite with RDF‘);
echo $zp_xml[“json”];
}
else
{
echo “No RDF file found.”;
Would you have any insight into what I might be missing here or elsewhere?
-
This reply was modified 2 years, 10 months ago by
jdavidstark.