From: Gregory J. <jef...@gm...> - 2010-06-12 21:43:07
|
Hi Adam, On 2010-06-12 21:12, "Adam R. Maxwell" <ama...@ma...> wrote: > Doesn't +itemByParsingPDFFile: do this now? I just glanced at the code, and > it seems to try and use the file name as a search term first. > > + (id)itemByParsingPDFFile:(NSString *)pdfPath; > { > BibItem *bi=nil; > > // see if we can find any bibliographic info in the filename > NSString *pubMedSearch=nil; > pubMedSearch=[[[pdfPath lastPathComponent] stringByDeletingPathExtension] > stringByMakingPubmedSearchFromAnyBibliographicIDsInString]; > if(pubMedSearch!=nil){ > bi=[BibItem itemWithPubMedSearchTerm:pubMedSearch]; > if(bi!=nil) return bi; > } StringByMakingPubmedSearchFromAnyBibliographicIDsInString will only look for dois and Elsevier/NPG PIIs which are MUCH more specific than PMIDs (which are just an 8 digit number). Greg. |