zotero-mdnotes icon indicating copy to clipboard operation
zotero-mdnotes copied to clipboard

Distinguish between attachments that are 'stored copy of file' and 'link to file'

Open richardlm opened this issue 3 years ago • 6 comments

I store my attachments in pCloud (Webdav storage) which Zotero can access and retrieve.

However, I also store some items in local storage which Zotero can only find and retrieve if I am running it on that machine.

I know that it is possible to programmatically distinguish between these two types - a Roam plug-in offered it - but not how it is achieved.

One solution would be to show the link to a stored copy as now, and a link to a file that is stored locally, and so may not be available, has the same 'link' icon that Zotero uses.

richardlm avatar May 03 '22 14:05 richardlm

I'm not sure what the feature request is? As far as I know, the zotero:// links should be able to open your attachments regardless of where they are stored, is that not the case?

argenos avatar May 03 '22 17:05 argenos

I don't know the technicalities, but I found this:

_File Copies and File Links When you add files to your Zotero library by hand, you can add them either as copies, or as links.

In case you add a file as a copy, a copy of the selected file is saved in the “storage” subdirectory of the Zotero data directory. These file copies are then synced by Zotero if you have set up file syncing (see the Sync chapter).

In case you add a file as a link, Zotero stores a link to the selected file to remember its location. Linked files are not copied, and are not synced by Zotero._

( in https://zotero-manual.github.io/adding-files/#:~:text=File%20Copies%20and%20File%20Links,-When%20you%20add&text=These%20file%20copies%20are%20then,are%20not%20synced%20by%20Zotero )

So the stored version is always available, whereas the link is to a document that probably isn't immediately accessible. I use it as a security / backup copy.

richardlm avatar May 03 '22 19:05 richardlm

Could you please show me one of your exports where the attachments are? The current implementation should not make any distinctions between remotely and locally stored, or if they are linked attachments. What happens when you click on one of those links?

argenos avatar May 03 '22 19:05 argenos

The actions on clicking the links in the Roam plug-in and Mdnotes are the same:

  • The action on clicking the link to the stored PDF document is to open it in the Zotero PDF editor.
  • The action on clicking the link to the linked document is to open Zotero at the metadata record.

The difference is that the linked document is indicated by an icon - see this from the Roam plug-in: Pasted image 20220503214909

I don't know how @AlixLahuec identifies this for ZoteroRoam but I assume it is in the API somewhere!

Thanks for the work you're doing with Mdnotes.

richardlm avatar May 03 '22 21:05 richardlm

I'm afraid that's probably out of the scope for mdnotes and something you'd need (or I'd recommend) to tweak on your editor of choice. If that's Obsidian, I'm pretty sure you can target those links with CSS.

argenos avatar May 03 '22 21:05 argenos

Added the help wanted tag just in case someone is interested in picking this up and making a PR

argenos avatar May 03 '22 21:05 argenos