Revision: 28288
http://sourceforge.net/p/bibdesk/svn/28288
Author: hofman
Date: 2023-06-05 08:40:36 +0000 (Mon, 05 Jun 2023)
Log Message:
-----------
check for returned error html in generic web poarser class
Modified Paths:
--------------
trunk/bibdesk/BDSKACMDLParser.m
trunk/bibdesk/BDSKAsynchronousWebParser.m
trunk/bibdesk/BDSKDOIWebParser.m
trunk/bibdesk/BDSKMASParser.m
Modified: trunk/bibdesk/BDSKACMDLParser.m
===================================================================
--- trunk/bibdesk/BDSKACMDLParser.m 2023-06-04 21:44:01 UTC (rev 28287)
+++ trunk/bibdesk/BDSKACMDLParser.m 2023-06-05 08:40:36 UTC (rev 28288)
@@ -93,10 +93,6 @@
return nil;
}
-- (NSString *)bibTeXStringFromDownload:(BDSKCitationDownload *)download {
- return [[download string] stringByRemovingSurroundingWhitespace];
-}
-
- (NSArray *)itemsFromDownload:(BDSKCitationDownload *)download error:(NSError
**)outError {
NSArray *items = [super itemsFromDownload:download error:outError];
Modified: trunk/bibdesk/BDSKAsynchronousWebParser.m
===================================================================
--- trunk/bibdesk/BDSKAsynchronousWebParser.m 2023-06-04 21:44:01 UTC (rev
28287)
+++ trunk/bibdesk/BDSKAsynchronousWebParser.m 2023-06-05 08:40:36 UTC (rev
28288)
@@ -40,6 +40,7 @@
#import "BibItem.h"
#import "DOMNode_BDSKExtensions.h"
#import "NSURL_BDSKExtensions.h"
+#import "NSString_BDSKExtensions.h"
#import "BDSKDownloader.h"
@@ -162,7 +163,10 @@
}
- (NSString *)bibTeXStringFromDownload:(BDSKCitationDownload *)download {
- return [download string];
+ NSString *bibtexString = [download string];
+ if ([bibtexString hasCaseInsensitivePrefix:@"<!doctype html"])
+ return nil;
+ return [bibtexString stringByRemovingSurroundingWhitespace];
}
@end
Modified: trunk/bibdesk/BDSKDOIWebParser.m
===================================================================
--- trunk/bibdesk/BDSKDOIWebParser.m 2023-06-04 21:44:01 UTC (rev 28287)
+++ trunk/bibdesk/BDSKDOIWebParser.m 2023-06-05 08:40:36 UTC (rev 28288)
@@ -123,13 +123,6 @@
return nil;
}
-- (NSString *)bibTeXStringFromDownload:(BDSKCitationDownload *)download {
- NSString *bibtexString = [[download string]
stringByRemovingSurroundingWhitespace];
- if ([bibtexString hasCaseInsensitivePrefix:@"<!doctype html"])
- return nil;
- return bibtexString;
-}
-
+ (NSString *)name { return @"DOI"; }
+ (NSString *)address { return @"https://www.doi.org/"; }
Modified: trunk/bibdesk/BDSKMASParser.m
===================================================================
--- trunk/bibdesk/BDSKMASParser.m 2023-06-04 21:44:01 UTC (rev 28287)
+++ trunk/bibdesk/BDSKMASParser.m 2023-06-05 08:40:36 UTC (rev 28288)
@@ -62,7 +62,7 @@
}
- (NSString *)bibTeXStringFromDownload:(BDSKCitationDownload *)download {
- return [[download string] stringWithPhoneyCiteKeys:[BibItem
defaultCiteKey]];
+ return [[super bibTeXStringFromDownload:download]
stringWithPhoneyCiteKeys:[BibItem defaultCiteKey]];
}
+ (NSString *)name { return @"MAS"; }
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