New INSPIRE API

hepdata.modules.inspire_api.parser

Functions for parsing the new INSPIRE JSON metadata.

hepdata.modules.inspire_api.views

Get publication information using new INSPIRE API.

hepdata.modules.inspire_api.parser

Functions for parsing the new INSPIRE JSON metadata.

hepdata.modules.inspire_api.parser.get_title(metadata)[source]

Get the title of the publication from the first value in list of english translations (if applicable) otherwise the first title in the list of titles or preferably the first arXiv title in the list.

hepdata.modules.inspire_api.parser.get_doi(metadata)[source]

Get the DOI of the journal publication from the first value in the list of DOIs.

hepdata.modules.inspire_api.parser.get_authors(metadata)[source]

Get the authors of the publication as a list of dictionaries with keys ‘affiliation’ and ‘full_name’.

hepdata.modules.inspire_api.parser.get_type(metadata)[source]

Get the type of the publication.

hepdata.modules.inspire_api.parser.get_abstract(metadata)[source]

Get the abstract of the publication, ideally the one from the arXiv version, otherwise the first one.

hepdata.modules.inspire_api.parser.get_creation_date(metadata)[source]

Get the creation date of the publication, first try to expand the preprint_date, otherwise try legacy_creation_date.

hepdata.modules.inspire_api.parser.get_arxiv_id(metadata)[source]

Get the arxiv id of the publication from the last value in the list of arxiv eprints.

hepdata.modules.inspire_api.parser.get_collaborations(metadata)[source]

Get the collaborations of the publication as a list.

hepdata.modules.inspire_api.parser.get_keywords(metadata)[source]

Get the keywords of the publication.

hepdata.modules.inspire_api.parser.get_journal_info(metadata)[source]

Get the journal information of the publication. Format is ‘title volume (year) article page_start-page_end’ if at least one of these information is available, otherwise attempt to obtain it from ‘pubinfo_freetext’ or ‘publication_info’ or ‘report_numbers’ or ‘public_notes’. Defaults to ‘No Journal Information’.

hepdata.modules.inspire_api.parser.get_year(metadata)[source]

Get the year of the publication. Try first ‘imprints/date’, then ‘publication_info/year’, then ‘preprint_date’, and finally ‘legacy_creation_date’.

hepdata.modules.inspire_api.parser.get_subject_area(metadata)[source]
hepdata.modules.inspire_api.parser.updated_parsed_content_for_thesis(content, parsed_content)[source]
hepdata.modules.inspire_api.parser.expand_date(value)[source]

In the case where the date is not completely formed, we need to expand it out. so 2012-08 will be 2012-08-01 and 2012 will be 2012-01-01. If nothing, we do nothing.

hepdata.modules.inspire_api.views

Get publication information using new INSPIRE API.

hepdata.modules.inspire_api.views.get_inspire_record_information(inspire_rec_id)[source]
hepdata.modules.inspire_api.views.get_record_from_inspire()[source]