Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

some code is userful,i hopy you can add in #19

Open
BEIBEI123 opened this issue Jun 28, 2019 · 2 comments
Open

some code is userful,i hopy you can add in #19

BEIBEI123 opened this issue Jun 28, 2019 · 2 comments

Comments

@BEIBEI123
Copy link

I hope you can add this code in article.py

``

__slots__ = (
    "pubmed_id",
    "title",
    "abstract",
    "keywords",
    "journal",
    "publication_date",
    "authors",
    "methods",
    "conclusions",
    "results",
    "copyrights",
    "doi",
    "volume",
    "issue",
    "pubdate_year",
    "pubdate_month"
)







def _extractVolume(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/Volume"
    return getContent(element=xml_element, path=path)

def _extractIssue(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/Issue"
    return getContent(element=xml_element, path=path)

def _extractPubDateYear(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/PubDate/Year"
    return getContent(element=xml_element, path=path)

def _extractPubDateMonth(self: object, xml_element: TypeVar("Element")) -> str:
    path = ".//Journal/JournalIssue/PubDate/Month"
    return getContent(element=xml_element, path=path)





    self.volume = self._extractVolume(xml_element)
    self.issue = self._extractIssue(xml_element)
    self.pubdate_year = self._extractPubDateYear(xml_element)
    self.pubdate_month = self._extractPubDateMonth(xml_element)

``

@BEIBEI123
Copy link
Author

thanks

@Darkbladecr
Copy link
Contributor

Why not create a pull request? It will make it easier for the authors to implement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants