This website allows a citation to be pasted and then exported as a bibtex file: https://anystyle.io/
For example, I can paste this citation and export as a bibtex file:
Merriam, C.H. 1884. Breeding of Passerculus princeps on Sable Island. Auk 1: 390-400
But wondering if I can do the parsing and export to bibtex file within Keyboard Maestro. Then I could simply copy the citation to clipboard and run a Keyboard Maestro macro to export as a bibtex file.
This code is provided by the website. Can I run this in Keyboard Maestro? If yes, how can I edit the code to always export as bibtex?
It looks to me like the website will work with the KM Button action. However I'm starting to prepare for my vacation next week so I can't really spend a lot of time on this issue with you. You can either read up on the Button action or wait for someone else to offer a solution.
Since the "Press Button" action is a KM action, I don't know what you mean by "Can it be run within Keyboard Maestro." All KM actions are run within KM.
Ohhh... I think I know what you mean now. You want KM to do all the work involved, instead of having KM send the data to the website and get the website to do all the work involved. I'm not sure what benefit that provides, but sure it should be possible.
Why don't you just rely on the website to do the work? The website lets you convert references to files for free, right? You can just use KM to send the reference to the website and get back the answer for free. If you want KM to do all the work, that's possible, but it could be a lot of work. And the website provides a choice of three formats as the output. I think you are saying you want the Bibtex format, but I know nothing about that format.
I think the code used by the website is publicly available on Github, but I'm not sure if anyone wants to port an entire project from Github to KM, especially when you already have the option of just using the website to upload and convert your data at no charge.
This is what I want to do: copy text (citation) to clipboard and hit a keyboard shortcut that saves a .bib file (containing parsed citation) to my computer.