wileyyugioh / zotmoov

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

Replicate Send to Tablet and Get from tablet from Zotfile #44

Open JanPastorek opened 2 months ago

JanPastorek commented 2 months ago

Hi,

I think there is a big group of people waiting for functions "Send to Tablet" and "Get from tablet" from Zotfile to be implemented in either Attanger or Zotmoov, see https://forums.zotero.org/discussion/116679/zotero-7-and-zotfile

I believe Zotmoov has all the necessary functionalities already available. In Zotfile it worked like this:

  1. By right clicking on a certain item in library, you had available option to "Send to Tablet"
  2. If clicked, this assigned a tag to the item → _tablet and copied the file to specified directory in the settings
  3. Then we markup on tablet, selecting and annotating a PDF in that specified directory
  4. By right clicking on that item in library again, we have available option to "Get from Tablet" which pulls selections and annotations in PDF and extracts them as notes, and takes away the _tablet tag, and it moves the annotated copy of the original file to the storage (which now has +1 pdf files, one of them is the annotated one).

Thank you for consideration! All the best

jryans commented 2 months ago

The file moving portions of ZotFile already exist here in ZotMoov in some form or another. Perhaps you're already aware of this, but just for clarity, I'll try to convert your ZotFile steps into equivalent ZotMoov steps.

As prep work, get your ZotFile tablet files back from tablet, as ZotMoov stores them differently. Set your linked attachment base directory to the tablet directory.

  1. To send a file, right-click and choose "ZotMoov: Move Selected to Directory"
  2. The file is moved to the tablet (or copied depending on preferences)
    • ZotMoov does not currently set a tag on moved / copied items
  3. Markup the PDF as before
  4. To get a file back, right-click and choose "ZotMoov: Move Selected from Directory"
    • ZotMoov does not process annotations, but you can read / import them in Zotero's PDF reader
    • In move mode, ZotMoov just moves PDFs, so there won't be an extra PDF, but rather only the annotated one. (Maybe copy mode does leave an extra file, haven't used that myself.)

So, the core moving / copying functions are already there. Which of the remaining pieces are essential to your workflow (if any)...? That may help @wileyyugioh decide whether they are a good fit for ZotMoov.

JanPastorek commented 2 months ago

I will add this discussion to Zotero forums so that more people will have their say.

For myself, it would be great to replicate all of 1. - 4. that you described under two buttons - send to to tablet (1.-2.), get from tablet (4.) . Setting a tag is especially important to have a clear view that these files are currently annotated on tablet. Getting the annotated extra PDF file is important as well.

StoyanPv commented 2 months ago

I endorse this request!

boolanger commented 2 months ago

Same!

One thing to have in mind is that one may want to have the tablet directory separate from the linked attachment base directory (this is possible in ZotFile).

zouyonghao commented 1 month ago

I also need this. My files are synced using WebDAV but I don't want to sync all files to my e-reader.

EbiAG commented 1 month ago

This is something I also relied on with Zotfile. It would be great to have it with ZotMoov!

zouyonghao commented 1 month ago

I made a very simple plugin here to support my needs. It only has features including setting the destination folder (in the Settings), send a file to the folder and retrieve a file from the folder.

tom-mclean commented 3 weeks ago

Is there a (non-technically complex) way of installing ZotMoov twice? (Also: that doesn't break everything...)

So far, I've set ZotMoov up to do one of the two remaining tasks I used Zotfile for: moving files I add to Zotero to the folder I want them stored in. (I want to be able to store files in folders by author, whereas natively Zotero only seems to tolerate putting them in a single folder. With 3000+ items in my library and wanting to be able to access them directly and not just through Zotero, folders are essential!).

The other task is that of moving files to my tablet when I want to read them remotely. As mentioned in the thread, being able to tag them when doing so would be ideal, but I can manage without that. With a second instance of ZotMoov, it could also be used to send to and retrieve from my tablet.

This presumably needs a safeguard built in so that it can't descend into an infinite loop of automatic moves, but otherwise presumably doesn't need to change much? (An instance without the automatic options perhaps?)

wileyyugioh commented 3 weeks ago

@tom-mclean A feature that will be in the upcoming 1.2 beta release is custom menu items. So you can create your own custom menu item that will move it to the directory you specify and add tags. All of the main features for 1.2 are already coded---I want some time to check for bugs. So the 1.2 beta should be released in the next few weeks. Sit tight!

wileyyugioh commented 1 week ago

The latest beta version has the ability to define a custom menu item. This includes moving files to a specific directory, extracting annotations, and moving files back into Zotero.

Something I quickly set up is:

Screen Shot 2024-11-12 at 23 15 59

JanPastorek commented 1 week ago

thank you, finally I think I am ready to move to Zotero 7 :)

JanPastorek commented 2 days ago

@wileyyugioh I tried it, and everything except "Copy To" function seems to work. "Copy to" makes a new file, however, it is not linked to the Item in the zotero.

wileyyugioh commented 2 days ago

@JanPastorek that’s correct. Copy to is for making backup of files without linking them to Zotero.

blogfar commented 22 hours ago

Thank you so much for these amazing changes! Is there actually a way to make the "Add Tag" option to actually add the tag to the parent metadata, so that the tag would be visible next to other tags?

image

This is what I get now from adding "Add Tag" to my "Send to Tablet" custom menu item. It is however just a small pushback, I can always use hotkeys and attach the tag manually.

Edit: Apparently sometimes, the "Add Tag" doesn't even create the tag.

tom-mclean commented 20 hours ago

I'm still having issues with setting up a "Get from Tablet" command. ("Send to Tablet" appears to be working fine).

I have the commands as in the attached screenshot: Move From; Annotation to Note; Remove Tag.

Screenshot 2024-11-25 at 12 54 45

When I use the "Get" command, the file appears in the storage folders (with random alphanumeric names) which are the default storage location for Zotero, not the folders its come from, without any of the annotations I've added on my tablet. The file is also not removed from the tablet storage location (though that version retains the annotations). The tag is not removed in Zotero.

I've also tried setting up the command using the "Move To" option (setting the custom directory to the root folder of my library, and enabling the subdirectory option to get into the right folder). In this case, the file doesn't seem to appear in the randomly assigned folders, but annotations are not present in the version in Zotero, and again it is removed from the tablet location.

Am I doing something wrong?

wileyyugioh commented 5 hours ago

@blogfar Yes, I will add an option in the next update that will also let you add a tag to the parent item. Also I think I found the bug that causes the add tag to sometimes not work.

wileyyugioh commented 5 hours ago

@tom-mclean The second option would be the way to go. I'm surprised the annotations are not present. Do you mean the note isn't created, or the annotation in the PDF disappears?