(moved from Bibdesk users since they may not be so interested in the details... Hope that's ok)
Hi Christian, Looks like our messages crossed. Quick work! =On 2009-01-03 23:31, "Christiaan Hofman" <cmhof...@gmail.com> wrote: > RIS is truly a mess, that's why the RIS parsers are a mess. It's > almost impossible to touch it, because any fix is almost bound to add > a new bug. That's why I really don't like to even try fixing it (and > therefore tend to close bug reports asking me). > > Anyway, I applied the patch (thanks Gregory), after some changes. > Because of course the patch as it was would've broken proper RIS. Thank you very much for that patch. A couple of points though. 1) My changes were restricted to BDSKPubMedParser parser which is surely only called for PubMed records. PubMed records are defined by the BDSKPubMedParser + (BOOL)canParseString:(NSString *)string{ Which checks if a string has whitespace followed by PMID- This is true for Medline, but not for RIS. So I can't see any possibility of interference. 2) Anyway I now tried to use your new patch svn r13945. It definitely works better for medline entries, but it gets rid of the Dp field. This is a pity since the Dp field is the only thing that has the full publication date of the article in the journal. Sometimes your regex ignores stuff beyond the year that isn't a simple month or month day eg: 2005 Spring 2005 Jan-Feb This is still useful information. I would suggest that it would be better if either A) the Month field took anything past the year (my personal pref) or B) the Dp field is retained in bibdesk as is and the Month is only filled when it looks like Mar or Mar 23. 3) I tried using svn r13945 to open the test RIS records (compendex.ris and scopus.ris). Now the BibTex Year field for the imported scopus.ris retains the three terminal slashes. Furthermore if the RIS file contains a publication date (PY or Y1) with a month and a day they will not be inserted into the month field. 4) Your changes to BDSKPubMedParser's fixPublicationDictionary look tidier than my original. However the changes in BDSKRISParser fixPublicationDictionary seem unnecessary. Furthermore that code now contains some errors in the comments and the understanding of the difference between RIS and PubMed/Medline specs. Specifically there is no DP field in the RIS spec - it is a PubMed only field. RIS stores publication dates in PY or Y1. This is where the bug in point 3) has cropped up - because RIS PY or Y1 fields are now being carried through as is. 5) In general I would say that RIS and PubMed/Medline are rather different formats that share a similar syntax and a few field names. As Adam has just pointed out, PubMed/Medline is well-defined at the somewhat hard to find: http://www.nlm.nih.gov/bsd/mms/medlineelements.html While the RIS spec is at: http://www.refman.com/support/risformat_intro.asp 6) Finally, please don't think that this nitpicking means that I am ungrateful for the vast amount excellent work that you have put into BibDesk I just really care about the PubMed/RIS implementations because now that BibDesk is such a powerful app I rely on them for my daily work. 7) I am very happy to fix up any of the above as my small contribution to the development effort. I am a Cocoa amateur, but I am quite careful and know enough to handle small stuff like this. Best wishes, Greg. ------------------------------------------------------------------------------ _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop