-
Notifications
You must be signed in to change notification settings - Fork 43
Fix finding pdftoppm #95
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
Fix finding pdftoppm #95
Conversation
Thanks. Ideally these two unrelated changes should use two separate pull requests (maybe first the fix, and as soon as it was merged the change for NixOS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes a typo in the executable name for pdftoppm and expands the search paths to include NixOS's default system executable directory.
- Corrects the parameter from "pdtfoppm" to "pdftoppm" when invoking the check for the executable.
- Adds "/run/current-system/sw/bin/" to both pdftoppm and tesseract search paths to improve compatibility on NixOS.
Comments suppressed due to low confidence (3)
src/zotero-ocr.js:120
- The command name has been corrected from "pdtfoppm" to "pdftoppm". Please verify that this update aligns with the expected executable name in your environment.
let pdftoppm = await checkExternalCmd("pdftoppm", "zoteroocr.pdftoppmPath", pdftoppmPaths);
src/zotero-ocr.js:119
- The addition of "/run/current-system/sw/bin/" to the pdftoppm search paths improves NixOS compatibility. Verify that its ordering relative to other paths meets your requirements.
let pdftoppmPaths = ["", "/usr/local/bin/", "/usr/bin/", "/opt/homebrew/bin/", "/usr/local/homebrew/bin/", "/run/current-system/sw/bin/"];
src/zotero-ocr.js:126
- Including "/run/current-system/sw/bin/" in the tesseract search paths enhances the module's support for NixOS. Consider reviewing if the array ordering ensures the correct preference for executable resolution.
let ocrEnginePaths = ["", "/usr/local/bin/", "/usr/bin/", "C:\\Program Files\\Tesseract-OCR\\", "/opt/homebrew/bin/", "/usr/local/homebrew/bin/", "/run/current-system/sw/bin/"];
Alright. |
Wow now you DID merge it. Okay I'll stop separating it and delete the other stuff... |
Once again sorry for the confusion. My comment was meant for future contributions. You already had two separate commits which is fine. I only had to fix the changelog for the new release 0.9.2 manually because it did not contain your 2nd change. With separate pull requests it would have been correct automatically. |
Side note: Microsoft changed the download policy for "bots" on GitHub. While this might be a good idea to stop excessive AI crawlers, it seems to affect the local Zotero updates, too. I'm afraid that my local Zotero is now banned like a bad bot, so it no longer sees updates on GitHub (like for our plugin). I'll have to check again tomorrow or wait for other reports. :-( |
Thanks to both of you! |
This PR fixes a typo when looking for
pdftoppm
(it looked forpdtfoppm
) and adds NixOS's default system executable path (/run/current-system/sw/bin
) to the list of search paths for bothpdftoppm
andtesseract
.Tested with
./build.sh myver
, then installed in Zotero, it works for me on NixOS.