chrisgrieser / alfred-bibtex-citation-picker

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

Entries from shared libraries #20

Closed tim-hilde closed 1 year ago

tim-hilde commented 1 year ago

Bug Description

Is it on purpose that entries from shared libraries in Zotero are shown in the picker? This leads to the issue that entries that are both in my and in the shared library are opened (with open in Zotero command) in the shared library.

Relevant Screenshot

No response

To Reproduce

No response

Debugging Log

added the logs in buffer files area as one cannot upload files here

Sample BibTeX Entries

@article{aagaardIntroducingPostphenomenologicalResearch2017,
  title = {Introducing Postphenomenological Research: A Brief and Selective Sketch of Phenomenological Research Methods},
  shorttitle = {Introducing Postphenomenological Research},
  author = {Aagaard, Jesper},
  year = {2017},
  month = jul,
  journal = {International Journal of Qualitative Studies in Education},
  volume = {30},
  number = {6},
  pages = {519--533},
  issn = {0951-8398, 1366-5898},
  doi = {10.1080/09518398.2016.1263884},
  abstract = {In time, phenomenology has become a viable approach to conducting qualitative studies in education. Popular and well-established methods include descriptive and hermeneutic phenomenology. Based on critiques of the essentialism and receptivity of these two methods, however, this article offers a third variation of empirical phenomenology: Postphenomenology. The article introduces postphenomenology, a philosophy of technology that highlights the importance of technological mediation of experience: Technologies transform our perceptions (amplify/reduce) and translate our actions (invite/inhibit). Based on this framework, two approaches to empirical fieldwork are suggested: In-depth exploration of the typical use of a given technology and critical comparison of multiple versions of a technology. It is argued that using postphenomenology as a research method helps researchers explore technological mediation, a vital and oftneglected aspect of educational practice, but the method simultaneously entails epistemological commitments such as multistability, reflexivity, and posthumanism. The article concludes by discussing future challenges for the postphenomenological method.},
  langid = {english},
  keywords = {Postphänomenologie,Technikphilosophie},
  annotation = {37 citations (Semantic Scholar/DOI) [2022-08-18] 23 citations (Crossref) [2022-08-18]},
  file = {/Users/tim/Documents/Wissensmanagement/Zotero Library/aagaardIntroducingPostphenomenologicalResearch2017.pdf}
}

@incollection{abneyRoboticsEthicalTheory2012,
  title = {Robotics, {{Ethical Theory}}, and {{Metaethics}}: {{A Guide}} for the {{Perplexed}}},
  booktitle = {Robot Ethics the Ethical and Social Implications of Robotics},
  author = {Abney, Keith},
  editor = {Lin, Patrick and Abney, Keith and Bekey, George A.},
  year = {2012},
  pages = {18},
  publisher = {{MIT Press}},
  address = {{Cambridge, Mass.}},
  langid = {english},
  keywords = {Ethik,Metaethik,Robotik,Technikethik,Technikphilosophie}
}

@book{ach.etalGrundkursEthikBand2016,
  title = {{Grundkurs Ethik. Band 1: Grundlagen}},
  shorttitle = {{Grundkurs Ethik. Band 1}},
  editor = {Ach, Johann S. and Bayertz, Kurt and Quante, Michael and Siep, Ludwig},
  year = {2016},
  series = {{Grundkurs Ethik}},
  edition = {4., vollst\"andig \"uberarbeitete und erweiterte Auflage},
  volume = {Band 1: Grundlagen},
  publisher = {{mentis Verlag}},
  address = {{M\"unster}},
  isbn = {978-3-95743-068-7},
  langid = {german},
  keywords = {Ethik,Moral}
}

@incollection{ach.pollmannMoralischProblematischWas2017,
  title = {Moralisch Problematisch \textendash{} {{Was}} Aus Einem {{Problem}} Ein Moralisches {{Problem}} Macht},
  booktitle = {Natur Und {{Erfahrung}}},
  author = {Ach, Johann S. and Pollmann, Arnd},
  editor = {Lauk{\"o}tter, Sebastian and Hoesch, Matthias},
  year = {2017},
  month = jan,
  pages = {39--60},
  publisher = {{mentis Verlag}},
  address = {{M\"unster}},
  isbn = {978-3-95743-817-1 978-3-95743-085-4},
  keywords = {Ethik,Moral,Moralische Probleme,Philosophie},
  file = {/Users/tim/Documents/Wissensmanagement/Zotero Library/ach.pollmannMoralischProblematischWas2017.pdf}
}

Buffer Files

buffer.txt log.txt

Workflow Configuration

image

Checklist

chrisgrieser commented 1 year ago

Is it on purpose that entries from shared libraries in Zotero are shown in the picker?

Well, which entries are displayed depends on which entries have been added to the bibtex library. And that is not governed by this workflow, but by the tool you use to export from zotero to bibtex, probably betterbibtex. You should take a look at its settings?

tim-hilde commented 1 year ago

Well, then I have to correct my earlier report: entries from shared libraries are not displayed but still opened. I just exported the library again, reloaded the buffer and the entry which is present in my local library is opened inside the shared one.

chrisgrieser commented 1 year ago

Ah, so it's an issue with the function that opens entry in zotero, and not the display of entries?

tim-hilde commented 1 year ago

Yes

tim-hilde commented 1 year ago

Found the issue: You can keep citekeys unique within a library or overall. I had them unique within the library so thats why the incorrect entry was opened

chrisgrieser commented 1 year ago

yes, I was gonna say that, if it opens the wrong entry, one reason could be that the citekey is used once in your personal library, and once in the shared one. That's somewhat annoying, but also not really avoidable, at least on my end, sorry. 🙁

Best workaround I can think of is to use different citekeys in the library, e.g., add "sl" to the citekeys there.

tim-hilde commented 1 year ago

As I just had the same issue again, I found a solution that doesnt rely on having an explicit cite key for one's own library:

In scripts/open-entry.sh in link 19 change open "zotero://select/items/@$CITEKEY" to open "zotero://select/items/bbt:CITEKEY". This will always open the local library entry

chrisgrieser commented 1 year ago

is there some documentation for this behavior by BBT?

tim-hilde commented 1 year ago

See https://github.com/retorquere/zotero-better-bibtex/issues/769#issuecomment-343849406 and https://github.com/retorquere/zotero-better-bibtex/issues/1727#issuecomment-762334988

chrisgrieser commented 1 year ago

got it, I added :bbt to ensure the entires are always opened in the personal library

chrisgrieser commented 1 year ago

(you might have to update to the latest release via github, since I removed the auto-update mechanism for the upcoming Alfred Gallery. Auto-updating will be available again in 1-2 days when the workflow is published there)

(also, next time, feel free to open a PR if you have a straightforward fix like adding :bbt 🙂 )