chrisgrieser / alfred-bibtex-citation-picker

Citation picker & lightweight reference manager for BibTeX files, via Alfred.
MIT License
137 stars 8 forks source link

[Bug]: Cannot find pandoc installed from homebrew with a prefix #42

Closed noirchen closed 7 months ago

noirchen commented 7 months ago

Bug Description

I installed pandoc using homebrew (which is at /Applications/homebrew), and the location of pandoc is in /Applications/homebrew/bin/pandoc. When I try to paste a single bibliography I got You need to install pandoc for this feature. For now I can manually modify paste-full-bibliography.sh to point the pandoc to the correct path, but it would be great if the pandoc path can be configured in the environment variables.

Relevant Screenshot

No response

To Reproduce

No response

Debugging Log

[12:20:09.074] Supercharged Citation Picker[Hotkey] Processing complete
[12:20:09.080] Supercharged Citation Picker[Hotkey] Passing output '' to Script Filter
[12:20:09.183] Supercharged Citation Picker[Script Filter] Queuing argument '(null)'
[12:20:09.265] Supercharged Citation Picker[Script Filter] Script with argv '(null)' finished
[12:20:09.268] Supercharged Citation Picker[Script Filter] {"items":[{"title":"Diffusion-Limited Phase Transformations: A Comparison and Cr…","autocomplete":"Aaron","subtitle":"Aaron et al. 1970    In: J. Appl. Phys. 41   🌐 📕","match":"@aaron1970diffusion @aaron1970diffusion Diffusion Limited Phase Transformations: A Comparison and Critical Evaluation of the Mathematical Approximations Diffusion-Limited Phase Transformations: A Comparison and Critical Evaluation of the Mathematical Approximations Aaron Aaron Fainstein Fainstein Kotler Kotler 1970 1970   J. Appl. Phys. J. Appl. Phys. pdf pdf","arg":"aaron1970diffusion","icon":{"path":"icons/article.png"},"uid":"aaron1970diffusion","text":{"copy":"https://doi.org/10.1063/1.1658474","largetype":"Diffusion-Limited Phase Transformations: A Comparison and Critical Evaluation of the Mathematical Approximations \n(citekey: aaron1970diffusion)"},"quicklookurl":"","mods":{"ctrl":{"valid":true,"arg":"https://doi.org/10.1063/1.1658474","subtitle":"⌃: Open URL – https://doi.org/10.1063/1.1658474"},"shift":{"valid":true,"subtitle":"⇧: Open in default app for .bib files"},"fn+cmd":{"valid":true,"subtitle":"⌘+fn: Delete entry from BibTeX file. (⚠️ Experimental & irreversible)"}}}]}
[12:20:15.880] Supercharged Citation Picker[Script Filter] Processing complete
[12:20:15.882] Supercharged Citation Picker[Script Filter] Passing output 'aaron1970diffusion' to Run Script
[12:20:16.010] Supercharged Citation Picker[Run Script] Processing complete
[12:20:16.015] Supercharged Citation Picker[Run Script] Passing output 'You need to install pandoc for this feature.' to Copy to Clipboard

Sample BibTeX Entries

@article{aaron1970diffusion,
  author       = {Aaron, Howard B. and Fainstein, Dora and Kotler, Gerald R.},
  journal      = {J. Appl. Phys.},
  title        = {Diffusion-Limited Phase Transformations: A Comparison and Critical Evaluation of the Mathematical Approximations},
  year         = {1970},
  month        = oct,
  number       = {11},
  pages        = {4404--4410},
  volume       = {41},
  creationdate = {2022-07-25T17:16:26},
  doi          = {10.1063/1.1658474},
  file         = {:aaron1970diffusion.pdf:PDF},
  groups       = {physics},
  owner        = {noir},
  publisher    = {AIP Publishing}
}

Buffer Files

buffer.json last_version.txt

Workflow Configuration

Screenshot 2023-12-18 at 12 27 20

Checklist

chrisgrieser commented 7 months ago

Hmm, I see the problem, but somewhat hesitate to overload the workflow with settings for niche cases.

Wouldn't symlinking pandoc to a location like /usr/local/bin/pandoc solve this?

noirchen commented 7 months ago

Well that is ok. Another question, if I want to paste the bibliography using some other csl instead of the default apa-7th csl, what should I do? Do I just hard code the desired csl as $CSL in paste-full-bibliography.sh, or is there a way to configure it?

chrisgrieser commented 7 months ago

yeah, that one is hardcoded. The bibliography pasting feature really was only intended as an auxiliary feature for the occasional sharing of a reference via mail, so that's why it's pretty barebones with little customization 😅

Could you open a new feature request for that, since it's a different issue from this one?

chrisgrieser commented 7 months ago

Nevermind, I added an option to customize the csl in the latest release. https://github.com/chrisgrieser/alfred-bibtex-citation-picker/releases/download/11.11.0/alfred-bibtex-citation-picker.alfredworkflow