Compare commits

..

6 Commits

Author SHA1 Message Date
MD. PARVEJ HOSSAIN
be9dbfdb23 docs: update extension homepage and repository metadata; rebuild xpi 2026-06-10 23:41:24 +06:00
MD. PARVEJ HOSSAIN
e2ee3ae3ae ci: remove all github actions and workflows 2026-06-10 23:23:52 +06:00
MD. PARVEJ HOSSAIN
db9602d51b docs: highlight instant bulk-export feature in README 2026-06-10 23:22:03 +06:00
MD. PARVEJ HOSSAIN
0effff0d3c docs: add screenshots and preview section to README 2026-06-10 23:20:40 +06:00
MD. PARVEJ HOSSAIN
01a0056fc4 docs: update README with detailed description and download link
Some checks are pending
Release / create-release (push) Waiting to run
2026-06-10 23:13:08 +06:00
MD. PARVEJ HOSSAIN
697920a374 Add release download badge and detailed description to README 2026-06-10 23:12:25 +06:00
11 changed files with 68 additions and 114 deletions

View File

@ -1,16 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
groups:
all-non-major:
update-types:
- "minor"
- "patch"

View File

@ -1,4 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>zotero-plugin-dev/renovate-config"]
}

View File

@ -1,44 +0,0 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
steps:
- name: Setup JS
uses: zotero-plugin-dev/workflows/setup-js@main
- name: Run Lint
run: npm run lint:check
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
steps:
- name: Setup JS
uses: zotero-plugin-dev/workflows/setup-js@main
- name: Run Build
run: npm run build
- name: Upload build result
uses: actions/upload-artifact@v4
with:
name: build-result
path: .scaffold/build
test:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Setup JS
uses: zotero-plugin-dev/workflows/setup-js@main
- run: npm run test

View File

@ -1,20 +0,0 @@
name: Issue Bot
on:
issues:
types:
- labeled
issue_comment:
types:
- created
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
issue-bot:
uses: zotero-plugin-dev/workflows/.github/workflows/issue-bot.yml@main

View File

@ -1,21 +0,0 @@
name: Release
on:
push:
tags:
- v**
permissions:
contents: write
issues: write
pull-requests: write
jobs:
create-release:
uses: zotero-plugin-dev/workflows/.github/workflows/release-plugin.yml@main
# You can customize any of the inputs here.
# If you omit an input, its default value will be used.
with:
build: "npm run build"
release: "npm run release"
secrets: inherit

View File

