Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a Command-Line Interface #3

Merged
merged 9 commits into from
Sep 11, 2018

Conversation

MahmoudElsayad
Copy link
Contributor

Things i added to the python code:
1- Created a command-line interface using "Docopt"
2- Working for python 3.0x
3- Retrieving publications, and abstract too
4- Added 500ms delay for the blocking of google issue

@WittmannF
Copy link
Owner

Hi @MahmoudElsayad! Thank you so much for suggesting a pull request! I am quite admired by the effort that you put here! I especially liked the 500ms delay to solve the robot blocking :) I am just wondering if it is necessary to use docopt to read the command line arguments. Apparently the user would have to install it. Maybe it could be used argparse since it is native on Python. I can do it later when I find some time :)

@MahmoudElsayad
Copy link
Contributor Author

You are already using pandas, BeautifulSoup and Matplotlib, and docopt is an overall better solution than argparse for the full control of the --help output (argparse can do it of course, but, you will have to implement an argparse “formatter class", which is a real pain), also maintainability is generally better in the docopt case, Octparse is better for bigger projects, Argparse is just a pain thats why heroku created Octparse, but that's not the case here.

@WittmannF
Copy link
Owner

Pandas and Matplotlib are usually already available for anaconda users. But, that's a good point regarding BeautifulSoup. I am going to merge it. Thank you again for the contribution!

@WittmannF WittmannF merged commit 43e66e3 into WittmannF:master Sep 11, 2018
@WittmannF
Copy link
Owner

@MahmoudElsayad , I was trying your code, and I got only 10 results, instead of 200. Can you try in your machine as well to check if this is a bug? Here's what I did:

git clone https://github.com/WittmannF/sort-google-scholar.git
cd sort-google-scholar/
python google_scholar_sort.py "Bioinformatics" --results=200

The .CSV file has only 10 lines.

@WittmannF
Copy link
Owner

@MahmoudElsayad I will be reverting the pull request if I don't hear back from you in one week. Thank you for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants