Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified script #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tillgrallert
Copy link

I wrote a new applescript (zotpick.scpt) to remove the necessity for multiple scripts for output formats and triggering text editor. It is based on the scripts available in this repository and my own work on the now discontinued reference manager Sente (which you can find here). The new script does the following:

  1. Sets an ordered list of text editors (can be customised by the user)
  2. Checks if the frontmost app is listed in the above list
  3. Checks if Zotero is running and if Better BibTeX is installed
  4. If the frontmost app is among the list of text editors the script proceeds, otherwise it will prompt the user to select a running text editor from the list above as target
  5. Prompts the user to select an output format from Pandoc, MMD and Scannable cite
  6. Calls up the Zotero search box
  7. Copies the selected references in the selected format to the clipboard
  8. Inserts the formatted reference into the selected text editor.

I have tested the script with Scrivener, TextEdit, Sublime Text, and NVAlt and it works flawlessly.

I have also added a service that utilises this script, which one can then call from within any application and assign a shortcut to through System Preferences.

…r choice and to select the output format from within the script
…list of text editors, the script will not ask which text editor to send the reference to
@Jmuccigr
Copy link
Collaborator

This is interesting. It's not something I would use, but I can see it being useful.

A question: What's the use-case?

For the other apps you're editing a doc and want to insert a citation. This app in contrast seems to assume the user is not in the WP app, so what are they doing? And what if the desired WP app isn't even running, since they're not actively using it?

I also suspect that most people use one of the formats exclusively, or nearly so, so that having to select the format every time is a pain. That's why the different formats are separated out in the other apps. In other words, while there are multiple apps, it's expected that a typical user is calling just one of them.

@tillgrallert
Copy link
Author

tillgrallert commented Mar 29, 2021

Hi,
Thanks for asking and sharing your reservations. I see that my preferences might be a bit quirky and rooted in historical practice. I am used to start referencing from within the reference manager and not the text editor/word processor. The script reflects this preference. But it does so without limiting the user to this approach. If you are calling the script with a word processor as the currently active app, it will not ask for a target.

On a more principle level, I am and aim at being agnostic to any one writing programme. I prefer basic markdown for my own writing but use multiple apps for doing so. Yet, whenever I write collaboratively, I will have to use various non-mmd based workflows (be it Microsoft Word, Google docs, Overleaf etc.). The rational behind choosing the target app in the script is twofold: a) As writing apps change, I prefer not to change the referencing workflow and install a new script for every app, for which I would also need to assign a new hotkey. With a universal script, I can call it up from wherever I am. b) I usually want to reference stuff while reading / annotating a PDF. Hence, I can call up this script with the PDF reader in the foreground and then send the citation to a note-taking app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants