Jump to content

Supercharged Citation Picker


Recommended Posts

Update (2022-09-13): Alfred 5 Workflow configuration is now supported. So is eta-template as citation syntax.

Update (2022-05-20): Now also works with Multi-Markdown, and Latex citation syntax. Wikilinks and tags are supported as well.

 

 

---

 

This is a citation picker for academics that write in markdown. I am proud to say that this is the most performant and most feature-rich citation picker that I know of! 💪

 

  • Inserts Pandoc Citation Syntax ("[@citekey]") by default (Can be be changed to LaTeX, MMD, Wikilinks, tags, or eta templates).
  • Works with page numbers & multiple citations.
  • works systemwide, in case you also work in another Markdown app.
  • smart search: search for citekeys, authors, title, publication, keywords (tags), include/exclude authors in et al, tab-completion, ...
  • feature-rich: paste single-entry bibliographies, remove entries from your library without opening a reference management app, open URLs, open or create literature notes, search for .csl files online...
  • Obsidian integration: When located in an Obsidian vault, literature notes will automatically be opened/created in Obsidian. (Otherwise, they will be opened in the default app for markdown files.)
  • blazingly fast: considerably quicker than other citation pickers (~200ms to fully reload a library with ~4000 entries on my machine) 
  • easy setup: no dependencies, no required plugins, no complicated setup. Just enter the path to your .bib file and you are good to go.

 

➡️ https://github.com/chrisgrieser/alfred-bibtex-citation-picker

 

 

promo.png

Edited by pseudometa
update
Link to comment
  • 2 weeks later...

Hi, first thanks for taking the time to do this and helping the academic community enjoy an effortless way of writing. I wanted to say that the workflow is not working as expected, I have linked my .bib file and also added a Hotkey to display the citation picker; however, it never finds my citations. 

 

This is what I see in the console:

 

[17:46:11.062] Logging Started...

[17:46:26.202] Supercharged Citation Picker[Script Filter] Queuing argument '(null)'

[17:46:26.214] Supercharged Citation Picker[Script Filter] Script with argv '(null)' finished

[17:46:42.211] Supercharged Citation Picker[Hotkey] Processing complete

[17:46:42.216] Supercharged Citation Picker[Hotkey] Passing output '' to Script Filter

[17:46:42.236] Supercharged Citation Picker[Script Filter] Queuing argument '(null)'

[17:46:42.263] Supercharged Citation Picker[Script Filter] Script with argv '(null)' finished

Link to comment

Wow, i only just noticed this. I use Bookends which now auto-syncs to a bib file. My database is ~8000 items. This workflow is super-quick!!! I assumed it was using some sort of native code voodoo, but no, this is made from well-made shell scripts and JXA javascript. Really nice feature set, and includes cheatsheets and other things like a CSL downloader. I would heartily concur this is the most elegant citation picker yet created!

 

Chris, what happens when the bib file is edited externally, does this workflow cache the contents or will it pick up new references when they are added?

 

Beautiful workflow, congratulations Chris!!! 

Link to comment

@iandolThank you! 😊

 

Quote

Chris, what happens when the bib file is edited externally, does this workflow cache the contents or will it pick up new references when they are added?

The workflow basically parses the .bib file and caches that, yes. on every run, the shell script checks whether whether the bib file has more recently been modified when the cache file, and if so, re-creates a new cache. So it will pick up new references as soon as they are added to the bib file, yes.

Link to comment
  • 1 month later...

Hi Chris,
thank you for the great workflow, it’s quite useful for fellow academics (or anybody else who has to cite frequently).
I encountered a few problems that probably have to do with the person sitting in front of the screen than with the workflow:


1. I was unable to run the SCP / Search & Download Citation Styles menu. For some reason, nothing appears there (in contrast to the former pandoc suite). I therefore opened the workflow directory and pasted a CSL citation style I use there. I had set up the .pandoc/CSL folder before and pointed the workflow to that directory in settings (it didn’t exist so I had to create it) but it still seems I need to add citation styles manually and then point scripts/generate_temporary_bib.sh to the file path of the new csl.
2. I frequently need to paste bibliographical entries including italics (e.g., monographs, journal names). Currently, italics are not pasted --- probably because this workflow is used in markdown editors (I’m also using it in Obsidian). Still, would it be possible to change that somewhere only for the bibliography export? I tried changing --write=plain in scripts/generate_temporary_bib.sh to --write=rtf but that doesn’t seem to work.

Any help is appreciated!☺️

Link to comment
4 hours ago, justice said:

Hi Chris,
thank you for the great workflow, it’s quite useful for fellow academics (or anybody else who has to cite frequently).
I encountered a few problems that probably have to do with the person sitting in front of the screen than with the workflow:


1. I was unable to run the SCP / Search & Download Citation Styles menu. For some reason, nothing appears there (in contrast to the former pandoc suite). I therefore opened the workflow directory and pasted a CSL citation style I use there. I had set up the .pandoc/CSL folder before and pointed the workflow to that directory in settings (it didn’t exist so I had to create it) but it still seems I need to add citation styles manually and then point scripts/generate_temporary_bib.sh to the file path of the new csl.
2. I frequently need to paste bibliographical entries including italics (e.g., monographs, journal names). Currently, italics are not pasted --- probably because this workflow is used in markdown editors (I’m also using it in Obsidian). Still, would it be possible to change that somewhere only for the bibliography export? I tried changing --write=plain in scripts/generate_temporary_bib.sh to --write=rtf but that doesn’t seem to work.

Any help is appreciated!☺️

 

Thanks! 😊

 

