Automator Workflow: Import RIS to Bookends

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
fitzgeraldsteele
Posts: 4
Joined: Wed Mar 14, 2007 11:19 pm

Automator Workflow: Import RIS to Bookends

Post by fitzgeraldsteele »

I'm lazy. I don't like to type references into Bookends. I prefer to download them in RIS format from Google Scholar to my desktop, then drag the RIS file into Bookends.

Updated with new installaction instructions...thanks Joewiz

I created an Automator Action as a Folder Action, Import RIS to Bookends, to...well, automate this process. It looks for files with the .ris extension on your desktop, imports them into Bookends, then deletes the .ris files.

Save the file and unzip it to reveal the Automator workflow. Open the workflow in Automator, and Save As Plugin > Folder Action attached to Desktop. Now whenever I save an ris file to my desktop, the workflow automatically launches and it saves the references to Bookends.

I find it useful. Thought I'd post it to see if anyone else finds it useful.

Cheers!
Last edited by fitzgeraldsteele on Thu Mar 15, 2007 9:21 am, edited 1 time in total.
joewiz
Posts: 67
Joined: Sun Feb 27, 2005 2:27 pm

Re: Automator Workflow: Import RIS to Bookends

Post by joewiz »

Very neat idea! I'd like to give it a try. I'm having some trouble with it so far, though.

I downloaded the "Import RIS to Bookends.scpt" file that you linked to, and set up the desktop to be associated with it as a folder action, and I downloaded a .ris file from google scholar to the desktop, but nothing's happening.

So, next, I tried to open the .scpt in Script Editor, but it popped up a dialog box, "Where is "Import RIS to Bookends.app?", and obviously I don't have a file by that name. Do you have any suggestions?

Thanks,
Joe
fitzgeraldsteele
Posts: 4
Joined: Wed Mar 14, 2007 11:19 pm

Post by fitzgeraldsteele »

Ahh...thanks for pointing out my lack of knowledge on how Automator works. :)

I've updated the Import RIS to Bookends workflow file, and reposted it. Now, instead of the .scpt, you can open this file in Automator, and Save as Plug-In for Folder Actions, Attached to Desktop.

Let me know if this incarnation works. :)
Gerben
Posts: 193
Joined: Mon Aug 22, 2005 4:53 pm
Location: Florence, Italy
Contact:

Post by Gerben »

It does not automatically work once i save a RIS file to the desktop; i have to double click it and then it is imported. But that might be the idea?


Gerben
fitzgeraldsteele
Posts: 4
Joined: Wed Mar 14, 2007 11:19 pm

Post by fitzgeraldsteele »

And you have it configured as a Desktop Folder Action?
Gerben wrote:It does not automatically work once i save a RIS file to the desktop; i have to double click it and then it is imported. But that might be the idea?


Gerben
joewiz
Posts: 67
Joined: Sun Feb 27, 2005 2:27 pm

Post by joewiz »

fitzgeraldsteele wrote:Let me know if this incarnation works. :)
It does! I'd be interested to know what the applescript portion does - why is that step #1 necessary?

Gerben - it sounds like you don't have Folder Actions enabled. To enable folder actions:

1. Open Folder Actions Setup in the Applications/AppleScript folder.
2. Select Enable Folder Actions.

Then follow fitzgeraldsteele's directions:

3. Download the file, "Import RIS to Bookends.workflow.zip".
4. Unzip and open the file "Import RIS to Bookends.workflow" in Automator
5. Select File > Save as Plug-In > call it "Import RIS to Bookends", Plug-in for: "Folder Actions", Attached to: Desktop. (This step places an application, "Import RIS to Bookends.app" in your ~/Library/Workflows/Applications/Folder Actions/ folder, and a script called "Import RIS to Bookends.scpt" pointing to this application in your ~Library/Scripts/Folder Action Scripts/ folder. For safe keeping you may wish to put "Import RIS to Bookends.workflow" into your ~/Library/Workflows/ folder.)

Finally, to actually make this script a folder action for the desktop:

6. Go to your user directory, control-click on the desktop, select "Attach a Folder Action", and choose "Import RIS to Bookends.scpt" from the list.

I think that's it.
fitzgeraldsteele
Posts: 4
Joined: Wed Mar 14, 2007 11:19 pm

Post by fitzgeraldsteele »

