Revision: 21912
          http://sourceforge.net/p/bibdesk/svn/21912
Author:   hofman
Date:     2018-02-13 10:48:48 +0000 (Tue, 13 Feb 2018)
Log Message:
-----------
Change path for incur parser to avoid duplicate items

Modified Paths:
--------------
    trunk/bibdesk/BDSKIUCrParser.m

Modified: trunk/bibdesk/BDSKIUCrParser.m
===================================================================
--- trunk/bibdesk/BDSKIUCrParser.m      2018-02-13 10:28:42 UTC (rev 21911)
+++ trunk/bibdesk/BDSKIUCrParser.m      2018-02-13 10:48:48 UTC (rev 21912)
@@ -44,15 +44,11 @@
 
 + (NSString *)host { return @"iucr.org"; }
 
-+ (NSString *)linkedBibTeXNodeXPath { return 
@".//a[starts-with(@href,'http://scripts.iucr.org/cgi-bin/biblio_page?')]"; }
++ (NSString *)linkedBibTeXNodeXPath { return 
@".//table[@class='citation']//input[@name='cnor' and @value!='']"; }
 
 + (NSString *)linkedBibTeXURLStringFromNode:(NSXMLNode *)node {
-    NSMutableString *hrefValue = [[[node stringValueOfAttribute:@"href"] 
mutableCopy] autorelease];
-    NSRange range = [hrefValue rangeOfString:@"biblio_page?"];
-    if (range.location != NSNotFound)
-        [hrefValue replaceCharactersInRange:range 
withString:@"biblio?Action=download&saveas=BIBTeX&cnor="];
-
-    return hrefValue;
+    NSString *cnorValue = [node stringValueOfAttribute:@"value"];
+    return [NSString 
stringWithFormat:@"//scripts.iucr.org/cgi-bin/biblio?Action=download&cnor=%@&saveas=BIBTeX",
 cnorValue];
 }
 
 + (NSDictionary *)parserInfo {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to