redleafnew / delitemwithatt

Remove attachment(s) when delete the item(s) or collection in Zotero and JurisM.
GNU Affero General Public License v3.0
553 stars 11 forks source link

能否处理条目已经被删了的游离附件 #4

Closed wohenbushuang closed 3 years ago

wohenbushuang commented 3 years ago

由于历史原因,之前使用过程中肯定已经删过一些条目,但是不确定附件是否也被删除了

  1. 对指定的数据文件夹下,没有在数据库中链接的附件进行清理
  2. 删掉剩余的空文件夹
redleafnew commented 3 years ago

Zotero不用安装其它软件清理删除条目后残留的PDF方法见https://zhuanlan.zhihu.com/p/356071795 Zotero库中参考文献条目删除后,清除残留PDF的python脚本https://zhuanlan.zhihu.com/p/121770068 Zotero中安装了Zotfile后删除文献后清除PDF附件的小程序https://zhuanlan.zhihu.com/p/109531298 其它技巧见:https://github.com/redleafnew/Chinese-std-GB-T-7714-related-csl

redleafnew commented 3 years ago

至于文件夹我没有搞过。

wohenbushuang commented 3 years ago

谢谢,我再研究研究

redleafnew commented 3 years ago

https://github.com/jlegewie/zotfile/issues/96上提到: At least there is one workaround:

  1. Stop any syncing serves. Just in case.
  2. Change zotfile folder to any temp directory.
  3. In Zotero select all files -> right click -> Manage Attachments -> Rename Attachments. That will move files which are only in your Zotero library.
  4. Remove everything from the original folder. At this point it is better to sync intermediate state to avoid any conflicts in the future.
  5. Change zotfile folder to the original directory.
  6. In Zotero select all files -> right click -> Manage Attachments -> Rename Attachments.
  7. Profit.