Skip to content

Commit

Permalink
Improves the query result
Browse files Browse the repository at this point in the history
  • Loading branch information
devmessias committed Sep 17, 2019
1 parent 6424025 commit 86d3dd8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arxivcheck/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.1"
__version__ = "0.3.2"
__license__ = "AGPLv3"
__author__ = "Bruno Messias"
__author_email__ = "[email protected]"
10 changes: 9 additions & 1 deletion arxivcheck/arxiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -12,7 +12,7 @@
description="Generate a bibtex given a arxiv id or title, check if published",
author="Bruno Messias",
author_email="[email protected]",
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+)",
Expand Down

0 comments on commit 86d3dd8

Please sign in to comment.