Revision: 28112
          http://sourceforge.net/p/bibdesk/svn/28112
Author:   hofman
Date:     2022-12-14 14:56:00 +0000 (Wed, 14 Dec 2022)
Log Message:
-----------
don't use Type key for bibtex type, this is a field name

Modified Paths:
--------------
    trunk/bibdesk/BDSKHCiteParser.m
    trunk/bibdesk/BDSKMathSciNetParser.m

Modified: trunk/bibdesk/BDSKHCiteParser.m
===================================================================
--- trunk/bibdesk/BDSKHCiteParser.m     2022-12-14 07:30:24 UTC (rev 28111)
+++ trunk/bibdesk/BDSKHCiteParser.m     2022-12-14 14:56:00 UTC (rev 28112)
@@ -91,8 +91,8 @@
         NSString *type = nil;
         
         rd = [self dictionaryFromCitationNode:obj isContainer:NO 
xpaths:xpaths];
-        type = [rd objectForKey:BDSKTypeString];
-        [rd removeObjectForKey:BDSKTypeString];
+        type = [rd objectForKey:BDSKPubTypeString];
+        [rd removeObjectForKey:BDSKPubTypeString];
         
         BibItem *item = [[BibItem alloc] initWithType:type citeKey:nil 
pubFields:rd];
         [items addObject:item];
@@ -119,9 +119,9 @@
     }
     
     if(typeString != nil){
-        [rd setObject:[typeMan bibTeXTypeForHCiteType:typeString] 
forKey:BDSKTypeString];
+        [rd setObject:[typeMan bibTeXTypeForHCiteType:typeString] 
forKey:BDSKPubTypeString];
     }else{
-        [rd setObject:BDSKMiscString forKey:BDSKTypeString];
+        [rd setObject:BDSKMiscString forKey:BDSKPubTypeString];
     }
     
     
@@ -220,24 +220,24 @@
     node = [citationNode singleNodeForXPathExpression:[xpaths 
objectForKey:@"container"]];
     
     if(node) {
-        NSString *citationType = [rd objectForKey:BDSKTypeString];
+        NSString *citationType = [rd objectForKey:BDSKPubTypeString];
 
         NSMutableDictionary *containerDict = [NSMutableDictionary 
dictionaryWithDictionary:[self dictionaryFromCitationNode:node isContainer:YES 
xpaths:xpaths]];
         NSString *containerTitle = [containerDict 
objectForKey:BDSKTitleString];
-        NSString *containerType = [containerDict objectForKey:BDSKTypeString];
+        NSString *containerType = [containerDict 
objectForKey:BDSKPubTypeString];
 
         if(containerType != nil && containerTitle != nil){
             // refine type based on container type
             if([citationType isEqualToString:@"misc"]){
                 if([containerType isEqualToString:@"journal"]){
-                    [rd setObject:BDSKArticleString forKey:BDSKTypeString];
+                    [rd setObject:BDSKArticleString forKey:BDSKPubTypeString];
                 }else if([containerType isEqualToString:@"proceedings"]){
-                    [rd setObject:BDSKInproceedingsString 
forKey:BDSKTypeString];
+                    [rd setObject:BDSKInproceedingsString 
forKey:BDSKPubTypeString];
                 }
             }
             
             // refresh:
-            citationType = [rd objectForKey:BDSKTypeString];
+            citationType = [rd objectForKey:BDSKPubTypeString];
             
             if([citationType isEqualToString:BDSKArticleString]){
                 [rd setObject:containerTitle forKey:BDSKJournalString];

Modified: trunk/bibdesk/BDSKMathSciNetParser.m
===================================================================
--- trunk/bibdesk/BDSKMathSciNetParser.m        2022-12-14 07:30:24 UTC (rev 
28111)
+++ trunk/bibdesk/BDSKMathSciNetParser.m        2022-12-14 14:56:00 UTC (rev 
28112)
@@ -157,7 +157,7 @@
     
     for (NSXMLNode *node in preArray) {
         NSString * preContent = [node stringValue];
-        NSString * cleanedRecord = [preContent 
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
+        NSString * cleanedRecord =     [preContent 
stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines];
         cleanedRecord = [umlautFixer replaceWithString:@"{$1}" 
inString:cleanedRecord];
         
         [results addObjectsFromArray:[parser 
itemsFromBibTeXString:cleanedRecord error:NULL]];

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