-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
94 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ requests | |
lxml | ||
title2bib | ||
Pillow | ||
arxivcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
__version__ = "0.1.0" | ||
__version__ = "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import textwrap | |
# from sci2pdf.libgen import download_pdf_from_bibs, download_from_doi | ||
# from sci2pdf.libgen import download_from_title | ||
from scihub2pdf.scihub import download_pdf_from_bibs, download_from_doi | ||
from scihub2pdf.scihub import download_from_title | ||
from scihub2pdf.scihub import download_from_title, download_from_arxiv | ||
|
||
|
||
|
||
|
@@ -33,6 +33,12 @@ def main(): | |
$ scihub2pdf --title An useful paper | ||
Arxiv... | ||
$ scihub2pdf arxiv:0901.2686 | ||
$ scihub2pdf --title arxiv:Periodic table for topological insulators | ||
----------------------------------------------------- | ||
@author: Bruno Messias | ||
@email: [email protected] | ||
|
@@ -79,7 +85,11 @@ def main(): | |
|
||
if inline_search: | ||
value = " ".join(args[1]) | ||
if title_search: | ||
is_arxiv = value.startswith("arxiv:") | ||
if is_arxiv: | ||
field = "ti" if title_search else "id" | ||
download_from_arxiv(value, field, location) | ||
elif title_search: | ||
download_from_title(value, location, use_libgen) | ||
else: | ||
download_from_doi(value, location, use_libgen) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,23 +6,23 @@ | |
|
||
setup( | ||
name="scihub2pdf", | ||
version="0.1.0", | ||
version="0.2.0", | ||
packages = find_packages(exclude=["build",]), | ||
# packages = find_packages(), | ||
scripts=["scihub2pdf/bin/scihub2pdf"], | ||
long_description = README_TEXT, | ||
install_requires = ["bibtexparser", | ||
"title2bib", | ||
"arxivcheck", | ||
"future", | ||
"Pillow", | ||
"requests", | ||
"lxml"], | ||
include_package_data=True, | ||
license="GPLv3", | ||
description="Downloads pdfs via a DOI number, article title or a bibtex file, sci-hub", | ||
description="Downloads pdfs via a DOI number(or arxivId), article title or a bibtex file, sci-hub", | ||
author="Bruno Messias", | ||
author_email="[email protected]", | ||
download_url="https://github.com/bibcure/scihub2pdf/archive/0.1.0.tar.gz", | ||
download_url="https://github.com/bibcure/scihub2pdf/archive/0.2.0.tar.gz", | ||
keywords=["bibtex", "sci-hub", "libgen", "doi", "science","scientific-journals"], | ||
|
||
classifiers=[ | ||
|