Skip to content

Instantly share code, notes, and snippets.

@alexcu
Created August 6, 2018 05:34
Show Gist options
  • Save alexcu/33dcef202f61e0bd9865ef2974bf1e44 to your computer and use it in GitHub Desktop.
Save alexcu/33dcef202f61e0bd9865ef2974bf1e44 to your computer and use it in GitHub Desktop.
Exports Papers Library to a BibTeX file
activate application "Papers"
tell application "System Events"
tell process "Papers"
keystroke "1" using command down
set allPapers to text field 1 of row 2 of outline 1 of scroll area 1 of scroll area 1 of group 1 of group 1 of splitter group 1 of group 1 of group 1 of splitter group 1 of group 1 of group 1 of window 1
click allPapers
tell table 1 of scroll area 1 of group 1 of group 1 of splitter group 1 of group 1 of splitter group 1 of group 2 of splitter group 1 of group 1 of group 1 of window 1
keystroke "a" using command down
keystroke "c" using {command down, control down}
end tell
end tell
end tell
delay 0.5
do shell script ("pbpaste > ~/iCloud/PhD/Thesis/papers.bib")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment