Available fields for OpenSearch lookup engines
Hi!,
I'm playing around with the new nice support for lookup engines. However, where can I find a specification of what zotero-specific fields are available? The documentation here:
http://www.zotero.org/support/dev/creating_locate_engines_using_opensearch
Says the following:
"Zotero also supports any Zotero field in the Zotero namespace (http://www.zotero.org/namespaces/openSearch#). The following special fields are also supported [...]"
But where can I find a definition of that namespace? (The namespace address gives page not found.)
Specifically, one of the things I am trying to find out if there are any fields at all available from attached files and links. E.g., 'filename'.
I'm playing around with the new nice support for lookup engines. However, where can I find a specification of what zotero-specific fields are available? The documentation here:
http://www.zotero.org/support/dev/creating_locate_engines_using_opensearch
Says the following:
"Zotero also supports any Zotero field in the Zotero namespace (http://www.zotero.org/namespaces/openSearch#). The following special fields are also supported [...]"
But where can I find a definition of that namespace? (The namespace address gives page not found.)
Specifically, one of the things I am trying to find out if there are any fields at all available from attached files and links. E.g., 'filename'.
"_urlTemplate": "http://pubget.com/openurl?rft.title={rft:title}&rft.issue={rft:issue?}&rft.spage={rft:spage?}&rft.epage={rft:epage?}&rft.issn={rft:issn?}&rft.jtitle={rft:stitle?}&doi={z:DOI?}",
"_urlTemplate": "http://scholar.google.com/scholar?as_q=&as_epq={z:title}&as_occt=title&as_sauthors={rft:aufirst?}+{rft:aulast?}&as_ylo={z:year?}&as_yhi={z:year?}&as_sdt=1.&as_sdtp=on&as_sdtf=&as_sdts=22&",
Not sure what else is defined, but this should be a start.
Further questions should probably be directed to zotero-dev (http://groups.google.com/group/zotero-dev/) or #zotero-dev on freenode.
See approx. line 294 in chrome/content/zotero/xpcom/locateManager.js:
} else if(ns === "http://www.zotero.org/namespaces/openSearch#") {
if(param === "openURL") {
var ctx = Zotero.OpenURL.createContextObject(item, "1.0");
return (ctx ? [ctx] : false);
} else if(param === "year") {
return (itemOpenURL["rft.date"] ? [itemOpenURL["rft.date"][0].substr(0, 4)] : false);
} else {
var result = item.getField(param);
return (result ? [encodeURIComponent(result)] : false);
}
}
Any idea where I can find a list of the Zotero field names on item objects?
The code you cite show how z:openURL and z:year are handled specifically, and anything else is given by item.getField(). So the question is what I can get out of getField(), and if I can get anything out of a getField() for an attached file or link object. (Are those objects even 'items'?)
Sure, I'll move this over to -dev once I feel comfortable enough that I understand what I am asking for :)
If someone else finds this thread, for the filename for attached pdfs and links, I did some exploration in the data structures, and it seems they are obtainable simply by {z:title}.
I am trying to add a lookup for the comment of the journal by which a journal article is published. I tried {z:issn},but the lookup engine won't show up in the UI. I also tried {z:pulisher} or {z:pulication}, and they won't work too.
https://web.archive.org/web/20150831055105/http://aurimasv.github.io/z2csl/typeMap.xml