{"id":20197331,"url":"https://github.com/redleafnew/delitemwithatt","last_synced_at":"2025-05-07T04:31:22.244Z","repository":{"id":45019204,"uuid":"349418277","full_name":"redleafnew/delitemwithatt","owner":"redleafnew","description":"Remove attachment(s) when delete the item(s) or collection in Zotero and JurisM.","archived":false,"fork":false,"pushed_at":"2025-04-09T03:53:24.000Z","size":1231,"stargazers_count":577,"open_issues_count":5,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T04:28:15.461Z","etag":null,"topics":["javascript","zotero","zotero-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redleafnew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-19T12:38:51.000Z","updated_at":"2025-04-09T03:53:29.000Z","dependencies_parsed_at":"2023-12-09T08:32:56.777Z","dependency_job_id":"d94c5174-6acd-407d-93aa-506c6c938c7b","html_url":"https://github.com/redleafnew/delitemwithatt","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redleafnew%2Fdelitemwithatt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redleafnew%2Fdelitemwithatt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redleafnew%2Fdelitemwithatt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redleafnew%2Fdelitemwithatt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redleafnew","download_url":"https://codeload.github.com/redleafnew/delitemwithatt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252813876,"owners_count":21808395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","zotero","zotero-plugin"],"created_at":"2024-11-14T04:27:52.222Z","updated_at":"2025-05-07T04:31:22.233Z","avatar_url":"https://github.com/redleafnew.png","language":"TypeScript","readme":"\n# Delete item(s) with attachment(s)\n\n[![zotero target version](https://img.shields.io/badge/Zotero-7.*-green?style=flat-square\u0026logo=zotero\u0026logoColor=CC2936)](https://www.zotero.org)\n[![version](https://img.shields.io/github/package-json/v/redleafnew/delitemwithatt?style=flat-square)](https://github.com/redleafnew/delitemwithatt/releases/)\n[![download number](https://img.shields.io/github/downloads/redleafnew/delitemwithatt/latest/total?style=flat-square)](https://github.com/redleafnew/delitemwithatt/releases/)\n[![license](https://img.shields.io/github/license/redleafnew/delitemwithatt?style=flat-square)](#license)\n[![Using Zotero Plugin Template](https://img.shields.io/badge/Using-Zotero%20Plugin%20Template-blue?style=flat-square\u0026logo=github)](https://github.com/windingwind/zotero-plugin-template)\n\n# 注意：\n\n[最新版](https://github.com/redleafnew/delitemwithatt/releases/latest)仅支持Zotero 7.0及以上版本, Zotero 6.0请下载[0.1.06](https://github.com/redleafnew/delitemwithatt/releases/tag/0.1.06)。\n\n# 安装及设置\n\n点击下方链接下载插件.xpi文件，然后在Zotero或JurisM中通过工具-插件-Install Plugin From File...安装。\n\n   - [最新版](https://github.com/redleafnew/delitemwithatt/releases/latest)\n   - [历史版本](https://github.com/redleafnew/delitemwithatt/releases)\n\n   *注意*：火狐浏览器用户请通过在链接上右击，选择“另存为”来下载 .xpi 文件。\n\n**插件静默启动设置**，即关闭Zotero软件启动时右下角的Del ltem With Attachment插件启动进度弹窗\n\n   - 静默启动设置：在`Zotero`中点击`工具`-`开发者`-`Run JavaScript`，输入以下内容，点击左上角的`执行/Run`即可：\n\n     `Zotero.Prefs.set('extensions.zotero.delitemwithatt.quiet.boot', 'enable', true); // 开启插件静默启动`\n\n![Run_JavaScript](./img/Run_JavaScript.jpg \"Run JavaScript\")\n\n# 插件用途\n\n1. 删除条目或分类的同时将附件（包括链接的附件）一块删除。\n\n   - 在条目上右击会出现：`删除附件`，如果条目有附件，会出现6个子菜单，`删除附件和条目(Alt/⌥+I)`，`仅删除所有附件(Alt/⌥+A)`，`仅删除快照(Alt/⌥+S)`，`仅删除笔记(Alt/⌥+N)`，`清空“摘要”字段(Alt/⌥+Z)`，`清空“其他”字段(Alt/⌥+X)`，点击后对应的条目包括附件、附件、快照或笔记会被删除（包括文件）\n   - 在分类上右击会出现：`删除分类包括附件`，确认后会在删除分类的同时将分类中的条目包含附件删除，快照也认为是附件。\n\n    \u003e **注意：删除时链接文件不进回收站，直接删除，请删除前备份**。\n\n   不同操作系统下的插件默认快捷键：\n\n    | 功能            | Windows/Linux系统快捷键 | MacOS快捷键 | MacOS备用快捷键 |\n    | --------------- | ---------------------- | -------------- |------------------- |\n    | 删除附件和条目   | `Alt+I`                | `⌥+I`          | `⇧+⌥+I`           |\n    | 仅删除所有附件   | `Alt+A`                | `⌥+A`          | `⇧+⌥+A`           |\n    | 仅删除快照       | `Alt+S`                | `⌥+S`          | `⇧+⌥+S`           |\n    | 仅删除笔记       | `Alt+N`                | `⌥+N`          | `⇧+⌥+N`           |\n    | 清空“摘要”字段   | `Alt+Z`                | `⌥+Z`          | `⇧+⌥+Z`           |\n    | 清空“其他”字段   | `Alt+X`                | `⌥+X`          | `⇧+⌥+X`           |\n\n    对于MacOS，以上快捷键不支持自定义修改，提供备用快捷键以防默认快捷键被占用\n\n    对于Windows/Linux系统，以上快捷键支持自定义修改为`Alt+其他快捷字母`，修改方法如下：\n\n    在`Zotero`中点击`工具`-`开发者`-`Run JavaScript`，输入以下内容并修改快捷键字母，点击左上角的`执行/Run`即可：\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.item.att', 'I', true); // 修改删除条目和附件默认快捷键，修改I为预设置的快捷字母`\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.att', 'A', true); // 修改删除附件默认快捷键，修改A为预设置的快捷字母`\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.snap', 'S', true); // 修改删除快照默认快捷键，修改S为预设置的快捷字母`\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.note', 'N', true); // 修改删除笔记默认快捷键，修改I为预设置的快捷字母`\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.extra', 'X', true); // 修改删除其它默认快捷键，修改X为预设置的快捷字母`\n\n    `Zotero.Prefs.set('extensions.zotero.delitemwithatt.key.del.abs', 'Z', true); // 修改删除摘要默认快捷键，修改Z为预设置的快捷字母`\n\n2. 根据条目标题语言将所选条目语言字段设置为`en-US`或`zh-CN`。\n\n3. 将附件导出。\n\n# 感谢\n\n本插件基于@windingwind的[zotero-plugin-template](https://github.com/windingwind/zotero-plugin-template)开发，在此表示感谢。\n\n# Reminder：\n\nThe latest version only supports Zotero 7.0 (or later versions), Zotero 6.0 users could download [0.1.06](https://github.com/redleafnew/delitemwithatt/releases/tag/0.1.06)。\n\n# Installation\n\nDownload the plugin (.xpi file) from below, and click Tools-Plugins-Install Plugins From File... in Zotero or JurisM to install the plugin.\n\n   - [Latest Version](https://github.com/redleafnew/delitemwithatt/releases/latest)\n   - [All Releases](https://github.com/redleafnew/delitemwithatt/releases)\n\n   *Note*: If you're using Firefox as your browser, right-click the `.xpi` and select \"Save As..\"\n# Usage\n\n1. Remove attachment(s) (including linked attachments) when delete the item(s) or collection.\n\n   - When you right-click item(s), you can find `Delete Attachment(s)` in the context menu. If there is/are attachment(s) attached to the item(s), there will be 6 submenus, `Delete Attachment(s) and Item(s)(Alt/⌥+I)`, `Delete All Attachment(s) only(Alt/⌥+A)`, `Delete Snapshot(s) only(Alt/⌥+S)`, `Delete Note(s) only(Alt/⌥+N)`, `Empty \"Abstract\" Field(s)(Alt/⌥+Z)`, `Empty \"Extra\" Field(s)(Alt/⌥+X)`, when confirm, the item(s), attachment(s), snapshot(s) or note(s) will be deleted; \n   - When you right-click collection, you can find `Delete Collections with Attachments` in the context menu. When confirm, the collection and the item(s) with attachment(s) in the selected collection will be deleted. Snapshot is also regarded as attachment.\n\n    \u003e **Note: the linked files could not be restored, they will be removed directly, please backup before removing.**\n\n2. Set the language field of selected items as `en-US` or `zh-CN` according to the language of item title.\n\n3. Export attachment(s).\n\n# Disclaimer\n\nThis plugin based on @windingwind's [zotero-plugin-template](https://github.com/windingwind/zotero-plugin-template)，many thanks for his team's hard working。\n\n# License\n\nThe source code is released under GNU General Public License, version 3.0\n\nContributions preferably through pull requests are welcome!\n","funding_links":[],"categories":["Extensions"],"sub_categories":["Customization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredleafnew%2Fdelitemwithatt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredleafnew%2Fdelitemwithatt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredleafnew%2Fdelitemwithatt/lists"}