Revision: 27604
http://sourceforge.net/p/bibdesk/svn/27604
Author: hofman
Date: 2022-06-10 14:09:26 +0000 (Fri, 10 Jun 2022)
Log Message:
-----------
don't make doi into url when already a url
Modified Paths:
--------------
trunk/bibdesk/BDSKArxivParser.m
trunk/bibdesk/BDSKSpringerParser.m
Modified: trunk/bibdesk/BDSKArxivParser.m
===================================================================
--- trunk/bibdesk/BDSKArxivParser.m 2022-06-10 09:02:06 UTC (rev 27603)
+++ trunk/bibdesk/BDSKArxivParser.m 2022-06-10 14:09:26 UTC (rev 27604)
@@ -212,8 +212,11 @@
// successfully found the result DOI
if ((string = [node stringValue])) {
[pubFields setValue:string forKey:BDSKDoiString];
- if ([BDSKDoiString isRemoteURLField])
- [pubURLs addObject:[@"https://doi.org/"
stringByAppendingString:[[node stringValue]
stringByAddingPercentEscapesForPath]]];
+ if ([BDSKDoiString isRemoteURLField]) {
+ if ([string containsString:@"://"] == NO)
+ string = [@"https://doi.org/"
stringByAppendingString:[string stringByAddingPercentEscapesForPath]];
+ [pubURLs addObject:string];
+ }
}
}
Modified: trunk/bibdesk/BDSKSpringerParser.m
===================================================================
--- trunk/bibdesk/BDSKSpringerParser.m 2022-06-10 09:02:06 UTC (rev 27603)
+++ trunk/bibdesk/BDSKSpringerParser.m 2022-06-10 14:09:26 UTC (rev 27604)
@@ -160,8 +160,11 @@
// URL to PDF
[urlsArray addObject:[[NSURL URLWithString:@"fulltext.pdf"
relativeToURL:url] absoluteString]];
- if ([BDSKDoiString isRemoteURLField])
- [urlsArray addObject:[@"https://doi.org/" stringByAppendingString:[doi
stringByAddingPercentEscapesForPath]]];
+ if ([BDSKDoiString isRemoteURLField]) {
+ if ([doi containsString:@"://"] == NO)
+ doi = [@"https://doi.org/" stringByAppendingString:[doi
stringByAddingPercentEscapesForPath]];
+ [urlsArray addObject:doi];
+ }
return [[BibItem alloc] initWithType:pubType citeKey:nil
pubFields:pubFields URLStrings:urlsArray];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit