ltsdw / gofile-downloader

Download files from https://gofile.io
GNU General Public License v3.0
154 stars 38 forks source link

Environment Variable Help #16

Closed RandomGuy5598 closed 10 months ago

RandomGuy5598 commented 1 year ago

I'm not sure if I'm missing something here...

What value do I set when making a GF_DOWNLOADDIR variable? Or is there some other way I'm supposed to be going about this?

Not really an important issue. I can just move the downloads to wherever I want after completion. I was just curious how I could go about getting this working, if possible. Quality of life type of thing.

Either way, thank you! :) Cheers!

ltsdw commented 1 year ago

Hello there!

You should put the directory path you want to use. So for example, if I have a path like /home/.local/Desktop/Downloads and I want to use that directory path to put the files I download in it. It would look like this:

GF_DOWNLOADDIR="/home/.local/Desktop/Downloads" python gofile-downloader.py https://gofile.io/d/contentid

Also it's worth to noting that the directory must exist already, as the script won't create it and will fallback to the current directory in case the specified directory doesn't exist, also the directory must have permissions of read and write, failing to access the directory it will fallback to the current directory.

RandomGuy5598 commented 1 year ago

Hello there!

You should put the directory path you want to use. So for example, if I have a path like /home/.local/Desktop/Downloads and I want to use that directory path to put the files I download in it. It would look like this:

GF_DOWNLOADDIR="/home/.local/Desktop/Downloads" python gofile-downloader.py https://gofile.io/d/contentid

Also it's worth to noting that the directory must exist already, as the script won't create it and will fallback to the current directory in case the specified directory doesn't exist, also the directory must have permissions of read and write, failing to access the directory it will fallback to the current directory.

Cool. So, Variable = GF_DOWNLOADDIR and Value = the directory path. Simple enough. I was just assuming there was something else I was supposed to be doing to where you can change the directory in the command input. Just make them the same. Good deal.

Thank you so much for taking the time to clarify that for me. :D

Edit: I guess I'm dumb. Lol. Adding GF_DOWNLOADDIR as a system variable with the output directory as the Value of said Variable didn't work for me, nor did adding the output directory itself in the PATH system variable. Sorry for my ignorance. Lol. And thank you again. :)

ltsdw commented 1 year ago

That's cool, could you please show me how you're doing it?

Also when you say that you're adding the GF_DOWNLOADDIR as a system variable, you mean you're using export? Because if you're setting the environment variable in another shell, it won't be visible to the script, even when using the keyword export.

RandomGuy5598 commented 1 year ago

That's cool, could you please show me how you're doing it?

Also when you say that you're adding the GF_DOWNLOADDIR as a system variable, you mean you're using export? Because if you're setting the environment variable in another shell, it won't be visible to the script, even when using the keyword export.

I was using the Advanced System Settings - Environment Variables - System Variables. I noticed I didn't mention I'm currently using Windows 10. That's usually important to mention.

I'm still a novice at all this. I've done a lot of this type of stuff the past few years, but I usually only learn stuff as I need it. I'm too A.D.H.D. to self-teach myself things. :/

I will look into the export stuff and go from there. Thanks again for the help and pointing me in the right direction. :D

ltsdw commented 1 year ago

Oh I see, in that case, have you tried rebooting the system before trying it out?

Like said here: How to set the path and environment variables in Windows.

Also instead of using the format /path/to/dowlond_dir try \path\to\download_dir.

You can try put in Variable the GF_DOWNLOADDIR, and in the Value the C:\Users\YourUserNameGoesHere\Downloads.

Also, what are you using to launch the script, vscode? Because I think they also have a specific way of setting environment variables for debugging purpose or something like that.

ltsdw commented 10 months ago

Closing, if you still have problems please open this issue again.