arXiv → BibDesk Script Icon

from the preprint arXiv to your BibDesk database in a single step

Download the AppleScript.

written by: Christoph Wockel and Sven-S. Porst.

Feedback: Send an e-mail.

Setup

Download the script and put it in a location where you can easily run it.

Read recommended setup guide »

Before running the script the first time, you need to make macOS trust it. Do that by opening it using the contextual menu’s “Open“ command and then running the script with an arXiv paper page opened in Safari. macOS will then ask you whether you want to trust the script which is required to make it work.

We recommend setting the script up in the following way:

  1. Activate the Script Menu: In Mac OS X.6 and above this is done in the General pane of the Preferences in the ‘AppleScript Editor’ application.

  2. Place the downloaded script in the subfolder ‘Safari’ of the folder ‘Applications’ of the folder ‘Scripts’ of the folder ‘Library’ inside your home folder.

    path to the script in /Users/ssp/Library/Scripts/Applications/Safari/

    You may need to create some of these folders yourself. Starting with Mac OS X.7, the ‘Library’ folder is hidden by default; You can get into it anyway by using the ‘Go To Folder…’ command (⌘⇧G) in the Finder and typing in the name.

  3. Create a ‘BibDesk’ folder next to the ‘Safari’ folder you placed the script in and put an alias to the script in there. [You can create an alias by dragging the file while holding the ⌘ and ⌥ keys].

    Complete setup of the script for use in Safari and BibDesk

  4. That’s it. The system’s script menu should be visible at the right hand side of the menu bar now and it should offer the ‘arXiv → BibDesk’ command in both Safari and BibDesk:

    Script Menu containing the script

Alternatively you can place the downloaded script in the subfolder ‘Scripts’ of the folder ‘BibDesk’ of the folder ‘Application Support’ of the folder ‘Library’ of your home folder. It will then become available in BibDesk’s own script menu only.

Instructions

  1. Make sure you have a bibliography file open in BibDesk and your papers folder is set in BibDesk’s Auto File preferences.
  2. Navigate to a preprint’s abstract page on the arXiv in Safari’s frontmost tab and window.
  3. Run the script by selecting it in the script menu.

If everything goes well you will end up with:

Using Goole Chrome?

Currently the script contains commands which should work with Google Chrome as well. To use them, you will need to open the script in AppleScript Editor, comment out the block relating to Safari at the beginning and uncomment the lines relating to Google Chrome. You will probably want to adapt the setup instructions to be more Chrome-centric in that case as well.

Thanks

go to both the preprint arXiv and the BibDesk team for their great service and software respectively. Additional credit goes to Christiaan Hofman who wrote the download function the script uses. In case this script improves your life significantly, please consider donating to either of those projects.

Version History

Current: v15 (2022-10-24)
Switch internal script to Python3. Requires macOS version with python3 in the path.

See changes since v10 at github. More information about older versions »

v14 (2016-10-07)
Use https to download PDFs from the arXiv. This avoids the failing to handle the 301 redirect given for non-encrypted connections.
v13 (2012-10-01)
Load data from arXiv API instead of using regular expressions on the web page. Remove dependency on UnicodeChecker.
v12 (2012-05-01)
Remove dependency on ‘URL Access Scripting’ (which Apple removed in X.7) and use ‘curl’ instead.
v11 (2009-08-24)
Attempt to remove affiliation from author names.
v10 (2009-08-12)
Stop setting the publication’s »BibTeX string« property and use the »import« command instead to work in BibDesk 1.3.22.
v9 (2009-03-17)
Handle quotation marks in abstracts more gracefully (to avoid BibTeX warnings for the resulting entry).
v8 (2009-03-10)
Handle old article IDs with a colon (e.g. arXiv:q-alg) properly.
v7 (2008-10-22)
Delete temporary files (rather than moving them to the Trash which irritatingly gives the Finder’s »trashed« sound).
v6 (2008)
Stopped failing on old maths papers without a . in their ID.
v5 (2008)
Saves HTML to disk before passing it to the perl script to avoid escaping problems.
v4 (2008)
Runs shell script with proper escapes, asks before overwriting files.
v3 (2008)
Adds Christoph’s perl script to parse arXiv page into a BibTeX entry.
v2 (2008)
Updated for new style arXiv IDs using citebase and the linked file/URL fields.
v1 (2004)
Initial version ca 2004 using the UC Davis arXiv front.

Sven-S. Porst