arxivcheck

main.py

The core module of my example project

arxivcheck.arxiv.add_eprint_to_bib(bib, eprint)[source]

Insert the eprint information in a given bibtex string

Parameters:
  • bib (str) – The bibtex string without the arxiv number
  • eprint (str) – The arxiv number
Returns:

bib – The bibtex string with the arxiv number

Return type:

str

arxivcheck.arxiv.check_arxiv_published(value, field='id', get_first=True, keep_eprint=False)[source]
Parameters:
  • value (str) – value of the field
  • field (str) – field used for the arxiv search API
  • get_first (bool) –
  • keep_eprint (bool) – If True keep the arxiv number if the paper has already been published
Returns:

  • found (bool) – True if found the arxiv item
  • published (bool) – True if the arxiv has already been published
  • bib (str) – bibtext string

arxivcheck.arxiv.generate_bib_from_arxiv(arxiv_item, value, field='id')[source]
Parameters:
  • arxiv_item (dict) –
  • value (str) –
  • field (str) –
Returns:

bib – The bibtex string related with the arxiv item

Return type:

str

arxivcheck.arxiv.get_arxiv_info(value, field='id')[source]

Get arxiv information given

Parameters:
  • value (str) – value of the field
  • field (str) – the field used for build the query string
Returns:

  • found (bool) – True if at least one arxiv has been found
  • items (list of dicts) – List containing all the arxiv’s related with the search query