@ -1,11 +1,68 @@
# Zotero PDF Copier & Renamer # Zotero PDF Copier & Renamer
[![Download XPI](https://img.shields.io/badge/Download-zotero--pdf--copier--renamer.xpi-brightgreen?style=for-the-badge&logo=github)](https://github.com/iu-parvej/Zotero-PDF-Copier-Renamer/releases/download/v1.0.0/zotero-pdf-copier-renamer.xpi)
A powerful, lightweight, and restartless add-on for **Zotero 7, 8, and 9** that lets you copy attached PDF documents from selected bibliography references into any folder on your computer. Copied PDFs are automatically renamed based on the paper's title (sanitized for safe OS filenames) and index-deduplicated. A powerful, lightweight, and restartless add-on for **Zotero 7, 8, and 9** that lets you copy attached PDF documents from selected bibliography references into any folder on your computer. Copied PDFs are automatically renamed based on the paper's title (sanitized for safe OS filenames) and index-deduplicated.
> [!IMPORTANT]
> **Instant Bulk Exporting**: This extension is built specifically to process **multiple references at once**. Select dozens or hundreds of papers, right-click, choose your folder, and all attached PDFs are renamed and saved in a split second. No manual clicks, no tedious per-file folder navigation, and no slow popup loops!
Developed and designed with custom branding and a native graphical interface. Developed and designed with custom branding and a native graphical interface.
--- ---
## Screenshots & Preview
### 1. Seamless Context Menu Integration
Select your bibliography references, right-click, and select **Copy Attachments to Folder...** to begin the export:
<p align="center">
<img src="assets/context_menu.png" alt="Right-click Context Menu" width="80%">
</p>
### 2. Live Status & Copy Completion
A native popup notification tracks the copy operation and confirms when the files have been copied successfully:
<p align="center">
<img src="assets/copy_completed.png" alt="Copy Completed Toast" width="60%">
</p>
### 3. Clean Zotero Add-ons Listing
The extension is fully integrated with Zotero's Add-ons manager, showing the custom icon, updated author info, homepage, and version metadata:
<p align="center">
<img src="assets/addon_manager.png" alt="Add-ons Manager Listing" width="90%">
</p>
---
## Detailed Description
**Zotero PDF Copier & Renamer** is a professional-grade productivity extension built from the ground up for researchers, students, academics, and knowledge managers who utilize Zotero 7, 8, or 9 as their primary reference management system. While Zotero is incredibly powerful for cataloging reference metadata, fetching citation records, and organizing library items, extracting the actual PDF attachments for external use has always been a painful, friction-heavy process.
By default, Zotero abstracts files inside a local database storage system. Each PDF is hidden inside a separate, randomly generated alphanumeric directory (such as `Zotero/storage/3A8B9CDF/`). While this hashed architecture is crucial for Zotero's database integrity and synchronization stability, it makes the physical files completely inaccessible to users wishing to browse their papers locally. If you want to copy a set of papers to a USB drive, upload them to a shared cloud folder, email them to a colleague, or send them to an iPad/tablet for reading, you must open each folder manually or rely on clunky workarounds. Furthermore, Zotero's downloaded files are often named generically (like `fulltext.pdf`, `manuscript.pdf`, or abbreviated author names), stripping away the context of the research paper itself.
This addon solves these limitations elegantly by introducing a native right-click context menu option that allows users to instantly copy the PDF attachments of all selected items directly to any target folder on their computer. The files are not just copied; they are dynamically processed, sanitized, and renamed based on the actual paper titles stored in Zotero's database.
### Why It Is Essential
1. **Intelligent Metadata-Driven Renaming**:
Instead of keeping obscure or generic filenames, the extension reads the parent item's official title metadata dynamically. It reformats the file name to be clean, human-readable, and highly descriptive. For example, a file stored as `fulltext.pdf` inside `Zotero/storage/7J8KL9MN/` is copied and renamed to `A Deep Learning Approach to Climate Modeling.pdf`.
2. **Advanced Filename Sanitization**:
Different operating systems (Windows, macOS, and Linux) have different rules and reserved characters for filenames. To prevent errors and system crashes during copy operations, the addon features a robust sanitization engine. It automatically strips or replaces illegal characters—such as colons (`:`), question marks (`?`), backslashes (`\`), forward slashes (`/`), asterisks (`*`), vertical bars (`|`), quotation marks (`"`), and inequality brackets (`<`, `>`)—ensuring absolute file path compatibility across any filesystem (NTFS, APFS, ext4).
3. **Smart Collision & Multi-Attachment Resolution**:
In high-volume research, naming conflicts are inevitable. You might have multiple papers with identical titles, or a single bibliographic entry might have multiple associated PDF files (for instance, the main article, a supplemental figures document, and a pre-print version). The addon handles this seamlessly. If a file with the target name already exists in the destination folder, or if there are multiple PDFs attached to a single item, the plugin automatically appends a numeric suffix (e.g., `Deep Learning Approach_(1).pdf`, `Deep Learning Approach_(2).pdf`), preventing accidental data loss or file overwriting.
4. **Modern, Native UI & Smooth User Experience**:
Leveraging Zotero's native user interface libraries, the extension integrates seamlessly into the application window. When a copy operation begins, a clean, modern notification popup appears in the bottom-right corner of Zotero. It features a graphical, animated progress bar using Zotero's native `ItemProgress` layout. This displays the percentage of files copied, a detailed text indicator of the specific paper currently being processed, and a visual loader. Once the operation is complete, the modal stays open for 5 seconds to let you confirm success, and then closes itself automatically. Users can also dismiss it instantly by clicking a close button or clicking anywhere on the popup.
5. **Future-Proof Gecko Integration**:
Built on Zotero's bootstrapped architecture, the addon is fully compatible with Zotero 7, Zotero 8, and Zotero 9. It incorporates advanced API compatibility layers to handle changes in Mozilla's Gecko engine, specifically addressing Gecko 128+ file picker standards by using `window.browsingContext` fallback logic, ensuring a smooth, crash-free experience on all modern and future Zotero versions.
---
## Developer Details ## Developer Details
- **Author**: Md. Parvej Hossain - **Author**: Md. Parvej Hossain
@ -17,6 +74,7 @@ Developed and designed with custom branding and a native graphical interface.
## Key Features ## Key Features
- **Fast Bulk Exporting**: Optimized for batch actions. Select multiple items (tens or hundreds of references) at once, and copy all their attached PDFs simultaneously in less than a second without clicking any manual folder pickers for each file or dealing with popup loops.
- **Direct Context Menu Access**: Right-click on any selected items in the main library grid pane to start copying instantly. - **Direct Context Menu Access**: Right-click on any selected items in the main library grid pane to start copying instantly.
- **Visual Icon Registration**: Custom branded icon next to the context menu command and inside the Zotero Extensions listing for quick visual recognition. - **Visual Icon Registration**: Custom branded icon next to the context menu command and inside the Zotero Extensions listing for quick visual recognition.
- **Smart PDF Copying**: Filters all selected items to only copy actual PDF files (skips notes, web links, or citations that do not have attachments). - **Smart PDF Copying**: Filters all selected items to only copy actual PDF files (skips notes, web links, or citations that do not have attachments).
@ -61,12 +119,13 @@ To package the extension from source:
## Installation Guide ## Installation Guide
1. Open **Zotero** on your computer. 1. **Download the Extension**: Click [here to download the latest `zotero-pdf-copier-renamer.xpi` release](https://github.com/iu-parvej/Zotero-PDF-Copier-Renamer/releases/download/v1.0.0/zotero-pdf-copier-renamer.xpi).
2. Go to the top menu: **Tools -> Add-ons** (or **Extensions**). 2. Open **Zotero** on your computer.
3. Click the gear icon (`⚙️`) in the top-right corner of the Add-ons manager page. 3. Go to the top menu: **Tools -> Add-ons** (or **Extensions**).
4. Select **Install Add-on From File...**. 4. Click the gear icon (`⚙️`) in the top-right corner of the Add-ons manager page.
5. Select the generated **`zotero-pdf-copier-renamer.xpi`** file. 5. Select **Install Add-on From File...**.
6. Click **Install** and restart Zotero when prompted. 6. Select the downloaded **`zotero-pdf-copier-renamer.xpi`** file.
7. Click **Install** and restart Zotero when prompted.
--- ---

BIN
assets/addon_manager.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
assets/context_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

BIN
assets/copy_completed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -12,13 +12,13 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/windingwind/zotero-plugin-template.git" "url": "git+https://github.com/iu-parvej/Zotero-PDF-Copier-Renamer.git"
}, },
"author": "Md. Parvej Hossain <contact@parvej.me>", "author": "Md. Parvej Hossain <contact@parvej.me>",
"bugs": { "bugs": {
"url": "https://github.com/windingwind/zotero-plugin-template/issues" "url": "https://github.com/iu-parvej/Zotero-PDF-Copier-Renamer/issues"
}, },
"homepage": "https://github.com/windingwind/zotero-plugin-template#readme", "homepage": "https://github.com/iu-parvej/Zotero-PDF-Copier-Renamer#readme",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"scripts": { "scripts": {
"start": "zotero-plugin serve", "start": "zotero-plugin serve",

Binary file not shown.