petermr / pygetpapers

a Python version of getpapers
Apache License 2.0
78 stars 9 forks source link

Users shouldn't be copy-pasting the absolute path for `--update` command #22

Closed ShweataNHegde closed 3 years ago

ShweataNHegde commented 3 years ago

Is your feature request related to a problem? Please describe. Currently, the --update flag takes in the absolute path of metadata JSON file (ex. eupmc_results.json) to update an existing CProject with a new set of papers. This is a problem because the user must locate the JSON file, copy-paste the absolute path, and give pygetpapers an API.

Describe the solution you'd like pygetpapers can, based on the output directory, work out the path of the metadata JSON file, and update the CProject.

So, instead of:

pygetpapers --update "C:\Users\shweata\essential_oil_30_1\eupmc_results.JSON" -q "lantana" -k 20 -x

The user can say:

pygetpapers --update  -q "lantana" -k 20  -x -o essential_oil_30_1

Additional context It's very easy for a user to mistype the absolute path. And it's also too much to expect the users to give the API each time they update the CProject.