Closed cthoyt closed 4 years ago
This PR mainly adds the function wikidataintegrator.wdi_helpers.publication.arxiv_api_to_publication and integrates it with the wikidataintegrator.wdi_helpers.publication.Publication class to allow specifying the source/idtype as arxiv.
wikidataintegrator.wdi_helpers.publication.arxiv_api_to_publication
wikidataintegrator.wdi_helpers.publication.Publication
arxiv
I ran the code
python -m wikidataintegrator.wdi_helpers.publication 2006.08589 --source arxiv --idtype arxiv
and was happy greeted by
Successfully logged in as Cthoyt 2006.08589,Q96335314,,True
and my shiny new WikiData entry https://www.wikidata.org/wiki/Q96335314.
This PR adds a few minor tweaks as well:
getpass
authors
Publication.__init__
wikidataintegrator.wdi_helpers.publication
main()
setup.cfg
wikidataintegrator-publication 2006.08589 --source arxiv --idtype arxiv
This PR mainly adds the function
wikidataintegrator.wdi_helpers.publication.arxiv_api_to_publication
and integrates it with thewikidataintegrator.wdi_helpers.publication.Publication
class to allow specifying the source/idtype asarxiv
.I ran the code
and was happy greeted by
and my shiny new WikiData entry https://www.wikidata.org/wiki/Q96335314.
This PR adds a few minor tweaks as well:
getpass
if it's not available in the environment or a local.py fileauthors
inPublication.__init__
.wikidataintegrator.wdi_helpers.publication
inmain()
setup.cfg
wikidataintegrator-publication 2006.08589 --source arxiv --idtype arxiv
instead