mgmeyers / obsidian-zotero-integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero into Obsidian.
GNU General Public License v3.0
1.06k stars 55 forks source link

[FR] PDF Utility with different name depend on local device. #166

Open Yaozhuwa opened 1 year ago

Yaozhuwa commented 1 year ago

Thank you for your awesome plugin! It help me a lot!

When I use obsidian on multiple devices, I run into a problem. My Sync software syncs the configuration of the plug-in, and PDF Utility for different devices (Linux, Mac, Windows) all have the same name, which leads to file overwrites. This way this plugin can not work fine with different device!

Yaozhuwa commented 1 year ago

This problem is caused by the fact that The PDF Utility of Linux and mac share the name of "pdfannots2json".

To solve this problem, you could rename the The PDF Utility name of Linux as "pdfannots2json-linux". And https://github.com/mgmeyers/obsidian-zotero-integration/blob/612a7c3bdd7afbcfc8bbd70fd2d3588bc1cb9c15/src/helpers.ts#L29 be modified to

return os.platform()==="win32"?"pdfannots2json.exe":os.platform()==="linux"?"pdfannots2json-linux":"pdfannots2json"
mgmeyers commented 1 year ago

@Yaozhuwa I've added the ability to override the path to pdfannots2json. Does this solve the problem for you? It might not if your plugin settings are also synced across devices, but I wanted to check with you.

Screenshot 2023-03-03 at 11 55 47 AM
Yaozhuwa commented 1 year ago

@Yaozhuwa I've added the ability to override the path to pdfannots2json. Does this solve the problem for you? It might not if your plugin settings are also synced across devices, but I wanted to check with you.

Screenshot 2023-03-03 at 11 55 47 AM

@mgmeyers I've try the PDF Utility Path Override. My sync tool sync the plugin's settings as well, so it could not solve my problem.