Skip to content

Commit

Permalink
Release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenglongMa committed Apr 28, 2024
1 parent d56ba20 commit bd7f8a3
Show file tree
Hide file tree
Showing 20 changed files with 87 additions and 12 deletions.
55 changes: 52 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="https://raw.githubusercontent.com/ChenglongMa/zoplicate/main/docs/banner.png" alt="zoplicate banner">
<img src="./docs/banner.png" alt="zoplicate banner">
</div>

👉
Expand Down Expand Up @@ -42,13 +42,33 @@ Starting from **Version 2.0.0**, the plugin will support **Bulk Merge** function
# Changelog

## v2.3.0
## v3.0.0

<details markdown="1" open>
<summary><i>Click here to show more.</i></summary>

In this version, we have made the following changes:

1. 🐛 **FIX!**: We have fixed a **memory leak** bug that caused the app to freeze when editing PDF annotations.
* Thanks [vancleve](https://github.com/vancleve) and [pencilheart](https://github.com/pencilheart) for reporting this bug in [issue #30](https://github.com/ChenglongMa/zoplicate/issues/30) and [issue #31](https://github.com/ChenglongMa/zoplicate/issues/31) respectively.
2.**NEW!**: We have added the **Non-duplicates** functionality.
* You can mark items as **Non-duplicates** when they are mistakenly identified as "duplicates" by Zotero.
* Selecting two "false duplicates", you can find the `They are NOT duplicates` **menu items** in the context menu.
* ![menu_not_duplicates](./docs/non_duplicates/menu_not_duplicates.png)
* You can also find the `They are NOT duplicates` button in the `Duplicate Items` panel.
* ![button_not_duplicates](./docs/non_duplicates/button_not_duplicates.png)
* For more details, please see [Non-duplicates](#non-duplicates) section below.
* Thanks [dschaehi](https://github.com/dschaehi) for the discussion in [issue #25](https://github.com/ChenglongMa/zoplicate/issues/25).

</details>

## v2.3.0

<details markdown="1">
<summary><i>Click here to show more.</i></summary>

In this version, we have made the following changes:

1.**NEW!**: We have added an option to show the duplicate count on the left collection pane.
* You can find the option in the `Zoplicate` tab in the settings.
* When your mouse hovers over the <kbd>Duplicate Items</kbd> entry, a tooltip will show the duplicate statistics.
Expand All @@ -65,7 +85,7 @@ In this version, we have made the following changes:

## v2.2.0

<details markdown="1" open>
<details markdown="1">
<summary><i>Click here to show more.</i></summary>

In this version, we have made the following changes:
Expand Down Expand Up @@ -239,6 +259,35 @@ The duplicate count will be updated automatically. You can also find the <kbd>Re

![Refresh duplicate count](docs/refresh-duplicate-count.png)

## Non-duplicates

Starting from **Version 3.0.0**, we have added the **Non-duplicates** functionality.

You can mark items as **Non-duplicates** when they are mistakenly identified as "duplicates" by Zotero.

Selecting an item, you can manage the **Non-duplicates** items in the side panel:
![side_panel_not_duplicates](./docs/non_duplicates/side_panel_non_duplicates.png)

* Click the <kbd>![non-duplicate button](./addon/chrome/content/icons/non-duplicate.svg)</kbd> button to show the **Non-duplicates** section.
* Click the <kbd>+</kbd> button to add the selected item to the **Non-duplicates** list.
* Click the <kbd>-</kbd> button to remove the selected entry from the **Non-duplicates** list.

There are some ways to mark and unmark items as **Non-duplicates**:

### Mark as Non-duplicates

1. Click the <kbd>+</kbd> button to add the selected item to the **Non-duplicates** list.
2. Selecting two "false duplicates", you can find the `They are NOT duplicates` **menu items** in the context menu.
* ![menu_not_duplicates](./docs/non_duplicates/menu_not_duplicates.png)
3. You can also find the `They are NOT duplicates` button in the `Duplicate Items` panel.
* ![button_not_duplicates](./docs/non_duplicates/button_not_duplicates.png)

### Unmark as Non-duplicates

1. Click the <kbd>-</kbd> button to remove the selected entry from the **Non-duplicates** list.
2. Selecting two "non duplicates", you can find the `They are duplicates` **menu items** in the context menu.
* ![menu_not_duplicates](./docs/non_duplicates/menu_duplicates.png)

# Contributing

👋 Welcome to **Zoplicate**! We're excited to have your contributions. Here's how you can get involved:
Expand Down
7 changes: 7 additions & 0 deletions addon/chrome/content/icons/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions addon/chrome/content/icons/preficon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions addon/locale/en-US/addon.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ menuitem-is-duplicate = They are duplicates
# Add non-duplicate
add-not-duplicates-alert-error-duplicates = The selected items are not identified as Duplicates.
add-not-duplicates-alert-error-exist = The selected items already exist.
add-not-duplicates-alert-error-diff-library = Cannot add items from different libraries.
1 change: 1 addition & 0 deletions addon/locale/zh-CN/addon.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ menuitem-is-duplicate = 标记为重复条目
# Add non-duplicate
add-not-duplicates-alert-error-duplicates = 所选条目没有被识别为重复条目。
add-not-duplicates-alert-error-exist = 所选条目已存在。
add-not-duplicates-alert-error-diff-library = 无法添加不同库中的条目。
4 changes: 2 additions & 2 deletions addon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"homepage_url": "__homepage__",
"author": "__author__",
"icons": {
"48": "chrome/content/icons/favicon@0.5x.png",
"96": "chrome/content/icons/favicon.png"
"48": "chrome/content/icons/favicon.svg",
"96": "chrome/content/icons/favicon.svg"
},
"applications": {
"zotero": {
Expand Down
Binary file modified docs/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/non_duplicates/button_not_duplicates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/non_duplicates/menu_duplicates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/non_duplicates/menu_not_duplicates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/non_duplicates/side_panel_non_duplicates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/pref_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/zoplicate_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zoplicate",
"version": "2.3.0",
"version": "3.0.0",
"description": "Detect and manage duplicate items in Zotero.",
"config": {
"addonName": "Zoplicate",
Expand Down
1 change: 0 additions & 1 deletion src/modules/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ class SQLiteDB implements IDatabase {
FROM ${this.tables.nonDuplicates}
WHERE (itemID, itemID2) IN (${placeholders});`;
const result = await this._db.queryAsync(query, rows.flat());
ztoolkit.log("existsNonDuplicates called");
return result[0].count === rows.length;
}

Expand Down
5 changes: 4 additions & 1 deletion src/modules/nonDuplicates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export function registerNonDuplicatesSection(db: IDatabase) {

if (libraryIDs.size > 1) {
message = "add-not-duplicates-alert-error-diff-library";
} else if (!(await areDuplicates(itemIDs))) {
} else if (await db.existsNonDuplicates(itemIDs)) {
message = "add-not-duplicates-alert-error-exist";
}
else if (!(await areDuplicates(itemIDs))) {
message = "add-not-duplicates-alert-error-duplicates";
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/preferenceScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function registerPrefs() {
pluginID: config.addonID,
src: rootURI + "chrome/content/preferences.xhtml",
label: getString("prefs-title"),
image: `chrome://${config.addonRef}/content/icons/favicon.png`,
image: `chrome://${config.addonRef}/content/icons/preficon.svg`,
stylesheets:[`chrome://${config.addonRef}/content/prefs.css`],
helpURL: homepage,
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ztoolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function initZToolkit(_ztoolkit: ReturnType<typeof createZToolkit>) {
_ztoolkit.UI.basicOptions.ui.enableElementDOMLog = enableUILog;
_ztoolkit.basicOptions.debug.disableDebugBridgePassword = __env__ === "development";
_ztoolkit.basicOptions.api.pluginID = config.addonID;
_ztoolkit.ProgressWindow.setIconURI("default", `chrome://${config.addonRef}/content/icons/favicon.png`);
_ztoolkit.ProgressWindow.setIconURI("default", `chrome://${config.addonRef}/content/icons/preficon.svg`);
}

import { BasicTool, makeHelperTool, unregister } from "zotero-plugin-toolkit/dist/basic";
Expand Down
2 changes: 1 addition & 1 deletion update-beta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"[email protected]": {
"updates": [
{
"version": "2.3.0",
"version": "3.0.0",
"update_link": "https://github.com/ChenglongMa/zoplicate/releases/latest/download/zoplicate.xpi",
"applications": {
"zotero": {
Expand Down
2 changes: 1 addition & 1 deletion update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"[email protected]": {
"updates": [
{
"version": "2.3.0",
"version": "3.0.0",
"update_link": "https://github.com/ChenglongMa/zoplicate/releases/latest/download/zoplicate.xpi",
"applications": {
"zotero": {
Expand Down

0 comments on commit bd7f8a3

Please sign in to comment.