diff --git a/arxivcheck/__init__.py b/arxivcheck/__init__.py index 2a81bb2..2545b3f 100644 --- a/arxivcheck/__init__.py +++ b/arxivcheck/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.3.1" +__version__ = "0.3.2" __license__ = "AGPLv3" __author__ = "Bruno Messias" __author_email__ = "messias.physics@gmail.com" diff --git a/arxivcheck/arxiv.py b/arxivcheck/arxiv.py index e2e5f9a..70db109 100644 --- a/arxivcheck/arxiv.py +++ b/arxivcheck/arxiv.py @@ -126,7 +126,7 @@ def generate_bib_from_arxiv(arxiv_item, value, field="id"): # arxiv_cat = arxiv_item.arxiv_primary_category["term"] if field == "ti": journal = "arxiv:" - journtal += arxiv_item["id"].split("http://arxiv.org/abs/")[1] + journal += arxiv_item["id"].split("http://arxiv.org/abs/")[1] else: journal = "arxiv:"+value @@ -211,6 +211,14 @@ def check_arxiv_published( value = re.sub("arxiv\:", "", value, flags=re.I) found, items = get_arxiv_info(value, field) if found: + if field == "ti": + title = value.lower().replace(" ", "") + for item_arxiv in items: + title_arxiv = item_arxiv["title"].lower().replace(" ", "").replace("\n", "") + if title_arxiv == title: + items = [item_arxiv] + break + if get_first is False and field == "ti" and len(items) > 1: found, item = ask_which_is(value, items) else: diff --git a/setup.py b/setup.py index 2b7da54..78edd5f 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="arxivcheck", - version="0.3.1", + version="0.3.2", packages=find_packages(exclude=["build", ]), scripts=["arxivcheck/bin/arxivcheck"], install_requires=["future","unidecode", "feedparser", "bibtexparser", "doi2bib"], @@ -12,7 +12,7 @@ description="Generate a bibtex given a arxiv id or title, check if published", author="Bruno Messias", author_email="messias.physics@gmail.com", - download_url="https://github.com/bibcure/arxivcheck/archive/0.3.1.tar.gz", + download_url="https://github.com/bibcure/arxivcheck/archive/0.3.2.tar.gz", keywords=["bibtex", "arxiv", "science", "scientific-journals"], classifiers=[ "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",