Revision: 29414
          http://sourceforge.net/p/bibdesk/svn/29414
Author:   hofman
Date:     2025-08-04 09:14:49 +0000 (Mon, 04 Aug 2025)
Log Message:
-----------
pass string or dictionary literal as contextInfo in some cases

Modified Paths:
--------------
    trunk/bibdesk/BDSKIACRParser.m
    trunk/bibdesk/BDSKMathSciNetParser.m
    trunk/bibdesk/BDSKSpringerParser.m
    trunk/bibdesk/BDSKZentralblattParser.m

Modified: trunk/bibdesk/BDSKIACRParser.m
===================================================================
--- trunk/bibdesk/BDSKIACRParser.m      2025-08-01 09:37:38 UTC (rev 29413)
+++ trunk/bibdesk/BDSKIACRParser.m      2025-08-04 09:14:49 UTC (rev 29414)
@@ -105,9 +105,8 @@
             NSString *path = [paperNode stringValueOfAttribute:@"href"];
             NSURL *bibtexURL = [[NSURL URLWithString:path relativeToURL:url] 
absoluteURL];
             NSURLRequest *request = [NSURLRequest requestWithURL:bibtexURL];
-            NSDictionary *contextInfo = [NSDictionary 
dictionaryWithObjectsAndKeys:[bibtexURL absoluteString], @"baseURLString", nil];
             
-            [self addDownloadWithRequest:request contextInfo:contextInfo];
+            [self addDownloadWithRequest:request contextInfo:[bibtexURL 
absoluteString]];
         }
         
     }
@@ -131,7 +130,7 @@
     BibItem *item = [items firstObject];
     
     if (item) {
-        NSString *baseURLString = [[download contextInfo] 
objectForKey:@"baseURLString"];
+        NSString *baseURLString = [download contextInfo];
         [item setField:BDSKUrlString toValue:nil];
         [item addURLString:[baseURLString 
stringByAppendingPathExtension:@"pdf"]];
         [item addURLString:baseURLString];

Modified: trunk/bibdesk/BDSKMathSciNetParser.m
===================================================================
--- trunk/bibdesk/BDSKMathSciNetParser.m        2025-08-01 09:37:38 UTC (rev 
29413)
+++ trunk/bibdesk/BDSKMathSciNetParser.m        2025-08-04 09:14:49 UTC (rev 
29414)
@@ -85,7 +85,7 @@
         NSString * serverName = [[[self URL] host] lowercaseString];
         if ([serverName rangeOfString:@"ams"].location == NSNotFound)
                 serverName = @"www.ams.org";
-        NSDictionary *contextInfo = [NSDictionary 
dictionaryWithObjectsAndKeys:serverName, @"serverName", nil];
+        NSDictionary *contextInfo = @{@"serverName": serverName};
         
         requests = [BDSKMathSciNetParser bibTeXRequestsForMRIDs:IDArray 
serverName:serverName error:outError];
         

Modified: trunk/bibdesk/BDSKSpringerParser.m
===================================================================
--- trunk/bibdesk/BDSKSpringerParser.m  2025-08-01 09:37:38 UTC (rev 29413)
+++ trunk/bibdesk/BDSKSpringerParser.m  2025-08-04 09:14:49 UTC (rev 29414)
@@ -89,11 +89,9 @@
         
         NSString *bibtexURLString = [NSString 
stringWithFormat:@"https://citation-needed.springer.com/v2/references/%@?format=bibtex&flavour=citation";,
 doi];
         NSURL *bibtexURL = [NSURL URLWithString:bibtexURLString];
-        
         NSURLRequest *request = [NSURLRequest requestWithURL:bibtexURL];
-        NSDictionary *contextInfo = [NSDictionary 
dictionaryWithObjectsAndKeys:doi, @"identifier", nil];
         
-        [self addDownloadWithRequest:request contextInfo:contextInfo];
+        [self addDownloadWithRequest:request contextInfo:doi];
     }
     
     return nil;
@@ -103,7 +101,7 @@
     NSArray *items = [super itemsFromDownload:download error:outError];
     
     BibItem *item = [items firstObject];
-    NSString *doi = [[download contextInfo] objectForKey:@"identifier"];
+    NSString *doi = [download contextInfo];
     
     if (item && doi) {
         [item setField:BDSKUrlString toValue:nil];

Modified: trunk/bibdesk/BDSKZentralblattParser.m
===================================================================
--- trunk/bibdesk/BDSKZentralblattParser.m      2025-08-01 09:37:38 UTC (rev 
29413)
+++ trunk/bibdesk/BDSKZentralblattParser.m      2025-08-04 09:14:49 UTC (rev 
29414)
@@ -86,7 +86,7 @@
         if ( [[[self URL] path] hasCaseInsensitivePrefix:@"/ZMATH/zmath"] )
             // some mirrors' paths begin with /ZMATH, add that
             serverName = [serverName stringByAppendingString:@"/ZMATH"];
-        NSDictionary *contextInfo = [NSDictionary 
dictionaryWithObjectsAndKeys:serverName, @"serverName", nil];
+        NSDictionary *contextInfo = @{@"serverName": serverName};
         
         requests = [BDSKZentralblattParser bibTeXRequestsForZMathIDs:IDArray 
serverName:serverName error:outError];
         

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

Reply via email to