Revision: 21909
          http://sourceforge.net/p/bibdesk/svn/21909
Author:   hofman
Date:     2018-02-12 23:11:02 +0000 (Mon, 12 Feb 2018)
Log Message:
-----------
Select bibtex nodes in iucr parser from href, add to web parsers

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

Modified: trunk/bibdesk/BDSKIUCrParser.m
===================================================================
--- trunk/bibdesk/BDSKIUCrParser.m      2018-02-12 23:06:53 UTC (rev 21908)
+++ trunk/bibdesk/BDSKIUCrParser.m      2018-02-12 23:11:02 UTC (rev 21909)
@@ -44,13 +44,14 @@
 
 + (NSString *)host { return @"iucr.org"; }
 
-+ (NSString *)linkedBibTeXNodeXPath { return @".//a[@title='Download 
citation']"; }
++ (NSString *)linkedBibTeXNodeXPath { return 
@".//a[starts-with(@href,'http://scripts.iucr.org/cgi-bin/biblio_page?')]"; }
 
 + (NSString *)linkedBibTeXURLStringFromNode:(NSXMLNode *)node {
     NSMutableString *hrefValue = [[[node stringValueOfAttribute:@"href"] 
mutableCopy] autorelease];
     NSRange range = [hrefValue rangeOfString:@"biblio_page?"];
     if (range.location != NSNotFound)
-        [hrefValue insertString:@"biblio?Action=download&saveas=BIBTeX&cnor=" 
atIndex:NSMaxRange(range)];
+        [hrefValue replaceCharactersInRange:range 
withString:@"biblio?Action=download&saveas=BIBTeX&cnor="];
+
     return hrefValue;
 }
 

Modified: trunk/bibdesk/BDSKWebParser.m
===================================================================
--- trunk/bibdesk/BDSKWebParser.m       2018-02-12 23:06:53 UTC (rev 21908)
+++ trunk/bibdesk/BDSKWebParser.m       2018-02-12 23:11:02 UTC (rev 21909)
@@ -53,6 +53,7 @@
 #import "BDSKZentralblattParser.h"
 #import "BDSKMathSiteParser.h"
 #import "BDSKSIAMParser.h"
+#import "BDSKIUCrParser.h"
 #import "BDSKCOinSParser.h"
 #import "BDSKIEEEXploreParser.h"
 #import "BDSKMASParser.h"
@@ -82,6 +83,7 @@
                         [BDSKMathSciNetParser class],
                         [BDSKScienceDirectParser class],
                         [BDSKSIAMParser class],
+                        [BDSKIUCrParser class],
                         [BDSKZentralblattParser class],
                         [BDSKProjectEuclidParser class],
                         [BDSKNumdamParser class],

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