Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero 7-only plugin, submitted for review #59

Closed
wants to merge 15 commits into from

Conversation

aborel
Copy link
Collaborator

@aborel aborel commented Mar 9, 2024

This PR is in response to issue #52
Functionality is essentially the same as for the master branch, but supporting Zotero 7 instead of Zotero 6 and older.
I included a minor change that might also address #46

@aborel
Copy link
Collaborator Author

aborel commented Mar 9, 2024

My bad, the PR was a bit hasty - I have messed up something while preparing it. I'll report again when it's fixed.

@aborel
Copy link
Collaborator Author

aborel commented Mar 10, 2024

False alarm, the submitted code is actually OK (as far as I can tell). Feedback is not only welcome, but needed 😅

Copy link
Member

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to keep chrome, chrome.manifest and install.rdf (revert commit ee11b26), but move them to the src subdirectory.

In addition either src/chrome/skin/default/zoteroocr/ubmannheim*png are required or the path for the icons has to be updated to avoid the duplicate png files. By the way, why do we have images 32 x 32 and 64 x 64, not 48 x 48 and 96 x 96 as in other add-ons?

Then the new plugin should work with Zotero 6 and with Zotero 7 (and we don't have to maintain a separate branch).

Copy link
Member

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that src/updates.json should be renamed to updates.json. It replaces update.rdf and is not part of the add-on. To support both Zotero 6 and Zotero 7, it needs some lines added (see https://www.zotero.org/support/dev/zotero_7_for_developers).

@aborel
Copy link
Collaborator Author

aborel commented Mar 12, 2024

Thanks for the review! I'll take a closer look in a few days.

src/zotero-ocr.js Outdated Show resolved Hide resolved
src/manifest.json Outdated Show resolved Hide resolved
src/updates.json Outdated Show resolved Hide resolved
src/manifest.json Outdated Show resolved Hide resolved
src/prefs.xhtml Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
@mpr1255
Copy link

mpr1255 commented Mar 17, 2024

Really looking forward to giving this a spin!!

src/bootstrap.js Outdated Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
src/bootstrap.js Outdated Show resolved Hide resolved
src/style.css Outdated Show resolved Hide resolved
@stweil
Copy link
Member

stweil commented Mar 21, 2024

Can you squash the commits which remove .DS_Store files (a3ad7cb, ee11b26) with their predecessors to clean the history a bit?

@@ -1,7 +0,0 @@
content zoteroocr chrome/content/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in the issue #52 (comment) , I am not interested in supporting Zotero 6 and I prefer to submit a Z7-only version on this side branch.

@@ -1,32 +0,0 @@
<?xml version="1.0"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

@@ -1,61 +0,0 @@
<?xml version="1.0"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

@@ -1,234 +0,0 @@
// zoteroocr.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

@@ -1,2 +0,0 @@
<!ENTITY ocr.menu.label "OCR selected PDF(s)">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

@@ -1,34 +0,0 @@
<?xml version="1.0"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a plugin which supports both Zotero 6 and Zotero 7.

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this file. It is required for a smooth update from the current Zotero 6 plugin to a new one which supports both Zotero 6 and Zotero 7.

src/zotero-ocr.js Outdated Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
Copy link
Member

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log method already writes "Zotero OCR", and there is no need to write it twice.

src/bootstrap.js Outdated Show resolved Hide resolved
src/bootstrap.js Outdated Show resolved Hide resolved
src/bootstrap.js Outdated Show resolved Hide resolved
src/bootstrap.js Outdated Show resolved Hide resolved
src/zotero-ocr.js Outdated Show resolved Hide resolved
@stweil
Copy link
Member

stweil commented Mar 22, 2024

@aborel, would it be okay if I squash your commits with all suggested changes (perhaps with a subject line "Add support for Zotero 7"), add updates to support Zotero 6 and 7 simultaneously and then create a new pull request for that?

@aborel
Copy link
Collaborator Author

aborel commented Mar 25, 2024

@aborel, would it be okay if I squash your commits with all suggested changes (perhaps with a subject line "Add support for Zotero 7"), add updates to support Zotero 6 and 7 simultaneously and then create a new pull request for that?

Yes, no problem!

@stweil stweil mentioned this pull request Mar 25, 2024
@stweil
Copy link
Member

stweil commented Mar 25, 2024

@aborel, would it be okay if I squash your commits with all suggested changes (perhaps with a subject line "Add support for Zotero 7"), add updates to support Zotero 6 and 7 simultaneously and then create a new pull request for that?

Yes, no problem!

Thanks. See pull request #63 for the result.
It now also builds an xpi file which can be used for testing automatically (see actions).

@stweil
Copy link
Member

stweil commented Mar 26, 2024

Meanwhile the changes from this pull request were committed to the master branch in commit 2f8e4ca, so they are part of the new release 0.7.0 which now supports Zotero 7, too.

Thanks a lot for this great contribution!

@zuphilip
Copy link
Member

Superseded by #63

@zuphilip zuphilip closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants