On 2009-01-03 23:06, "Adam R. Maxwell" <amaxw...@mac.com> wrote:

>>> FWIW, I'd suggest that Greg's patch or the original code should
>>> probably be used for PubMed, since this sounds like pretty serious
>>> breakage for PubMed.

Absolutely.

>> But this is in the RIS parser, not the PubMed parser, which completely
>> overrides this change. So why would this be affected? Or does PubMed
>> not even provide PubMed format anymore?
> 
> Look at where the code you removed was:
> 
> http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKRISParser.
> m?r1=12305&r2=13424
> 
> Unless I'm totally misreading this, it was in the
> +itemsFromString:error: method, which the PubMed parser does not
> override.  So originally the year was extracted from PubMed dates
> using the same regex as for RIS, by design as I've said.  I really
> don't think this is PubMed's fault...

I have to agree that this code change is the source of the difference in
behaviour for PubMed since 13424.  Perhaps it would be worth adding a unit
test since there are lot of rather tricky parsing issues embedded in the
BibDesk code. 

Anyway, rather than over-riding +itemsFromString:error in BDSKPubMedParser
(which would lead to code redundancy) I would suggesting adding some extra
code to the BDSKPubMedParser:

+ (void)fixPublicationDictionary:(NSMutableDictionary *)pubDict;

method.  This is what I did in the patch I sent yesterday.  I have now
tested this fairly extensively, found some entries that it barfed on and
modified it accordingly.

In detail, the only field in PubMed that gives information about the
publication's date is DP which indicate's the journal's cover date.  After a
little investigation, I see that it can have the following kinds of values.

    Dp = {2005},
    Dp = {2007 Dec},
    Dp = {2008 Jun 1},
    Dp = {2008 Jan-Feb},
    Dp = {1975 Spring},

Personally I think that eveything other than the year is a perfectly valid
entry in the BibTex month field, so I would suggest the revised patch at:

http://pastie.org/351857

Best wishes,

Greg.



------------------------------------------------------------------------------
_______________________________________________
Bibdesk-users mailing list
Bibdesk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to