wileyyugioh/zotmoov

Add "Get from Tablet" equivalent feature

Closed this issue ยท 10 comments

Thanks for your work on this extension! ๐Ÿ˜„

Zotfile had a "Get from Tablet" feature that would copy attachments out of the syncing folder and back into internal Zotero storage. Is that something you'd be interested in adding here?

For some context on my usage model, I used to use Zotfile's "Send to Tablet" to move attachments I wanted to read on my tablet to a shared syncing folder. I would then read / annotate on my tablet, then move back to Zotero internal storage when done with that item. Zotmoov's copy mode seems to be roughly the same as "Send to Tablet", so that covers the first half of my workflow. As far as I can tell though, there doesn't seem to be any "copy from shared storage back to Zotero internal and remove from shared storage" feature currently, so that's why I've filed this issue.

If you're not interested in supporting such a mode, that's okay of course, just let me know! ๐Ÿ™‚ I may fork this add-on or create my own to support it if needed.

Instead of copying the file how about moving it to the shared syncing folder? That way Zotero maintains a reference to the file which can easily be converted back to the internal storage via Tools -> Manage Attachments -> Convert Linked Files to Stored Files.

Unfortunately, that's not quite the behaviour I want.

"Convert Linked Files to Stored Files" appears to turn all linked files back into stored files (if I understand correctly). I want to make a choice about each file separately. I move a file back to internal Zotero storage when I am done with it, but I want to leave the other synced files alone.

Also, converting between linked files and stored files seems to reset the file attachment's "date added" field to the current time. I would prefer a solution that does not change this date.

No, Convert Linked Files to Stored Files only turns the selected linked files back into stored files. Any files that are not selected do not get converted.

And the file attachment's "date added" field remains the same. Did you mean the "dateAdded" field? That's for the internal Zotero entry. The actual field of the file is "attachmentModificationTime."

No, Convert Linked Files to Stored Files only turns the selected linked files back into stored files. Any files that are not selected do not get converted.

Ah okay, that's good to know. It would be a bit easier to use if there were a right-click action for moving back to Zotero storage just like there is when moving to the syncing folder, but at least the behaviour for moving a single file back to Zotero exists in some form. Perhaps this extension could add a right-click action similar to the existing move / copy actions...?

And the file attachment's "date added" field remains the same. Did you mean the "dateAdded" field? That's for the internal Zotero entry. The actual field of the file is "attachmentModificationTime."

I'm talking about the user-visible "Date Added" column of the attachment row when you toggle open the item. In Zotero's database schema, it corresponds to the dateAdded column of the items table for the attachment item (not the parent item).

As an example, here's what an item looks like before moving it using ZotMoov:

2024-05-16 at 13 41

You can see that initially the parent item and the attachment have the same date in the "Date Added" column.

When I move the file with ZotMoov, it looks like the attachment part is removed and readded in linked file form and it now has a "Date Added" value set to the current date:

2024-05-16 at 13 46

Perhaps ZotMoov is required to recreate a new attachment item in the way it works, but if so, it should fix up the "Date Added" value to preserve the original date.

Moving the file back to Zotero (via "Convert Linked Files to Stored Files") does preserve the "Date Added" value set by the previous ZotMoov step, so perhaps only a small ZotMoov change is needed to preserve the date across both directions of the moving process.

The user-visible "Date Added" column shown in the screenshots above might not appear by default. You may need to first enable it via View menu -> Columns -> Date Added or by right-clicking on the table header and changing the visible columns there.

Ah, thanks for the clarification. I added the feature so that dateAdded will be retained when converting to a linked file. It should be in the next update which will be released soon.

As for adding a menu item to convert linked files to stored files, since Zotero 7 is still in beta and I'm hesitant to recreate existing functionality, I'm going to hold off on that feature for a while. If there's enough demand I can add it in later down the road.

Ah, thanks for the clarification. I added the feature so that dateAdded will be retained when converting to a linked file. It should be in the next update which will be released soon.

Thanks for adding this! ๐Ÿ˜„ I look forward to testing it out once the new version appears.

As for adding a menu item to convert linked files to stored files, since Zotero 7 is still in beta and I'm hesitant to recreate existing functionality, I'm going to hold off on that feature for a while. If there's enough demand I can add it in later down the road.

Ah okay, makes sense.

Please try 1.0.0.1 and let me know if there are any issues.

1.0.0.1 appears to be working as expected, thanks for fixing the date. ๐Ÿ˜„

As an aside, I had to manually download the new version from GitHub, as Zotero did not detect any extension updates. (Perhaps that's expected since you've marked the release as a pre-release for now.)

Yes, I usually let the update sit for a bit to find any bugs before I push it to everyone. Glad it's working!