titipata / pubmed_parser

:clipboard: A Python Parser for PubMed Open-Access XML Subset and MEDLINE XML Dataset
http://titipata.github.io/pubmed_parser/
MIT License
564 stars 164 forks source link

feature request: MeSH IDs #50

Closed pseudomonas closed 6 years ago

pseudomonas commented 6 years ago

It'd be useful to be able to get MeSH IDs as well as heading names. I've used the following quick-and-dirty change to medline_parser.py but there's probably a more elegant way.

mesh_terms_list = [m.find('DescriptorName').attrib.get('UI','') + ":" + m.find('DescriptorName').text for m in mesh.getchildren()]

titipata commented 6 years ago

That's a great idea! Would you like to do pull-request or should I add it later this week?

pseudomonas commented 6 years ago

I'll leave it to you; my fix is not backwards-compatible if that matters to you...

On 25 July 2017 at 00:32, Titipat Achakulvisut notifications@github.com wrote:

That's a great idea! Would you like to do pull-request or should I add it later this week?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/titipata/pubmed_parser/issues/50#issuecomment-317585031, or mute the thread https://github.com/notifications/unsubscribe-auth/ACJo20IOpOCoGXraJ9xhD4UWssToQDyzks5sRSmKgaJpZM4Oh0nd .

titipata commented 6 years ago

Definitely, I'll notify you when it's done :)

titipata commented 6 years ago

@pseudomonas, this is actually done. I forgot to close the issue :)