davepwsmith / zotpick-applescript

Leverage Better-BibTeX's citation picker in Scrivener
134 stars 18 forks source link

Modification of AppleScript and BBT when using Japanese ATOK Input Manager Editor #21

Open DarrenMMcDonald opened 5 years ago

DarrenMMcDonald commented 5 years ago

Using BBT and the AppleScript file enables you to create a floating citation window for Zotero in notetaking applications on the Mac.

A modification to the BBT and AppleScript files stops the Japanese Inputer Editor known as ATOK to automatically launch. Having ATOK automatically launch meant that the pasted citations used for scanning documents to create the citation and bibliography/reference style were mangled. The following changes solved this problem.

It would be a great help if a AppleScript could be made available to accommodate this.

  1. Download and Install New BBT File Install in Zotero by downloading test build 5.1.68.3801 https://github.com/retorquere/zotero-better-bibtex/releases/download/builds/zotero-better-bibtex-5.1.68.3801.xpi opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

  2. Changes to Zotpick Scannable Citations Change this line in the script: https://github.com/davepwsmith/zotpick-applescript/blob/master/zotpick-scannable-cite.applescript#L23 to: set theReference to do shell script "/usr/bin/curl 'http://127.0.0.1:23119/better-bibtex/cayw?format=scannable-cite&clipboard=true' 2>/dev/null; exit 0"

    And, change this line in the script: https://github.com/davepwsmith/zotpick-applescript/blob/master/zotpick-scannable-cite.applescript#L33 to: keystroke "v" using command down

Jmuccigr commented 5 years ago

@DarrenMMcDonald Have you tested this on non-ATOK systems? If so, and it works, could you do a PR?

DarrenMMcDonald commented 5 years ago

@Jmuccigr This workaround is not necessary on systems that use the default MacOS Japanese Input Editor. I believe this is also true for other CJK (Chinese, Japanese, Korean) default MacOS Input Editors. ATOK is developed by the Japanese software company, JustSystems https://www.justsystems.com/en/products/atok.html .