html Link to Open Zotero (and a specific document)
Hello,
I'd like to write summary notes that link to the files that they will be summarizing. What I'd love is a way to to have these links open Zotero and select the desired file. Of course it would then be only compatible with my own zotero account and would assume that that's installed, but that's no problem.
The closest I've found is an organization structure that seems to apply only to web snapshots of the format zotero://attachment/#/. A href to these files will open the web snapshot in the browser, which is close to what I'm after. But if the link could highlight that file within zotero, I'd be in heaven.
I guess the next best option will be to link to the corresponding Library file at https://www.zotero.org/sackvillian/items/##### but again it's not quite what I'm after.
Any help would be greatly appreciated!
I'd like to write summary notes that link to the files that they will be summarizing. What I'd love is a way to to have these links open Zotero and select the desired file. Of course it would then be only compatible with my own zotero account and would assume that that's installed, but that's no problem.
The closest I've found is an organization structure that seems to apply only to web snapshots of the format zotero://attachment/#/. A href to these files will open the web snapshot in the browser, which is close to what I'm after. But if the link could highlight that file within zotero, I'd be in heaven.
I guess the next best option will be to link to the corresponding Library file at https://www.zotero.org/sackvillian/items/##### but again it's not quite what I'm after.
Any help would be greatly appreciated!
Dan suggested that they are given in reports generated on individual items but that doesn't seem to be the case. Is the problem that I'm running 2.0.9.r7437? Does this build even support using library key hashes with the select command?
How can I access any of the document identifiers compatible with the zotero://select command from within the GUI? Is there a way to have reports contain such information?
zotero://report/items/0_EZXVJ5ZW/html/report.html
0_EZXVJ5ZW is a key for an item in my library -- zotero://select/0_EZXVJ5ZW will select it
I made an export translator for this once -- https://github.com/ajlyon/zotero-bits/raw/master/zotselect-link.js
Save it to the translators directory of your Zotero data directory, restart Firefox, and ZotSelect Link will appear as an option when you elect to export items. The translator generates links of the form zotero://select for the selected items.
I've tried the zotero://select/ with the key obtained from the address of a report but Zotero cannot locate the items, producing this error in the debug log:
(3)(+0000000): No arguments provided to Items.get()
(2)(+0000000): Item not found in zotero://select
Does it matter that I'm using 2.0.9.r7437?
But one last question, presumably aimed at you ajlyon, and I'll stop pestering.
Is there a similar identifier that will be consistent among several computers on the same account that I can access via the GUI? Library-key hashes seem like a likely suspect but I have no idea of how to get 'em.
Many thanks.
It is possible, using a similar logic, to create a hyperlink to the item itself -- but that has two problems: 1) it takes a few steps to convert the "report" hyperlink to a "select/item" hyperlink; 2) the link doesn't necessarily work well, depending on whether Zotero is in tab mode or pane mode, and (it seems) whether it's in a good mood or not.
edit: I managed to find the file in your github history (here in case anyone wants it). However, when I install and try to use it, it doesn't work. Nothing happens when I drag and drop to export with that translator set as the default, and if I right-click export it gives the error: "An error occurred while trying to export the selected file". Can you suggest what I might be doing wrong?
https://gist.github.com/nschneid/3134386#file-zotselect-link-js-L19
and
https://gist.github.com/nschneid/3134386#file-zotselect-link_simple-js-L19
should be
var library_id = item.libraryID ? item.libraryID : 0;
i.e. the libraryID variable starts with a lowercase letter. This only matters for groups. It seems silly to make a separate copy of this just for that, so if you'd fix it?