Automating adding PDF files

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Automating adding PDF files

Post by Luhmann »

I had a huge archive of PDF files which I either downloaded or scanned before Bookends introduced the ability to store and view PDF files within its own archive folder. Having a little time on my hands today, I decided to see if I could move these 400+ files over to bookends. Turned out to not be that easy...

Since the files all contain author title and date info in the filename (originally created from a special reference type for PDF files I had created in bookends) it isn't that hard for Bookends to find the file with the "Find and attach local PDF" command. However, I found this did not work consistently. Maybe something about my computer, or a bug in Bookends. I don't know, but I couldn't run the command two times in a row. The search also takes a long time. And, whatever the problems may be - one still has to locate and find the file in Bookends from the PDF file, at which point a simple drag and drop would work ... so no time is really saved.

Accordingly, I cooked up the following Automator Workflow.

http://drop.io/findinbookends

It will copy the filename of the current finder selection, strip the ".pdf" from the end, paste the text in the find box in the reference list fiew, tab twice to select the found reference, and then beep to let you know its done. Then you can drag and drop the file from the finder.

If anyone has any idea for a way to automate this even further I'd love to know. It would be great if it could just run on its own going through every file in my folder without my intervention ... but I couldn't figure out any way to do that.

In the process I learned a lot about automator and applescript, which was fun - so maybe the example workflow will be useful to you even if you don't need to do anything similar.
Jon
Site Admin
Posts: 10071
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Hi Luhmann,

When I run the script it launches, appears in the dock, then quits, no matter what is selected in the Finder.

Jon
Sonny Software

