Jump to content

Search Bibdesk library


Recommended Posts

Hey,

 

many people here seem to be interested in searching (academic) publications, see e.g. jstor, pubmed. I have written a simple workflow that searches your local BibDesk library based on Spotlight. This makes finding your PDFs much easier :)

 

Download here: BibDesk_Search.alfredworkflow or via alfpt

 

Bye

Sebastian

 

Update 2013-03-25: Recent Version is 2.1 (see thread below)

Edited by Sebastian
Link to comment
  • 1 month later...
  • 1 month later...

This workflow is awesome, it was a major reason for me to make the switch from LaunchBar to Alfred, thanks, Sebastian!

 

I have two requests:

 

1. Could you maybe put the publication year into the output? Maybe instead of the "Authors: " in the beginning of the second line?! That would help me a lot, as I often know an author and year, but not the exact title...

 

2. Related: Could you maybe adapt the search so that the year field is searched also? When I search for "author somewordfromtitle", I get the result I want, when I search for "author year", I do not get anything...

 

Thanks for your great work!

Link to comment

This workflow is awesome, it was a major reason for me to make the switch from LaunchBar to Alfred, thanks, Sebastian!

 

I have two requests:

 

1. Could you maybe put the publication year into the output? Maybe instead of the "Authors: " in the beginning of the second line?! That would help me a lot, as I often know an author and year, but not the exact title...

 

2. Related: Could you maybe adapt the search so that the year field is searched also? When I search for "author somewordfromtitle", I get the result I want, when I search for "author year", I do not get anything...

 

Thanks for your great work!

 

Dear Januz,

 

I incorporated your ideas. Please get the new version (1.3) here:

 

BibDesk_Search.alfredworkflow

 

and let me know how it works. I have put the date info to the end of the subtitle string but I think that you can live with it. 

 

Bye

Sebastian

Link to comment

Hi Sebastian,

 

great, thank you very much! Strangely, with the new version, most of the time, the search results are displayed only for a second or so and are then replaced by the default options ("Search Google for 'bib searchterm'" etc.). The new features seem to work though (year is displayed and searching for an author and a year works, before the results vanish...).

 

Thanks,

 

J

Link to comment

... yes, it did. Thanks again!

 

Regarding the placement of the year: Sadly, when the number of authors is high (not uncommon in my field), the year is not displayed, because it is displayed on the right side. Would you maybe consider displaying it on the left side like in this Pubmed workflow: http://www.alfredforum.com/topic/478-pubmed-searches/?p=2384 (e.g., "2013: Author1, Author2, etc")?

 

Best,

 

J

In my field of science you have only a few authors. Anyway, new version 1.4 :)

 

Bye, Sebastian

Link to comment
  • 2 months later...

Hey Sebastian,

 

thanks again for the great workflow, I am using it almost every day!

 

One little thing I miss, though, is the ability to search with an exact BibTeX key (e.g. "bib WimmerMayringerEtAl1999"). When I do this, the workflow does not recognize the entry. I use this often to go back from LaTeX to the cited article, i.e. select BibTeX key in \cite{} command, press Modifier to send text to Alfred (via Show Alfred with selection workflow), type in bib and jump to the file in BibDesk.

 

At the moment, I am doing this via AppleScript, but it would be great if you could modify your workflow to search also the keys?!

 

Thanks,

 

J

Link to comment

Hi,

 

it should be fixed in 1.5, i.e., "bib xxx" searches the keys too. Maybe I will think in the future about specific keywords like "bibkey WimmerMayringerEtAl1999" to allow more precise search… well let's see :)

 

Bye

Seb.

  

One little thing I miss, though, is the ability to search with an exact BibTeX key (e.g. "bib WimmerMayringerEtAl1999"). When I do this, the workflow does not recognize the entry. I use this often to go back from LaTeX to the cited article, i.e. select BibTeX key in \cite{} command, press Modifier to send text to Alfred (via Show Alfred with selection workflow), type in bib and jump to the file in BibDesk.

 

Edited by Sebastian
Link to comment
  • 1 month later...

Hi

This has stopped working for me for some reason.  I type bib & get the Search in Bibdesk library... prompt in Alfred, select it and start typing, then Alfred immediately bumps me to the default Google search for "bib " & whatever I typed.

 

If I manually run search.php in Terminal, it outputs the correct results, XML formatted.  

 

Any ideas?

thanks

Derick

Link to comment

I think I have made some progress figuring out what is up.  When I tried the search, that wasn't working in Alfred, in Terminal, I got the result 

 

Warning: SimpleXMLElement::addChild(): unterminated entity reference

above the XML output.

 

Other searches work.  

 

The problem search had "\&" in the Title field of one of the publications.  When I replaced that with the word "and" , Alfred went back to finding the results successfully, and the search didn't give the warning when running search.php directly in Terminal.

Edited by dfay
Link to comment
  • 1 month later...

This still doen't work here. When I type "bib", Alfred offers me to "Search in BibDesk library", but as soon as I type the search argument, only the default search engines are displayed. Too bad, I'd really love to use this workflow...

Edited by miq
Link to comment

This still doen't work here. When I type "bib", Alfred offers me to "Search in BibDesk library", but as soon as I type the search argument, only the default search engines are displayed. Too bad, I'd really love to use this workflow...

OK, let's try to find out what the problem is:

1. what is the content of the directory 

~/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/

There should be plenty of files ("*.bdskchache").

 

2. open terminal.app and go to the directory of the bibdesk plugin (you can find out the location by opening the workflow tab of the preferences, then right click on bibdesk workflow and click open in finder). Enter in terminal: 

php search.php author

What is the output?

Link to comment

Sebastian, thank you for your reply!

 

1.

The folder does not exist. I only find ~/Library/Caches/edu.ucsd.cs.mmccrack.bibdesk/ containig no .bdskcache files at all.

 

2.

Maybe this is related, but I get no output, but also no error, just a new line ending with $.

 

This might rather be a BibDesk problem?

Thanks for your help!

Link to comment

You have a ".bib"-file somewhere that contains your library, right? Then you need to open it with bibdesk and then save it. The reason is that Bibdesk creates .bdskcache whenever it saves a bib-file. Afterwards they should be visible to Alfred.

 

The folder does not exist. I only find ~/Library/Caches/edu.ucsd.cs.mmccrack.bibdesk/ containig no .bdskcache files at all.

 

This might rather be a BibDesk problem?

Thanks for your help!

Link to comment

Now I have the files in ~/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/. I think, in the BibDesk I had to enable "automatic backups". That's the good news. The bad: It still doesn't work.

 

Terminal now gives the output:

 

"<?xml version="1.0"?>

<items><item uid="bib/Users/miq/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/Fish:1980.bdskcache" arg="/Users/miq/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/Fish:1980.bdskcache"><title>Is there a Text in this Class? The Authority of Interpretive Communities</title><subtitle>1980: Fish, Stanley</subtitle><icon>icon.png</icon></item></items>"

 

But still, Alfred behaves as described above.

Link to comment

The output is perfect and since the main work of the plugin is done exactly in this php script I is difficult to debug beyond this point. However, do you use Mavericks? I realized that search results come sometimes with some delay. I will try to find out why...

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...