Huzzah! Success!
joewiz wrote:It does! I'd be interested to know what the applescript portion does - why is that step #1 necessary?
I think there were 2 reasons why the first attempt at this didn't work.

1) Apparantly, running the workflow as a folder action requires 2 files - a .scpt that sits in your ~/Library/Scripts/Folder Actions directory, and an .app file that is somewhere else. I initially only posted the .scpt, so other people couldn't run the workflow. Posting the workflow file seems to have fixed that.

2) The workflow needs to know the location of your desktop folder (eg Macintosh HD:Users:yourusername:Desktop) . The applescript simply gets the path to the current user's desktop folder. In version 1, I used the 'Get Specified Finder Items' action, but I think it was hardcoded to my username.
joewiz
Posts: 67
Joined: Sun Feb 27, 2005 2:27 pm

Re: Automator Workflow: Import RIS to Bookends

Post by joewiz »

fitzgeraldsteele wrote:Now whenever I save an ris file to my desktop, the workflow automatically launches and it saves the references to Bookends.
Now that I have it set up and it's working, I've noticed that anytime any new file enters the desktop, the workflow automatically launches. I think I'll disable the folder action for now, and enable it only when I'm in heavy-duty citation-adding mode. Still, thanks!

Has anyone heard of 'Hazel'? I haven't played with it yet, but it might be the kind of thing that does the monitoring for .ris files and only launches the script when it's needed.
joewiz
Posts: 67
Joined: Sun Feb 27, 2005 2:27 pm

Post by joewiz »

fitzgeraldsteele wrote:2) The workflow needs to know the location of your desktop folder (eg Macintosh HD:Users:yourusername:Desktop) . The applescript simply gets the path to the current user's desktop folder. In version 1, I used the 'Get Specified Finder Items' action, but I think it was hardcoded to my username.
That makes sense - great! I'll have to learn some applescript one of these days.
tom
Posts: 99
Joined: Mon Feb 14, 2005 12:12 pm
Location: France
Contact:

Post by tom »

Hi all,

Very nice...It works fine for me. But I usually prefer downloading .bib format (the RIS does not work well from most of the sides I visit). So, I changed the workflow from .ris to .bib. The refs are recognized and send to BE, and then moved to the trash. My problem is that BE does not import the references correctly (means not at all). Any suggestions? Does this only work with RIS format? Why?

tom
joewiz
Posts: 67
Joined: Sun Feb 27, 2005 2:27 pm

Post by joewiz »

tom wrote:But I usually prefer downloading .bib format (the RIS does not work well from most of the sides I visit). So, I changed the workflow from .ris to .bib. The refs are recognized and send to BE, and then moved to the trash. My problem is that BE does not import the references correctly (means not at all). Any suggestions? Does this only work with RIS format? Why?
I might be wrong, but my guess is that you need to change your File > "Import References from:" setting from RIS to whatever format .bib files correspond to. Once you make that change, the files should be interpreted according to that setting. You could try manually importing the .bib file first (i.e. File > "Import References from:") to make sure the importing is working, then try the script.
danzac
Posts: 436
Joined: Fri Jan 28, 2005 11:45 am

Post by danzac »

The potential for this is incredibly cool. If this could be developed and perhaps even sent with Bookends, that would be cool.

I want to offer a few suggestions, but please understand I have no experience with applescript and have no idea what kind of work it takes.

1) Tom mentioned he likes BibTeX. GS also allows you to download endnote version right from the search results. Could we make a comprehensive workflow that recognizes a number of different formats and imports them with the correct import filter?

2) If this type of workflow started to work flawlessly, I would love to be able to assign those automatically imported citations into a static group I would call "Inbox". That way I know the citations that have been recently placed in, and consequently the ones that may need to be cleaned up (formatting) and added to (keywords, abstracts, placing it in a group, attaching its filed, etc.).

3) This is more of a question - for those who want a little more control, can this be made an automator action that is only initiated by the user (i.e. highlight the files, right click and choose the automator workflow)?


Thanks for your work on this. Danny
~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~
matthias
Posts: 45
Joined: Fri Apr 22, 2005 2:45 pm
Location: Berlin, Germany

Post by matthias »

Superb action! Yet, for some reason, when using it here, diacritics contained in the ris-file are not imported. They are replaced by the "question-mark-in-diamond-symbol". When importing the very same file via drag and drop i don't see this problem.

Matthias
Post Reply