├── pdfmeat.py.scpt
├── bibfetch.pl.scpt
├── LICENSE
└── README.org
/pdfmeat.py.scpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mankoff/BibDeskAppleScripts/HEAD/pdfmeat.py.scpt
--------------------------------------------------------------------------------
/bibfetch.pl.scpt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mankoff/BibDeskAppleScripts/HEAD/bibfetch.pl.scpt
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Ken Mankoff
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/README.org:
--------------------------------------------------------------------------------
1 | #+OPTIONS: toc:3
2 |
3 | * DEPRECATED
4 |
5 | This project should be considered deprecated.
6 |
7 | As of BibDesk v.1.6.7, BibDesk has native support for importing via DOI.
8 |
9 | #+BEGIN_html
10 |
11 | #+END_html
12 |
13 | * Some BibDesk Apple Scripts
14 |
15 | ** bibfetch.pl.scpt
16 |
17 | This script does the following:
18 | 1) For each selected BibDesk publication
19 | 2) Passes the DOI if available or the quoted Title if no DOI to bibfetch.pl
20 | 3) Parses the results of bibfetch.pl for the URL of the PDF
21 | 4) Uses curl to download the PDF
22 | 5) Attaches the PDF to the publication
23 | 6) Auto-files the PDF
24 |
25 | ** pdfmeat.py.scpt
26 |
27 | This version takes one or more selected BibDesk records and fills in
28 | missing information using Google Scholar search. If a DOI or title
29 | exists in the record, it searches Google Scholar with pdfmeat.py. If a
30 | PDF exists and no title, it uses pdfmeat to parse the PDF and then
31 | searches Google Scholar.
32 |
33 | Various fields returned by the search are filled in to each existing
34 | record. Nothing is overwritten.
35 |
36 |
37 | ** Installation
38 |
39 | *** BibFetch
40 |
41 | 1. Install [[https://github.com/mankoff/bibfetch][bibfetch.pl]] (my version) by downloading and putting
42 | somewhere, for example =~/bin= or =~/local/bibfetch/=
43 | 2. Run it with =/path/to/bibfetch.pl --pdf --doi DOI= or
44 | =/path/to/bibfetch.pl --pdf "Title of Paper"=. It will probably
45 | crash, with an error message, at the top mentioning missing
46 | packages.
47 | 3. Install all of the dependencies it needs by typing something
48 | similar to the following at the shell prompt:
49 | #+BEGIN_SRC perl
50 | cpan install App::cpanminus
51 | # and then
52 | cpanm Foo::Bar
53 | #+END_SRC
54 | You might need to use "sudo" before cpan and cpanm
55 |
56 | 4. When step (2) above works (a BibTeX record and link to PDF file
57 | is returned), you know bibfetch.pl is working
58 |
59 | 5. Put the =Bibfetch.pl.scp= in =~/Library/Application
60 | Support/BibDesk/Scripts=
61 |
62 | 6. Edit it, customizing the path at the top to where your
63 | =bibfetch.pl= script is located.
64 |
65 | 7. Test it from within BibDesk.
66 |
67 | 8. Assign a shortcut key to run it easily from the keyboard.
68 |
69 | *** pdfmeat
70 |
71 | 1. Install [[https://github.com/mankoff/pdfmeat][pdfmeat]] (my version) by downloading and putting
72 | somewhere, for example =~/bin= or =~/local/pdfmeat/=
73 | 2. Run it with =/path/to/pdfmeat.py --PDF /path/to/PDF=. It will
74 | probably crash, with an error message, at the top mentioning
75 | failed import statement
76 | 3. Install all of the dependencies it needs by typing something
77 | similar to the following at the shell prompt:
78 | #+BEGIN_SRC python
79 | pip install foo
80 | # or
81 | easy_install foo
82 | #+END_SRC
83 | You might need to use "sudo" before =pip= or =easy_install=
84 | 4. pdfmeat makes use of cookies to access Google Scholar, so you
85 | need to launch FireFox once, go to Google Scholar, and set
86 | preferences so that BibTeX records are returned when you search
87 | on Google Scholar.
88 | 5. When step (2) above works (a BibTeX record is returned),
89 | you know pdfmeat.py is working
90 |
91 | 6. Put the =pdfmeat.py.scp= in =~/Library/Application
92 | Support/BibDesk/Scripts=
93 |
94 | 7. Edit it, customizing the path at the top to where your
95 | =pdfmeat.py= script is located.
96 |
97 | 8. Test it from within BibDesk.
98 |
99 | 9. Assign a shortcut key to run it easily from the keyboard.
100 |
101 | **** Troubleshooting
102 |
103 | If you search too often, Google Scholar will think you are a robot. In
104 | this case pdfmeat will return strange errors. Log in with FireFox and
105 | enter the CAPTCHA to convince Google Scholar you are human, and then
106 | remove the ".pdfmeat*" files in =/tmp/=.
107 |
108 |
--------------------------------------------------------------------------------