P.S. As for finding the pdf, Bookends uses Spotlight to do this, which is much slower and more problematic Tiger than in Leopard (I don't know which OS you are using).
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

I was afraid of that. One might have to re-record the actions in Bookends. Since I didn't see any native automator scripting for Bookends I made those actions using the "record" function. I guess those aren't transportable across computers...

I'm using Leopard.
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

Jon,

Here is an idea for how Bookends could handle things better. I don't expect this feature to be added, but I just wanted to describe what I think an ideal case scenario might look like in case any part of this idea is useful to other users:

Many applications have what they call a "drop box" or a "watched folder." Basically, a folder which the application monitors for new files. You wouldn't need to have Bookends running to add a PDF to bookends. Just move it to the Bookends Watched Folder, and the next time you launch Bookends the app will see the files and attempt to automatically match them to references if there is sufficient information in the filename. If there isn't sufficient information, or if the reference doesn't exist, Bookends could move the file to a sub-folder called "unmatched." The user could try to file these manually, or rename them and move them back into the top folder.

The advantage is that it is enough to hit "Save as" on the web and to download a PDF with the author name and date in the filename. If such a file is saved to the Watched Folder, it will automatically be matched when Bookends is launched.

Even better would be the ability to save RIS files (etc.) to the same folder. If Bookends sees them it imports the file first, then looks for matching PDFs afterwards.
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

Somewhat different from what I suggested above, but I see that Sente 5.4 adds a new "linking" feature which makes it very easy to add PDFs and web pages, from DOI or other links already in the citation. I know Bookends has something similar for PubMed, but this seems more flexible. (I don't have Sente so I haven't tried it - but they have a screencast on their website.)
Jon
Site Admin
Posts: 10071
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

Thanks for the info.

Jon
Sonny Software
Jon
Site Admin
Posts: 10071
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Post by Jon »

I considered the idea of adding a built-in browser view that would let you download pdfs by drag and drop a few years ago (I first saw this in iPapers, BTW). I toyed with it briefly but got sidetracked on other issues. Maybe it's time to toy with it again...

Jon
Sonny Software
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

I just spent an hour downloading Sente, importing my Bookends references, and playing with this feature, and here are my thoughts:

Background: If the citation was downloaded from ScienceDirect or Wiley-Blackwell, etc. it will include a DOI link to that page. That DOI link is there in Bookends, and I can use it by clicking the "Go to URL" link, or the link which appears in the summary field on the right side of the screen. So it would seem that Bookends offers the same functionality - but the difference in implementation matters.

What is good about Sente's implementation:

First off: In Sente the links window will show the PDF if I have it, otherwise it will automatically load the webpage for the DOI link using Apple's WebKit. This means I don't just have one click access to the DOI link - I have one click access to the download link for the file if my institution has access to that resource.

Secondly, I also get much more information. These sites will often link to articles that refer back to this article, or articles cited in the paper I am looking at. Again, I can directly download those articles.

Third, more and more of my citations are actually links to web pages. For instance, all newspaper stories are now web pages, although one could save them as PDF files, it is actually more natural to just save them as web pages. Sente has the ability to save these directly as what I assume are local web archives, as well as a live preview of the page. This is very useful since web pages change and we want to archive the version we are citing.

Fourth, not really related to the browser feature, but Sente seems to reflect changes to the PDF file better than bookends. If I open the file, add highlighting and annotations in Preview, those are reflected back in Sente. I couldn't get Bookends to do this. Maybe I'm doing something wrong?

What is lacking:

Sente has its live search updating feature, but it doesn't seem to have the ability to subscribe to RSS feeds. Almost every journal I read now offers XML/RSS/Atom updates for Table of Contents alerts. I'd love to be able to subscribe to those within my browser and directly import the citations and even the PDFs as they become available.

I really want Zotero's ability to pull in citation data from web pages using COINS data. Sente doesn't have this. If I have a partial citation with only a DOI link, it would be good if the software could automatically add the missing data from the information available in the meta data of the page. Zotero can do this for a wide variety of sites - including newspapers, photographs, and other types of data one might wish to cite.

Sente doesn't seem to do a good job of adding the PDFs, I often have to drag and drop after downloading. Also, I use Firefox for proxy connections to my university, not WebKit, so when downloading files I'm still stuck switching back and forth. It would be great if there was an ability to "open links using default browser" or some such thing.

More importantly, Sente doesn't seem to have the ability to add new citations from a link, only add more linked files and pages to the citation. But if I'm looking at ScienceDirect or Wiley-Blackwell and see a number of related citations, I want to import all of those to my bibliographic software directly.

Next up I'm downloading Papers to see what that does...
Luhmann
Posts: 63
Joined: Tue Jul 13, 2004 10:02 pm

Post by Luhmann »

Spent half an hour playing with papers. I love the GUI, but couldn't really get it to do much of use. In terms of functionality it doesn't match up with Zotero... For instance, it couldn't pull much useful metadata from the searches, and the number of pre-installed databases it searches is still quite limited.
andreas
Posts: 5
Joined: Mon Jun 16, 2008 6:24 am

Re: Automating adding PDF files

Post by andreas »

I'm currently trying to somehow bridge the gap between Devonthink and Bookends and try create Bookends references for files I have stored in Devonthink. I have doubts whether GUI scripting with AppleScript will work as Bookends behaves a bit intractably, but macro tools like QuicKeys are very helpful.
I'd like to see a way to tell Bookends that it should display "/Users/../abcdefg.dtBase/Files/file.pdf" as an attachment. I have searched Bookends menus extensively, but there might be a hidden corner in Bookends' GUI where I could drop such a string. There is the Attachement Inspector that needs a lot of mouse interaction, probably too much even for a highly sophisticated a macro recorder. I would very much appreciate helpful ideas.

Andreas
danzac
Posts: 433
Joined: Fri Jan 28, 2005 11:45 am

Re: Automating adding PDF files

Post by danzac »

andreas wrote:I'm currently trying to somehow bridge the gap between Devonthink and Bookends and try create Bookends references for files I have stored in Devonthink. I have doubts whether GUI scripting with AppleScript will work as Bookends behaves a bit intractably, but macro tools like QuicKeys are very helpful.
I'd like to see a way to tell Bookends that it should display "/Users/../abcdefg.dtBase/Files/file.pdf" as an attachment. I have searched Bookends menus extensively, but there might be a hidden corner in Bookends' GUI where I could drop such a string. There is the Attachement Inspector that needs a lot of mouse interaction, probably too much even for a highly sophisticated a macro recorder. I would very much appreciate helpful ideas.

Andreas
For what it is worth Andreas, DThink Pro 2.0— due out some time in the next few months, is supposed to be introducing a local URL system for all files in the database. This means you will be able to take a files link from in DT and put it in the URL field of the Bookends citation.
~I swore to myself that if I ever got to walk around the room as manager people would laugh as they saw me coming and applaud as I walked away~
Post Reply