So 1) was a minor bug (I rarely download csl files anymore, since I simply downloaded the five I'll ever need :P ). It's fixed with the latest release.

 

2) hmm, I have little experience with working with rich text files, since I work solely withe markdown for a while now... I'd have to look into it once I find the time. You might wanna try '--write=md' or 'write=html', which could work with apps. 🤔

Link to comment
16 hours ago, pseudometa said:

 

Thanks! 😊

 

So 1) was a minor bug (I rarely download csl files anymore, since I simply downloaded the five I'll ever need :P ). It's fixed with the latest release.

 

2) hmm, I have little experience with working with rich text files, since I work solely withe markdown for a while now... I'd have to look into it once I find the time. You might wanna try '--write=md' or 'write=html', which could work with apps. 🤔

 

Thank you for the fix! It's now possible to download the CSL styles. What I don't understand is why they're dropped in the .pandoc/CSL folder although the default (APA CSL) citation style is located in the workflow directory. Maybe it's intended that way and you're supposed to manually copy them and then adjust scripts/generate_temporary_bib.sh? Is there a way to quickly switch between styles with this workflow (I found no ‘set citation style’ menu like in the former pconf ‘search and set citation style’)?

 

Unfortunately, neither write=md nor write=html work so I’ll stick with write=plain. It’s not a big deal manually italicising the necessary parts of an entry. But out of curiosity and since APA also requires italics, I suppose you’re also manually italicising the necessary parts instead of drag/dropping an entry from Zotero? 

Link to comment
4 hours ago, justice said:

 

Thank you for the fix! It's now possible to download the CSL styles. What I don't understand is why they're dropped in the .pandoc/CSL folder although the default (APA CSL) citation style is located in the workflow directory. Maybe it's intended that way and you're supposed to manually copy them and then adjust scripts/generate_temporary_bib.sh? Is there a way to quickly switch between styles with this workflow (I found no ‘set citation style’ menu like in the former pconf ‘search and set citation style’)?

 

well thing is, I simply use both commands separately – the single-item bibliography is only for quickly sharing an item per email, where the citation style doesn't really matter for me.

 

The csl download is for getting the proper csl you want to use with Pandoc, therefore downloaded to a different location.

 

I suppose I can properly make both features work together when I work on the citation picker again – could you open a Feature Request on GitHub so I'll keep track?

 

4 hours ago, justice said:

 

Unfortunately, neither write=md nor write=html work so I’ll stick with write=plain. It’s not a big deal manually italicising the necessary parts of an entry. But out of curiosity and since APA also requires italics, I suppose you’re also manually italicising the necessary parts instead of drag/dropping an entry from Zotero? 

 

Well, the single-item-bibliography is mostly used by me to send stuf fin chat or email, where italics don't really matter for me. For creating a proper bibliography I simply use pandoc.

Link to comment
1 hour ago, Dellu said:

This is not working for me. It is not showing my citations. 

Please open a Bug report at GitHub – reason being that the bug report formular asks for various kinds of information I'd need for debugging. "This is not working" is unfortunately not enough information to help.

Link to comment
  • 2 weeks later...
  • 2 months later...

Could you please explain (or point me to documentation on) how to open a reference in BibDesk using this workflow? I tried setting the `open_entries_in` environment variable to `/Applications/BibDesk.app` (the path to BibDesk), but no luck. 

 

Forgive me if this should be obvious. I bought the power-pack just for citations and this is the first workflow I've installed. Going to try ZotHero next.

 

EDIT: not sure what changed, but it's working now!

Edited by aaa
issue resolved
Link to comment
2 hours ago, aaa said:

Could you please explain (or point me to documentation on) how to open a reference in BibDesk using this workflow? I tried setting the `open_entries_in` environment variable to `/Applications/BibDesk.app` (the path to BibDesk), but no luck. 

 

Forgive me if this should be obvious. I bought the power-pack just for citations and this is the first workflow I've installed. Going to try ZotHero next.

 

EDIT: not sure what changed, but it's working now!

Weird. Let me know when it stops working again!

Link to comment
  • 2 weeks later...

Not sure what changed, but this isn't working for me anymore. It's like scp doesn't "see" my .bib file. I wonder if its related to the recent pandoc update? I noticed the variable csl_folder was set to ~/.pandoc/csl, which no longer exists on my machine after updating.

 

I've tried setting the bibtex_library_path environmental variable to use different bib files but none of then work.

 

 

Link to comment
  • 2 weeks later...

@pseudometa That configuration is looking nice! So comprehensive! Tip: you don’t need to specify “optional” and “required” in the description text, all those fields have a “Validation” checkbox to mark them as required. Those fields will be orange and the Workflow will let users know when they aren’t filled.

 

Also, there’s a small typo in the Match Behaviour text. It ways “Whther”.

Link to comment
  • 3 weeks later...

Thanks @pseudometa!
I'm having trouble opening the citations' PDFs-it shows the pdf in Finder but doesn't open it. Am I missing something in the environment variables maybe?
image.png.4875e6165412b7d240f9f2b28944ba75.png

 

On 9/19/2022 at 10:43 PM, pseudometa said:

⚠️ Hotfix: Version 10.0.12 fixes a bug which prevented auto-updating 🙈 

 

So you have to manually download the latest release once, or you miss out on future updates. Sorry!

 

 

Link to comment

@kenanmike Could you open a bug report at the GitHub repo? Reason being that the bug report forms asks for various information I need to investigate the issue. (also, I don't have the time to look into it right now, so an issue will make sure that I can keep track of it.)

 

Also, add a few examples of how your PDFs are named, in case it's an issue with the PDF naming.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...