wileyyugioh / zotmoov

Zotero plugin to automatically move attachments and link them
GNU General Public License v3.0
496 stars 6 forks source link

Add label to moved items like zotfile #49

Closed joezhouchenye closed 2 days ago

joezhouchenye commented 2 months ago

Zotfile will add a label _tablet to all files moved to the tablet.

It is convenient since we can easily know which files have been moved by the advanced search result of Zotero.

Can you add this feature to zotmoov as well?

joezhouchenye commented 2 months ago

I used Zotero with Zotfile and PDF Expert on iPad for a long time. I just found out I had to move to Zotmoov for Zotero 7 yesterday.

However, I tried the Zotero IOS app directly and it's better (PDF Expert's annotations are not fully compatible with Zotero reader).

Since Zotmoov's behavior in handling attachment files affects the Webdav sync, I will no longer use this plugin.

wileyyugioh commented 1 week ago

The latest beta version automatically tags moved files with the zotmoov tag.

jryans commented 1 week ago

ZotFile would actually manage it's tag in both directions: when moving to the folder, the tag is added, and when moving back, the tag is removed. Essentially, the tag acts as a way to easily work out which things are stored in the folder.

ZotMoov 1.2.x now does the adding half of the process, but seems to leave the tag applied when moving back. Perhaps it would make sense to also remove the tag similar to ZotFile...? (Let me know if I should move this to a separate issue.)

wileyyugioh commented 1 week ago

@jryans Moving files back into Zotero now removes the zotmoov tag in 1.2.3.

jryans commented 1 week ago

Hmm, just tested 1.2.3 today, but there seems to be a race condition: sometimes the tag is removed, but sometimes it remains applied.

Here are my steps:

  1. Remove tag from attachments manually if needed (to reset back to steady state)
  2. Right-click PDF attachment, choose "Move Selected to Directory"
  3. PDF moves, converted to linked item, tag added: correct!
  4. Right-click PDF attachment, choose "Move Selected from Directory"
  5. PDF always moves back, and it's always converted to stored item, but sometimes the tag is still applied
wileyyugioh commented 1 week ago

@jryans Does 1.2.4 fix the issue? I moved the tag removing code into the promise so there shouldn't be any race conditions.

jryans commented 6 days ago

Thanks, 1.2.4 appears to remove the tag reliably now. 😄