-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use inside python #3
Comments
Well, in a way, yes, in a way, no. Basically the whole source code is just that: There are two ways to use it: But this one also gives all the visual feedbacks (printing, etc.) Probably there might be a compromise, e.g. suppressing the outputs, and using exception instead of sys.exit(). How would you use it, which features, etc. would you use? I did not spend much time to write it, maybe a day, i just wrote it for myself. |
Thanks for your answer. What I want to do is to query a set of records from a community based on keywords, then I'll obtain the ids and download them. If you don't mind, I can use pieces of your code for my own use, and I'll reference you're repo in my repo. Would this be ok for you? |
Of course, you can modify, reuse part is it, etc., that is the goal of free software. Side remark: the code was rushed, i needed something quickly, and when it worked, Implementation remark: i tried to deal with two options: timeout/broken download, so the already downloaded files should not be downloaded again, and sometimes zenodo gives timeout/access error. So when you writte your own, consider these two issues. :) |
Partially helpful, but i pushed a new version (not on pypi, but you can install from git), If an error occours, it should throw an exception. There is one bug, i don't understand how: if you call it with -h, It is more or less untested, but it seemed to work. |
Yes, looks like it works and I clone and install. Didn't look like it works if I use this though Would it be possible to add an output directory argument to download in a specified directory? It would be even cooled |
Hi,
yes, i will add it tomorrow,
i am out for the afternoon.
And of course, it is just a workaround,
but it literally supports everything what
CLI supports. :)
I will make some helper functions,
or probaby wrap the whole thing
into a class or a function with named
parameters.
(Should have done in the first place, but as i
said: time took priority over design.)
Pip install: that is strange,
i will look into it.
…-------- Original Message --------
On May 23, 2020, 14:05, Pariente Manuel wrote:
Yes, looks like it works and I clone and install. Didn't look like it works if I use this though pip3 install git+https://gitlab.com/dvolgyes/zenodo_get
The syntax is weird for the arguments but at least it works, thanks !
Would it be possible to add an output directory argument to download in a specified directory? It would be even cooled
—
You are receiving this because you commented.
Reply to this email directly, [view it on GitHub](#3 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AADH4WH3DESAAARSHKR6RTTRS63YHANCNFSM4NIL7PUQ).
|
I added the directory option (-o / --output-dir ), but the refactoring is still future plan. |
If you end up refactoring at some point in the future, it would be useful to have the downloaded files as a returned variable or class attribute. Thanks for creating and maintaining this package! |
So the CLI is great !
Is there a simple way to use this from inside Python? That would be very useful !
Thanks,
The text was updated successfully, but these errors were encountered: