wshanks / Zutilo

Zotero plugin providing some additional editing features
Other
1.49k stars 70 forks source link

Rename Attachment shortcut not working #209

Closed welpdx closed 2 years ago

welpdx commented 2 years ago

Issue description

After I add a shortcut config to Rename Attachment, the shortcut doesn't work. Other shortcuts do work.

Steps to reproduce the issue

  1. Tools -> Zutilo Preferences... -> Shortcuts
  2. Scroll down to Rename Attachments (category: Attachments) -> add any shortcut that isnt used before
  3. Apply -> OK -> click on parent
  4. Using the shortcut doesn't work

What's the expected result?

I expect it to rename the attached pdf file name.

What's the actual result?

Nothing happens

Additional info

Zotero 5.0.96.3 Add-ons installed"

What fix did you try?

The shortcuts that are working (for e.g., Alt + Ctrl + C), I disabled that Zutilo shortcut and used that shortcut for Rename Attachments... didn't help

welpdx commented 2 years ago

nvm. I should be changing the shortcut for "Move and rename attachments" not "Rename Attachments"

qqobb commented 2 years ago

Yes, if you're using ZotFile, use "Move and rename attachments", not "Rename attachments".

The shortcut for Zotero's function only works if you also get the "Rename File From Parent Metadata" option when right-clicking the selected items. You only get this option if you select attachments without their parent items. To select all PDF files, use a saved search as explained here. Alternatively, use Quick Search to select all PDF files in the current view:

  1. Quick Search ("All Fields & Tags"): .pdf.
  2. Select one item.
  3. "Edit" -> "Select All" (or Ctrl+A).

ZotFile's renaming function is much more flexible, but it currently can't rename linked files without moving them, see here.

welpdx commented 2 years ago

Hey @qqobb, thanks for the extra details! I didn't realize that 1) ZotFile can't rename linked file w/o moving them, and 2) one should use "Rename File From Parent Metadata" when selecting the pdfs (not parent items). Not a seriously big issue but it is good to know all this. Thanks for writing all this out! I'm def saving your comment for future reference.