On 19 Mar 2008, at 10:02 PM, Alexandre Papadopoulos wrote:

> On 19 Mar 2008, at 13:49, Christiaan Hofman wrote:
>
>> I did not see any URL that accepts something like a "?
>> query=searchterm" query component or something. It is a URL with a
>> particular syntax for passing the name. You cannot expect a user to
>> exactly type the query in that specific form.
>>
>> So basically, you need to be able to translate a query string the  
>> user
>> types to a request (URL) you cna send to the server. I did not see
>> anything like that in what you've told us.
>
> But you don't have to deal with all this. The http routines do all  
> that for you. See below.
>
>> I really don't want to mix with Java. That's messy, and moreover the
>> Java-Cocoa bridge is deprecated.
>
> Of course I didn't mean to actually use Java. All I wanted to stress  
> is that it seems easy to implement what I am talking of in Java. In  
> order to prove that, I attached a simple code that fills a list of  
> strings with bibtex entries for a given query (I hope we can send  
> attachments). The code is straightforward and commented. It took me  
> about 20 minutes to code that (it's badly written). In ObjC/Cocoa, I  
> have no idea how long it would have taken (I have to spend some time  
> finding out how to manipulate regex's, html documents, make http  
> connections, etc.), but it's definitely doable, especially for  
> someone who has some Cocoa experience.
>
> <DBLPQuery.java>
>
>

Well, you didn't tell us about this possibility.

Anyway, this does not really change much about the main reasons not to  
use a search group, as also expanded on by Adam. If you look at  
BDSKZoomGroupServer or other search group severs you will see that  
parsing is the least of the worries for implementing a search group  
server (in fact, they don't even do any parsing themselves).

> (If you want to test it by yourself, you'll need the Jericho HTML  
> Parser, http://jerichohtml.sourceforge.net/)
>
>> I think you can get a lot of the ideas from the google scrapers or  
>> the
>> other web scrapers (all the parsers referenced in BDSKWebParser) ,
>> because it's very similar to what you need. Also the xcode developer
>> tools contain a lot of documentation.
>
> I will keep you up to date about my advancement on this.
>
> A


I think it should be pretty easy to change the google scholar scraper  
to a scraper for this site. Some hints:
- you probably want to look for links with class="rec", using XPaths  
(change the BibTeXLinkNodePath variable).
- instead of downloading the linked page using NSURLDownload, you  
probably want to do something like [[NSXMLDocument alloc]  
initWithContentsOfURL:btURL options:0 error:&error], and use  
nodesForXPath:error: to get the bibtex string.

Christiaan


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to