zotero icon indicating copy to clipboard operation
zotero copied to clipboard

Add "Copy Zotero URL" to context menu for selected item

Open ramsey opened this issue 10 months ago • 2 comments

This pull request adds "Copy Zotero URL" to the context menu when a single item is selected.

Clicking on "Copy Zotero URL" will copy the Zotero app URL for the item (e.g., zotero://select/library/items/68X5MRXD) to the system clipboard.

Here is a screenshot of "Copy Zotero URL," as it appears in the context menu:

Screenshot 2024-04-06 at 02 16 57

Rationale

I often add application URLs to various notes in Obsidian, Scrivener, Calibre, etc. This helps me link notes and research across multiple applications. So, I can be in Obsidian, for example, and click a link, which will take me to a specific paper in Zotero.

Previously, I had to take a round-about approach to construct this URL: I exported to item as a CSV file, opened that, and copied the item key, manually appending it to zotero://select/library/items/ wherever I wanted to add the link. This was cumbersome.

Since Obsidian and other applications provide "Copy URL" actions in context menus (e.g., see below), I thought it would be a good addition to add the same to Zotero.

Screenshot 2024-04-06 at 03 10 49

For example, clicking the "Copy Obsidian URL" item in the context menu adds a URL similar to the following to the system clipboard:

obsidian://open?vault=My%20Notes&file=Some%20Notes%2FTest%20Note

Another example comes from Calibre. Here, if I click "Link to show book in calibre," it copies a Calibre app URL to my clipboard:

Screenshot 2024-04-06 at 03 18 57
calibre://show-book/_hex_-43616c69627265/719

Scrivener also provides this functionality, with "Copy Document Link":

Screenshot 2024-04-06 at 03 23 30

Which produces a URL similar to this:

x-scrivener-item:///Users/ramsey/Documents/Scrivener/My%20Project.scriv?id=FAC10365-E103-4EBF-812A-068382286037

ramsey avatar Apr 06 '24 08:04 ramsey

See #2893 - we already have some work done on this.

AbeJellinek avatar Apr 10 '24 17:04 AbeJellinek

@AbeJellinek Should I close this one? It looks like #2893 has been open almost 1.5 years, and it's still in "Draft" form.

ramsey avatar Apr 10 '24 18:04 ramsey